Questions tagged [findelement]
180 questions
-1
votes
1 answer
AttributeError: 'list' object has no attribute 'click' using find_element(By.Xpath) Selenium and Python
There was a change to the find_element_by_xpath() to find_element(By.Xpath) and now the click is not working.
Code trials:
search_btn = self.driver.find_elements(
By.XPATH,…

Virginia Walters
- 23
- 8
-1
votes
2 answers
How to log into a website without input field and button ID using Selenium and Python
I'm creating a program that will help students track their marks, for that I need to web scrap the site where all our grades are stored. The idea was to automate the login and then there will be a separate script that will get the information that I…

andrromedos
- 11
- 3
-1
votes
1 answer
unable to locate the element in selenium WebDriver using C#
how to find element for this below html tag ?
I am getting
exception: no such element: Unable to locate…

Aishwarya Mohan
- 27
- 6
-1
votes
1 answer
selecting element based on innertext javascript
div-1
div-1-span-1
I am trying to search this DOM. My search criteria is innerText, which is "div-1". If that…div-1-span-1-div
div-1-span-1-span

itchywinner
- 1
- 3
-1
votes
1 answer
I want to change the contains text of the element on run time - By.xpath("//a[contains(text(),'ProductName')]");
I have multiple products on the Screen, each of them differs from the string "ProductName". Instead of collecting all the products onto the page. I want to make any dynamic or reusable function so that I can pass the product name on the function and…
-1
votes
1 answer
How can I find this element in selenium Safari()
This is the page https://www.wunderground.com/weather/gb/london I want to click on history.
This is what I get when I inspect the element History
None of the find element methods has worked, I always get invalid syntax on my script. How can I find…

GUILLE DOMINGUEZ
- 9
- 3
-1
votes
2 answers
Find element using if else or try except in Python Selenium
I am confused which is the best and correct way to check if element exists or not? Using try-except or if-else? What would be the difference and what are advantages/disadvantages of both when trying to find element?
def find_logo():
return…

bbfl
- 277
- 1
- 2
- 16
-1
votes
1 answer
Problem with selenium to find hidden button
Hello guys I am trying to find and click on a button that seems to be hidden on the webpage :…
-1
votes
1 answer
AttributeError: module 'selenium.webdriver.firefox' has no attribute 'find_element_by_name' using Selenium through Python
from selenium import webdriver
drivers = webdriver.firefox
elem = drivers.find_element_by_name("username")
So above is the script I wrote but every time I run it returns this error message:
AttributeError: module 'selenium.webdriver.firefox' has…

DigitalSaf
- 1
- 2
-1
votes
3 answers
how to click button which is inside iframe using python selenium
He is my sample snippet. i want to click the button-1034-btnIconEl using python selenium.
-2
votes
1 answer
Does the selenium méthode find_element Can only work with id
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

Ahmed Nasri
- 3
- 1
-2
votes
1 answer
-2
votes
1 answer
-2
votes
1 answer
How to click the specific button with Selenium and Python?
Iam trying to find and click on this button. But i always face with "Message: Unable to locate element:"
I try this options, but its doesnt help me:
First: driver.find_element_by_xpath('//button[contains(text(), "CLAIM NOW!")]').click()
Second:…

valeracripts
- 1
- 1
-3
votes
2 answers
what is the solution for this the bug:
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 driver\chromedriver.exe")
driver =…

Zeyad Magdy
- 15
- 4