Questions tagged [expected-condition]

144 questions
3
votes
2 answers

Invalid element state: Element must be user-editable in order to clear it error trying to click and insert a date on a dropdown-toggle using Selenium

I'm trying to click on this calendar and insert a date automatically using selenium, but I got the error below: invalid element state: Element must be user-editable in order to clear it. HTML snippet
3
votes
1 answer

What is difference between ExpectedConditions.refresh and ExpectedConditions.stalenessof

Could you please help me to understand the ExpectedConditions.refresh and ExpectedConditions.stalenessOf.
Sai
  • 389
  • 6
  • 18
3
votes
1 answer

Selenium Expected Conditions, where does the instance of Webdriver come from?

I am struggling to figure out how the WebDriver instance is passed to Selenium's expected conditions. So I have a simple WebDriverWait for the visibility of a web element: new WebDriverWait(webDriver, Configuration.WEB_DRIVER_WAIT_TIMEOUT) …
3
votes
1 answer

Selenium: How selenium identifies elements visible or not? Is is possible that it is loaded in DOM but not rendered on UI?

Selenium: How selenium identifies elements visible or not? Is is possible that it is loaded in DOM but not rendered on UI? I would like to verify a scenario where element is clickable, I know web drive has method "ElementToBeClickable" however, I…
2
votes
1 answer

What is a Selenium locator in Python specifically?

My question comes from trying to understand the following code (which is meant to wait for a particular element to be loaded on the page before proceeding): from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support…
Ratler
  • 431
  • 3
  • 14
2
votes
1 answer

Python Selenium: Wait until element is clickable - Element is found using find_elements

I am building a web scraper which loops through a list of addresses and searches them on a property website. It then updates some dropdowns based on information we already know about the properties before scraping various information such as the…
2
votes
1 answer

selenium: Can not find element even with full xpath

I am trying to extract data using selenium from [website][1]. But I can not access the button I want to click. I have tried many methods by no use. I don't know why this is happening. Here is the code. from selenium import webdriver from…
farhan jatt
  • 509
  • 1
  • 8
  • 31
2
votes
1 answer

AttributeError: 'WebElement' object has no attribute 'Click' error trying to Click on a link using Selenium Python

So I am in the process of trying to reach a search page which involves clicking on a clickable link on the bottom of the page. My code seems to be able to find the link or at least not throw an error when attempting to, however I get the error…
2
votes
4 answers

Takes 1 positional argument but 2 were given error using Selenium Python

Hello I was trying to click on button male on website: https://fs2.formsite.com/meherpavan/form2/index.html?1537702596407 But it gives me the error: TypeError: element_to_be_clickable() takes 1 positional argument but 2 were given. The code is from…
2
votes
1 answer

Java Selenium - ExpectedCopnditions Presence Passes but Visibility Fails

I don't get it.. I have been searching for answers for 2 days now and I cannot find a single solution around this issue. The code looks like this (within try catch block): Presence = new WebDriverWait(Driver,…
2
votes
1 answer

With Selenium python, do I need to refresh the page when waiting for hidden btn to appear and be clickable?

I'm trying to make a small program that looks at a web page at a hidden button (uses hide in the class) and waits for it to be clickable before clicking it. The code is below. I'm wondering if the WebDriverWait and element_to_be_clickable functions…
2
votes
1 answer

Selenium - How to send keys within an iFrame?

I'm coding a selenium automated bot, and I want to send keys to a input that I got from iFrame, check the code line: username = bot.find_element_by_xpath("//iframe[@title='Registration form' and @class='top']") Can you guys help me? I can click on…
2
votes
1 answer

Does waiting for the parent tag ensures the complete loading of the child tag using Selenium?

If I wait for the parent tag to load when using the WebDriverWait function on Selenium, can I be assured that the child tag is loaded? Code example: WebDriverWait(self.web_driver, WEB_DRIVER_WAIT_TIME).until( …
2
votes
1 answer

Selenium Python - More compact or Pythonic way of inputting Username and Password?

I need to log into a website and I already have the following code, which works fine: username = driver.find_element_by_name('uname') password = driver.find_element_by_name('password') username.send_keys('username'), password.send_keys('password',…
2
votes
1 answer

How to switch tabs using the expected conditions new_window_is_opened and verify the page title using Selenium and Python

I'm writing a test which goes through multiple pages and then verifies the title is being displayed. Currently my test is at the point where i can click a button and it opens a report. The problem is the report opens up in a new tab so i need my…
1
2
3
9 10