findelement

Selenium Can't Find element by Xpath?

Selenium Can't Find element by Xpath? Question: I’m trying to click a button to automatically export a csv file from this site. I’ve tried finding the element by button name and by Xpath, but the "NoSuchElement" Exception is raised. I’ve tried variations of WebdriverWait and time.sleep to ensure the button loads, and used the xPath …

Total answers: 1

Does the selenium méthode find_element Can only work with id

Does the selenium méthode find_element Can only work with id Question: I can’t find use other identification in vscode or pycharm like classes or tagname I wanna know if the méthode find_element Can use only id or i don’t know the updates Asked By: Ahmed Nasri || Source Answers: find_element can be used with parameters …

Total answers: 1

driver doesn't close after not finding an element, python

driver doesn't close after not finding an element, python Question: could you find an error in my code? I haven’t been able to get over this code for a week now, so I am forced to ask a community. I am trying to download 14.000 html pages into a folder (I use selenium), I have …

Total answers: 3

driver.find_element(By.XPATH, "xpath") not working

driver.find_element(By.XPATH, "xpath") not working Question: I am trying to learn Selenium in Python and I have faced a problem which stopped me from processing. As you might know, previous versions of Selenium have different syntax comparing the latest one, and I have tried everything to fill the form with my code but nothing happens. I …

Total answers: 2

what is the solution for this the bug:

what is the solution for this the bug: Question: This is the code: from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.chrome.service import Service s=Service("C:selenium driverchromedriver.exe") driver = webdriver.Chrome(service=s) driver.get("https://www.selenium.dev/selenium/web/web-form.html") driver.implicitly_wait(5) submit_button = driver.find_element(By.CLASS_NAME, "btn btn-outline-primary mt-3") submit_button.click() This is the error: selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".btn btn-outline-primary …

Total answers: 2

python Selenium find_element

python Selenium find_element Question: I had a problem using the Selenium library. I don’t know how to use find_element. And I get an error my code: from selenium import webdriver import time,selenium driver = webdriver.Chrome(r"./driver/chromedriver") driver.get("https://cin.guru/g/438694") driver.maximize_window() button = driver.find_element(By.class_name,"rounded-md mr-1 text-white font-bold text-base cursor-pointer py-1 px-3 mx-1") time.sleep(5) button.click() but i get this error: …

Total answers: 1

Python Selenium find_element only finds every second element by class

Python Selenium find_element only finds every second element by class Question: I want get every type of bet from this page (3-Way, Double Chance, etc.) but my script only returns every second element. import time from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC driver = …

Total answers: 1

Grab and Click Button using Selenium Python

Grab and Click Button using Selenium Python Question: There are several size options under ‘SELECT SIZE’ on this site: https://www.myntra.com/sports-shoes/puma/puma-men-black-eternity-nitro-running-shoes/14521968/buy I have been trying to somehow click one button to choose size of the shoes using python selenium but every time it says "no such element: unable to locate element:…..".Here’s what I have tried till …

Total answers: 2

Can't click a button in python

Can't click a button in python Question: Good afternoon everyone, I am new to doing Web Scraping in Python, I would appreciate it if you could help me solve this problem that is occurring to me when clicking on a button (I have been able to do it in others), below is my code: opts …

Total answers: 1

Selenium Driver – finding element with no ID, Name, Xpath, Tag, Class, CSS Selector

Selenium Driver – finding element with no ID, Name, Xpath, Tag, Class, CSS Selector Question: I’m working with Python and Selenium, and trying to select a username field to automate login for an application, however, the webdriver’s find_element method doesn’t want to play nicely with the username field I’ve found. Below is the object’s HTML …

Total answers: 1