I have the following snippet of HTML code on a web page:
<div class="f0n8F ">
<label for="f395fbf9cde026" class="_9nyy2">Phone number, username, or email</label>
<input class="_2hvTZ pexuQ zyHYP" id="f395fbf9cde026" aria-describedby="slfErrorAlert" aria-label="Phone number, username, or email" aria-required="true" autocapitalize="off" autocorrect="off" maxlength="75" name="username" type="text" value="">
</div>
And I am trying to input text using the following code:
username_element = WebDriverWait(driver, 5).until(expected_conditions.visibility_of_element_located((By.ID, "f395fbf9cde026")))
username_element.send_keys('abc')
I keep getting a TimeOut exception, even when I try (By.CLASS, "class _2hvTZ pexuQ zyHYP")
, (By.XPATH, "//*[@id=\"f1798b97d45a38\"]")
.
If I try By.NAME, "username"
, there is another element with the name 'username' on the previous page, and so 'abc' is entered on this previous page before the above lines of code are executed.
Notably, if I ever try driver.implicitly_wait(x)
, no wait ever occurs.