I want to change an attribute and give it a value with selenium

I have 19 span with the same attribute data-checked <span id="u25-accordion-panel–61" data-type="checkbox" data-checked style="display: none;"></span> I want to change the attribute in all the spans, I tried with 1 but I get the following error options = webdriver.EdgeOptions() options.add_argument("start-maximized") driver = webdriver.Edge(options=options) driver.implicitly_wait(20) driver.get( ‘https://www.udemy.com/course/angular-10-fundamentos-8-app/&#8217;) elem = driver.find_element(By.CSS_SELECTOR, ‘#udemy > div.ud-main-content-wrapper > div.ud-main-content > div… Read More I want to change an attribute and give it a value with selenium

Is it possible for selenium to have all the browser tabs focused simultaneously?

My project needs to have about 5 or 6 active tabs in each browser instance, is it possible for selenium to have each tab of a browser focused at the same time so, for example, video autoplay can continue to work on all tabs simultaneously? I’m aware of driver.switchTo().window(); but that will just change the… Read More Is it possible for selenium to have all the browser tabs focused simultaneously?

Selenium finding link by text when text-transform present

I have this HTML <div class="tabsAction"> <a class="butAction" href="" title="" data-original-title="">Validar</a> <a class="butAction" href="" title="" data-original-title="">Copiar</a> <a class="butAction" href="" title="" data-original-title="">Convertir en plantilla</a> <a class="butActionDelete" href="" title="" data-original-title="">Eliminar</a> </div> I’m trying to select the Validar link. driver.find_element(By.LINK_TEXT, "Validar") but selenium can’t find it. However if I do this: for link in links: print(link.text) I get… Read More Selenium finding link by text when text-transform present

Selenium: TypeError: 'str' object is not callable

Is there anyone can help me? I want to track live stock price, using Selenium. That’s my code: #https://www.youtube.com/watch?v=CtCeuJaRgLQ&t=16s&ab_channel=G%C3%BCneyBircan from selenium import webdriver from selenium.webdriver.common.by import By from time import sleep options = webdriver.ChromeOptions() options.add_experimental_option(‘excludeSwitches’, [‘enable-logging’]) driver = webdriver.Chrome(options=options) driver.maximize_window() driver.delete_all_cookies() driver.get("https://finans.mynet.com/borsa/hisseler/asels-aselsan/&quot;) driver.implicitly_wait(5) price_info = driver.find_element(By.XPATH(‘/html/body/section/div[1]/div[1]/div[3]/div/div[1]/div[1]/div[2]/div[1]/div’)) Exception: price_info = driver.find_element(By.XPATH(‘/html/body/section/div[1]/div[1]/div[3]/div/div[1]/div[1]/div[2]/div[1]/div’)) TypeError: ‘str’ object is not… Read More Selenium: TypeError: 'str' object is not callable

Selenium Test cant send Key "DELETE" on div

I am trying to test my application with selenium. I have a grid with divs, where you can enter or delete projects. To delete a project you have to press the "DELETE" button after selecting the div. Selenium Test [Fact] public void DeleteBooking_ExistingProject_Success() { // Arrange _driver.Navigate().GoToUrl(Consts.FIXPLANUNG_URL); _driver.MicrosoftLogin(_configService.Get("Email"), _configService.Get("Password")); // Act var bookingFieldXPath = FindBookingFieldXPath(Consts.DUMMY_PROJECT);… Read More Selenium Test cant send Key "DELETE" on div

Selenium: Get link text for every link on a website

I would like to fetch the linktext for a given website only and save them to a list. For example, in the following case I would like to save "Aeris Environmental" rather than "/Company/aeris-environmental" <a href="/Company/aeris-environmental"> Aeris Environmental</a> Using the following code I managed to retrieve the actual links but not the text. elems =… Read More Selenium: Get link text for every link on a website

get my instagram follower list with selenium

I’m beginner on programming. I trying get my Instagram follower list but i have just 12 follower. I tried firstly click to box and scroll down but it didn’t work. from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By import time from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import… Read More get my instagram follower list with selenium

Get all value and items from drop down list using selenium

I am trying to extract values from dropdown using python selenium. I am getting the text but not getting the values with xpath. Code I used is from selenium.common.exceptions import WebDriverException from selenium import webdriver headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.3" } options = webdriver.ChromeOptions()… Read More Get all value and items from drop down list using selenium