Questions tagged [selenium-webdriver-python]

Utilizing Selenium WebDriver grants access to the WebDriver API, enabling control of browsers across various programming languages. Remember to include a tag specifying the programming language you are utilizing in conjunction with this feature.

Using Python, bring in browser cookies as JSON data

I have been attempting to import JSON cookies into a website using Selenium from a file named "cookie.json", but I am unsure of the correct approach. So far, my attempts have involved using "driver.add_cookie(cookie1)" with the variable pointing to the pat ...

Guide to choosing options from a dropdown menu with Selenium and Python

I am trying to search for a specific item on the microcenter store website. However, I am facing a challenge in selecting a store from the dropdown menu before proceeding with the search. Despite my efforts, I have been unable to figure out how to open up ...

To access the website https://gem.gov.in/ using Python Selenium and undetected_chromedriver, follow these steps:

I'm facing a challenge in trying to access the website using Python Selenium. My initial attempt was: import undetected_chromedriver as uc import time driver = uc.Chrome(use_subprocess=True) driver.get('https://gem.gov.in/view_contracts') time.sleep(5) ...

When using Python Selenium, the driver.close() method may result in an error stating "no such window: target window already closed; web view not found" when attempting to close a new tab

Recently, I've delved into working with multiple tabs in Selenium and encountered a peculiar issue. When running the following code: WebDriverWait(driver, 10).until(EC.number_of_windows_to_be(2)) driver.switch_to.window(driver.window_handles[-1]) time.slee ...