findelement

Selenium find element by class breaking code

Selenium find element by class breaking code Question: My program checks a login page for available combinations. Upon first opening up the page, there is a "check availability" button, which has an ID which Selenium is able to find/use to click. If the username is taken, a new button pops up which says "check another …

Total answers: 2

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".ui flu~"}

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".ui flu~"} Question: This is the code I use: import requests as r, sys as sus, bs4 as bs, webbrowser as wb from selenium import webdriver as wd dr = wd.Chrome() b = r.get("https://uupdump.net/fetchupd.php?arch=amd64&ring=wif&build=latest").text s = bs.BeautifulSoup(b, features="html.parser") if "/selectlang.php?id=" in b: l = b.split("/selectlang.php?id=")[1].split(‘"’)[0] …

Total answers: 2

find_element_by_* commands are deprecated in selenium

find_element_by_* commands are deprecated in Selenium Question: When starting the function def run(driver_path): driver = webdriver.Chrome(executable_path=driver_path) driver.get(‘https://tproger.ru/quiz/real-programmer/’) button = driver.find_element_by_class_name("quiz_button") button.click() run(driver_path) I’m getting errors like these: <ipython-input-27-c5a7960e105f>:6: DeprecationWarning: executable_path has been deprecated, please pass in a Service object driver = webdriver.Chrome(executable_path=driver_path) <ipython-input-27-c5a7960e105f>:10: DeprecationWarning: find_element_by_* commands are deprecated. Please use find_element() instead button = driver.find_element_by_class_name("quiz_button") …

Total answers: 5

No id in Amazon search result page to find with selenium

No id in Amazon search result page to find with selenium Question: I am using the following python code: from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.firefox.options import Options from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import Select from selenium.webdriver.common.by import By from selenium.common.exceptions import TimeoutException import re …

Total answers: 2