selenium-chromedriver

Unable to interact with selenium webdriver after initializing it with the new service method [Python]

Unable to interact with selenium webdriver after initializing it with the new service method [Python] Question: I’m trying to initialize a chrome webdriver with a custom user profile using the following code: from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.chrome.service import Service options = webdriver.ChromeOptions() options.add_experimental_option("detach", True) options.add_argument("–start-maximized") options.add_argument(r’user-data-dir=C:Users{User}AppDataLocalGoogleChromeUser DataProfile XY’) service = …

Total answers: 1

Python, Selenium, Chrome: How to set driver location in Selenium 4.12

Python, Selenium, Chrome: How to set driver location in Selenium 4.12 Question: Use case scenario Selenium 4.12 (Chrome driver) behind proxy authentication and no access to github.io. Problem Somewhere along the way, executable_path arg in webdriver.Chrome method was deprecated. Instead, webdrive_manager.chrome module tries to download chromedrive.exe. In order to select driver version, it access https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json …

Total answers: 1

Selenium is not scraping in the right language

Selenium is not scraping in the right language Question: I am scraping details from this website: https://buff.163.com. If I run the code with graphic mode enabled, it scrapes in English as I want. However, when I disable the graphic mode, it starts to scrape in Chinese. This is my code: class WebScrapping: def __init__(self,url,graphic_mode): self.scraped_list …

Total answers: 1

selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain chromedriver using Selenium Manager error using Selenium and ChromeDriver

selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain chromedriver using Selenium Manager error using Selenium and ChromeDriver Question: I can’t figure out why my code it’s always getting an error This is my code: from selenium import webdriver url = "https://google.com/" path = "C:/Users/thefo/OneDrive/Desktop/summer 2023/chromedriver_win32" driver = webdriver.Chrome(path) driver.get(url) Path of chromedriver: and this is the error that …

Total answers: 2

Selenium (Python, Chrome) not downloading PDF file

Selenium (Python, Chrome) not downloading PDF file Question: I’m trying to download PDFs from a page which renders a PDF with Chrome PDF viewer. Regular options have not worked. The flow is Navigate to page Locate button to download PDF and click it New tab will be opened (with javascript) where the PDF is visible …

Total answers: 1

Selenium unable to stop page loading

Selenium unable to stop page loading Question: I do not face this problem with other websites but on this specific website: 1- I want to get my internet speed while using speedtest website by Selenium but the page cant stop loading. Because of that, I think that reason that I can’t get the website elements. …

Total answers: 3

Python Selenium unable to locate element even thought it shows up in inspect tab

Python Selenium unable to locate element even thought it shows up in inspect tab Question: I run a query to a webpage and selenium opens the page and I wait till all the scripts are loaded. Then I perform a tag search and by far I’ve tried every method but it always returns selenium.common.exceptions.NoSuchElementException: Message: …

Total answers: 1

Python & Selenium Code Bugs – Automation is NOT gathering data as expected

Python & Selenium Code Bugs – Automation is NOT gathering data as expected Question: a. I have a simple code for automation that I’m trying to learn from. The code is a robot software that finds key information about important scientists and display it to the user. b. the program introduces itself and explain the …

Total answers: 1

web scraping with selenium with python

web scraping with selenium with python Question: I’m writing a python script to web scrape a betting site for up coming games with selenium. I keep getting this long error. Here’s the code. import os from selenium import webdriver from selenium.webdriver.common.by import By os.environ[‘PATH’] += r"C:/Users/dub6m/OneDrive/Documents/chromedriver_win32" driver = webdriver.Chrome() driver.get(‘https://www.888sport.com/tennis/’) athlete1 = driver.find_element(By.CLASS_NAME, ‘featured-matches-widget__event-text featured-matches-widget__event-competitor’) …

Total answers: 2

Selenium Python Element Click Intercepted

Selenium Python Element Click Intercepted Question: I’m trying to run a test in Selenium Webdriver Python, but I got an error saying as on the screenshot: this is the xpath for the register button: //button[@class=’tutor-btn tutor-btn-primary’] What I tried so far: setup.find_element("xpath", "//button[@class=’tutor-btn tutor-btn-primary’]").click() and setup.find_element("xpath", "//button[@type=’submit’ and (contains(@class,’tutor-btn tutor-btn-primary’)) and(contains(text(),’Register’))]").click() but none works, any …

Total answers: 4