About 3,720,000 results
Open links in new tab
  1. How to use Selenium with Python? - Stack Overflow

    Jul 9, 2013 · pip install -U selenium And use this module in your code . from selenium import webdriver You can also use many of the following as required . from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException Here is an updated answer

  2. How can I check if some text exist or not in the page using …

    Jul 12, 2012 · Source: Another way to check (assert) if text exists using Selenium Python. Java. In Java the following function: public void verifyTextPresent(String value) { driver.PageSource.Contains(value); } and the usage would be:

  3. selenium - Refreshing Web Page By WebDriver When Waiting For …

    Jan 25, 2021 · 5 different ways to refresh a webpage using Selenium Webdriver. There is no special extra coding. I have just used the existing functions in different ways to get it work.

  4. Select iframe using Python + Selenium - Stack Overflow

    Sep 24, 2011 · The Python code (using the selenium library) was trying to find this iframe using this: @timed(650) def test_pedometer(self): sel = self.selenium ... time.sleep(10) for i in range(5): try: if sel.select_frame("css=#upload_file_frame"): break except: pass time.sleep(10) else: self.fail("Cannot find upload_file_frame, the iframe for the device ...

  5. Running Selenium Webdriver with a proxy in Python

    I am trying to run a Selenium Webdriver script in Python to do some basic tasks. I can get the robot to function perfectly when running it through the Selenium IDE inteface (ie: when simply getting the GUI to repeat my actions).

  6. python selenium, find out when a download has completed?

    Dec 17, 2015 · import os import time def latest_download_file(download_dir:'Downloads folder file path'): os.chdir(download_dir) files = sorted(os.listdir(os.getcwd()), key=os.path.getmtime) latest_f = files[-1] return latest_f has_crdownload = True while has_crdownload: time.sleep(.6) newest_file = latest_download_file() if not "crdownload" in newest_file: has_crdownload = False

  7. python - Selenium - wait until element is present, visible and ...

    Dec 1, 2019 · I have a Selenium script (Python) that clicks a reply button to make the class anonemail appear. The time it takes for the class anonemail to appear varies. Because of that I have to use sleep until the element has appeared. I want to wait until the class has appeared instead of using sleep.

  8. How to select a drop-down menu value with Selenium using …

    Mar 19, 2019 · from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import Select select = Select(WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, "fruits01 ...

  9. python - How to deal with certificates using Selenium? - Stack …

    Jul 1, 2014 · from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.firefox.firefox_binary import FirefoxBinary caps = DesiredCapabilities.FIREFOX.copy() caps['acceptInsecureCerts'] = True ff_binary = FirefoxBinary("path to the Nightly binary") driver = webdriver.Firefox(firefox ...

  10. How to properly use By class in selenium with python

    Aug 14, 2016 · I have created a locators.py file as described in the following documentation: selenium python binding - page objects. For simple locators this is straightforward. This is what I've done so far: from selenium.webdriver.common.by import By class PhotoHomePageLocators(object): """A class for photographer home page locators.

Refresh