selenium-webdriver

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 Pagination with a Button on www.dub.de

Python Selenium Pagination with a Button on www.dub.de Question: Im trying to get used to Python selenium because of a data literacy class at my university. I figured out a project for my class where i need some data of www.dub.de, no worries I won’t make lots of requests in a short period of time, …

Total answers: 1

Does providing content to input-field inside iframe not possible using selenium?

Does providing content to input-field inside iframe not possible using selenium? Question: i try to provide a value to an input-field on a website using the following code: from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.chrome.service import Service from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By if …

Total answers: 1

Trying to interact with HTML page elements, but none of them are found

Trying to interact with HTML page elements, but none of them are found Question: I’m trying to scrape a webpage using Selenium, but when I try to pass the XPath of a button, I get an error saying that this element does not exist. I tried with another website, and it worked perfectly. I also …

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 (Python): No such driver version 115.0.5790.114 for mac-arm64

Selenium (Python): No such driver version 115.0.5790.114 for mac-arm64 Question: Selenium was working until this morning that this error occured: No such driver version 115.0.5790.114 for mac-arm64 I’ve been searching for answers but none was able to solve this problem. Here’s my code to initialize driver: options = webdriver.ChromeOptions() options.headless = True options.page_load_strategy = ‘none’ …

Total answers: 2

How to find an element with multiple class names using Xpath or CssSelector

How to find an element with multiple class names using Xpath or CssSelector Question: I want to access this element: div data-v-658f4ceb="" class="trn-gamereport-list trn-gamereport-list–compact"> I know that since it has multiple names in the class I would need to use either the XPath or CSS selector method to access it but whenever I try either …

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