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,…
-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…
-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…
-1
votes
1 answer

selecting element based on innertext javascript

div-1 div-1-span-1
div-1-span-1-div
div-1-span-1-span
I am trying to search this DOM. My search criteria is innerText, which is "div-1". If that…
-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…
-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…
-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.