selenium-chromedriver

Selenium can't find element by XPATH or by CLASS_NAME even when it exists

Selenium can't find element by XPATH or by CLASS_NAME even when it exists Question: I am trying to click a button on this page (The blue button) but Selenium and even the dev console return "cannot find element" or null. What am I missing? driver.find_element(By.XPATH, "/html/body/ts-app//div/div[3]/ts-button//paper-button") Error: raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such …

Total answers: 1

Locating and Find Element with dynamic ID using selenium in Pyhton

Locating and Find Element with dynamic ID using selenium in Pyhton Question: How to find and select an element that has a dynamic ID, that always changing every reloading the page, this is the ID i want to select id=x-auto-234-input but the 3 digit number always changing, Any ideas? Below is the script <div role="presentation" …

Total answers: 2

Selenium page scrolling no longer works

Selenium page scrolling no longer works Question: I have the following problem: my page scrolling in Selenium stopped working, I was scrolling pages with the same code just yesterday, the next day I sat down at my computer and scrolling no longer works. I do not understand what the problem, I guess I have to …

Total answers: 1

(Python) Selenium doesn't get the link when i configure my profile

(Python) Selenium doesn't get the link when i configure my profile Question: this is my first question here. i searched a lot in the site to answers, but i don’t get it. Can anyone please help? i’m trying to open the chrome with my profile, and it opens correctly, but, the line driver.get("https://google.com") is not …

Total answers: 1

'DevToolsActivePort file doesn't exist' error with managed chrome browser or default user directory

'DevToolsActivePort file doesn't exist' error with managed chrome browser or default user directory Question: I used to be able to run several instances of Chrome concurrently without issue. After a DevToolsTools active port file doesn’t exist error popped up, the only solution that seemed to get things up and running was options.add_argument(‘–remote-debugging-port=9222’). However, since I …

Total answers: 1

How to download chromedriver instead of webpage with python requests library

How to download chromedriver instead of webpage with python requests library Question: Today I’m creating a Python script to find a specific version of chromedriver here. My intention is to make a request to the URL containing the specific version of chromedriver I need to download and save it to the same directory as the …

Total answers: 1

Python Selenium Select All Links In Spesific Element

Python Selenium Select All Links In Spesific Element Question: I have the following code which works fine gets and lists all of the links in the given URL however Im struggling to make it work when I want to get links in a specific tag. Im new at python My code is; chromedriver = webdriver.Chrome(service=Service(ChromeDriverManager().install())) …

Total answers: 1

Run '$x("XPath")' in Selenium 'driver.execute_script' JavaScript, chromedriver=111.0.5563.64

Run '$x("XPath")' in Selenium 'driver.execute_script' JavaScript, chromedriver=111.0.5563.64 Question: On facebook, if I go to main page, and run in chrome dev tools this command: $x(‘//span[contains(text(), "Marketplace")]’)[0].click() it works well. If I try in Python/Selenium: driver.execute_script(""" $x(‘//span[contains(text(), "Marketplace")]’)[0].click() """) I get: selenium.common.exceptions.JavascriptException: Message: javascript error: $x is not defined (Session info: chrome=111.0.5563.64) If I use: marketplace_button …

Total answers: 3

How to find the path for the tweet textbox while using selenium?

How to find the path for the tweet textbox while using selenium? Question: I can’t find the textbox for tweeting while using the auto software selenium.I have tried multiple class-names,xpaths in and around the textbox. driver.get("https://twitter.com/home") twe=driver.find_element(By.XPATH,’//*[@id="react-root"]/div/div/div[2]/main/div/div/div/div[1]/div/div[3]/div/div[2]/div[1]/div/div/div/div[2]/div[1]/div/div/div/div/div/div[2]/div/div/div/div/label/div[1]/div/div/div/div/div/div/div/div/div/div’) twe.send_keys(f"Happy Birthday") but=driver.find_element(By.XPATH,’//*[@id="react-root"]/div/div/div[2]/main/div/div/div/div[1]/div/div[3]/div/div[2]/div[1]/div/div/div/div[2]/div[3]/div/div/div[2]/div/div/span/span’) but.click() Asked By: Akshay || Source Answers: See the below code: driver.get("https://twitter.com/home") twe = WebDriverWait(driver, …

Total answers: 1