Navigation

    SOFTWARE TESTING

    • Register
    • Login
    • Search
    • Job Openings
    • Freelance Jobs
    • Services
    • Conferences
    • Courses
    1. Home
    2. Tags
    3. python
    Log in to post

    • K

      How to Change a html line code with python?
      Automated Testing • selenium webriver python html • • Kadir  

      2
      0
      Votes
      2
      Posts
      2
      Views

      J

      To remove the attribute disabled="" you can use the following line of code: driver.execute_script("arguments[0].removeAttribute('disabled')", element)
    • R

      Selenium only loading JavaScript and not full HTML (Python)
      Automated Testing • python selenium • • Rossere  

      2
      0
      Votes
      2
      Posts
      1
      Views

      J

      To set the value in search field Induce WebDriverWait() and wait for element_to_be_clickable() and use below css selector. driver.get("https://www.takealot.com/") WebDriverWait(driver,20).until(EC.element_to_be_clickable((By.CSS_SELECTOR,"input.search-field"))).send_keys("USB") You need to import below libraries. from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait
    • K

      Scrolling to the next element in Selenium (Python)
      Automated Testing • selenium webriver python • • Kadir  

      2
      0
      Votes
      2
      Posts
      1
      Views

      morde

      Just use this: element = driver.find_element_by_xpath(textbox_id) driver.execute_script("arguments[0].scrollIntoView();", element) #Scrolls down until the element is visible
    • C

      Selenium works in Terminal but not the Python Shell
      Automated Testing • selenium webriver python modulenotfounderror python shell terminal • • courtlanda  

      2
      0
      Votes
      2
      Posts
      1
      Views

      D

      It's seems like the Python interpreter you're using in the shell is not the same one used by Vscode. You can change the Python environment to match the one you're using in your Shell, or even install selenium in the Python interpreter currently used with: python -m pip install -U selenium
    • J

      How to use options.add_argument(“--headless”) in Selenium Python
      Automated Testing • selenium webriver python headless • • jonetta  

      2
      0
      Votes
      2
      Posts
      1
      Views

      T

      Where is your driver initialization. you need to pass chrome options while initialize the driver like. options = webdriver.ChromeOptions() options.add_argument("download.default_directory=C:\Users\gabriel.lucena\Documents\Python Scripts") options.add_argument("--headless") driver=webdriver.Chrome(options=options) Now if you just run this code to check whether headless options works. driver.get("https://stackoverflow.com/") print(driver.title)
    • E

      Wait until the page loaded Selenium Python
      Automated Testing • python selenium • • emran  

      2
      0
      Votes
      2
      Posts
      2
      Views

      briley

      This should help u: from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By login_btn = WebDriverWait(driver, 500).until(EC.presence_of_element_located((By.XPATH, 'xpath of login button'))) #Waits until the login button is visible. login_btn.click() If u don't wanna find the button by its xpath, then u can change By.XPATH to By.ID or By.CLASS_NAME.
    • M

      Modify InnerHTML of a site using Selenium Python
      Automated Testing • python selenium • • magpie  

      2
      0
      Votes
      2
      Posts
      4
      Views

      G

      driver.execute_script("arguments[0].innerHTML = arguments[1]", element, HTML)
    • C

      How to create a text file for Selenium Python to read with out extra character problems?
      Automated Testing • selenium webriver python xpath • • charlenef  

      2
      0
      Votes
      2
      Posts
      2
      Views

      N

      Inserting this as the first item in the for loop did the trick customer = customer.rstrip("\n")
    • N

      How to return text in Selenium?
      Automated Testing • selenium webriver python text • • Nykeriab  

      2
      0
      Votes
      2
      Posts
      1
      Views

      T

      driver.find_element_by_xpath("//div[contains(@class, 'rankings-list-volume')]").text
    • J

      Error on Connect Selenium Driver to an Existing Chrome Browser Instance
      Automated Testing • selenium webriver python chrome • • Jolied  

      2
      0
      Votes
      2
      Posts
      2
      Views

      P

      The error says chrome is not reachable. Most probably that instance has been deleted I am showing a simple method to save session data( all cookies will be saved ) and then load selenium to load from that instance. Look at the following example from selenium.webdriver.chrome.options import Options from selenium import webdriver session = "mySession" chrome_driver_path = '/home/aahnik/Downloads/apps/chromedriver' whatsapp_web_url = "https://web.whatsapp.com/" chrome_options = Options() chrome_options.add_argument(f'--user-data-dir={session}') driver = webdriver.Chrome( options=chrome_options, executable_path=chrome_driver_path) driver.get(whatsapp_web_url) Now execute this code. WhatsApp web will open. Login by scanning the QR Code. Now close the window, and then terminate the program. Now will see a folder named mySession in your current user directory. Execute this code again This time you will find that you are already logged into WhatsApp. Hope this helped.
    • 1
    • 2
    • 1 / 2