webdriverwait

Why do some elements exist but not interactable/displayed?

血红的双手。 提交于 2020-02-25 08:30:34
问题 I'm pretty new to testing, trying to gain a better understanding of what exactly is going on. I'm finding some of our test codes are failing when the css selector element has a waitUntilCanInteract or waitUntilDisplayed attached to it even though when I do a chrome inspect the element is showing up in the browser. Changing them to a waitUntilExists gets them to a passing point so I was wondering what exactly is going on to create this situation? 回答1: Precisesly Selenium deals with three

Can't locate element on Microsoft Sign In page

。_饼干妹妹 提交于 2020-02-24 11:32:10
问题 I'm currently trying to locate Microsoft Sign In page's email input box by using xpath (others as well) but after many tries I still can't locate the correct element for it. After copying the element from the page, this is the element given: <input type="email" class="form-control" placeholder="Email, phone, or Skype" aria-required="true" spellcheck="false" autocomplete="off" data-bind=" hasFocus: focus, textInput: email, attr: {'placeholder': config.text.emailPlaceHolder, 'aria-invalid':

Get fully rendered HTML using Selenium webdriver and Python

放肆的年华 提交于 2020-02-15 07:39:35
问题 I'm trying to build a web scraper in Python using Selenium webdriver but I'm unable to access the information I need when I retrieve the website source code from webdriver. I think the issue is that content is added to the page via JavaScript once the page has initially been downloaded from the server. When I run browser.page_source I get the source code of the page before this content was added. I want to know whether it is possible to get the source code of the page after the content loaded

Get fully rendered HTML using Selenium webdriver and Python

非 Y 不嫁゛ 提交于 2020-02-15 07:39:17
问题 I'm trying to build a web scraper in Python using Selenium webdriver but I'm unable to access the information I need when I retrieve the website source code from webdriver. I think the issue is that content is added to the page via JavaScript once the page has initially been downloaded from the server. When I run browser.page_source I get the source code of the page before this content was added. I want to know whether it is possible to get the source code of the page after the content loaded

How to wait until all network logs in generated?

丶灬走出姿态 提交于 2020-02-06 18:04:39
问题 I am using Selenium and Java for my tests. After a test completes, I download the HAR file which I later use for analyzing certain domains that exist in the page. I found that the HAR file that I download doesn't contain complete log of all the requests for that page. How do I wait until entire network traffic for a page completes before downloading the HAR file? I did try to use wait before downloading the HAR file but didn't work. Can you suggest some other ideas? WebDriverWait wait = new

clear() does not clear the textbox with selenium and python and firefox

左心房为你撑大大i 提交于 2020-02-03 10:47:52
问题 clear() does not work in this case. I am getting append after append. searchForMovie.clear() is not working... I have also tried to send CTRL + 'a' , and then the DELETE . Again all I got are just appends... for movie in allMissing: time.sleep (10) searchForMovie = WebDriverWait (driver, 10).until \ (EC.presence_of_element_located ((By.CSS_SELECTOR, "#search-text"))) searchForMovie.send_keys (movie) # click enter = WebDriverWait (driver, 10).until \ (EC.presence_of_element_located ((By.CSS

Filling out “First Name” field of a signup page

为君一笑 提交于 2020-01-30 13:18:48
问题 Problem i'm currently having is trying to fill out the First Name field out of a sign up page. I've managed to fill out the email name, and select the gender using selenium. When I try to locate the First Name element using it's Xpath, I get an selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="bb1bda44-91c9-4668-8641-4f3bbbd0c6cd"]"} error Code: import selenium from selenium.webdriver.common.by import

Filling out “First Name” field of a signup page

寵の児 提交于 2020-01-30 13:18:05
问题 Problem i'm currently having is trying to fill out the First Name field out of a sign up page. I've managed to fill out the email name, and select the gender using selenium. When I try to locate the First Name element using it's Xpath, I get an selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="bb1bda44-91c9-4668-8641-4f3bbbd0c6cd"]"} error Code: import selenium from selenium.webdriver.common.by import

How to select an option from the kendo dropdown using selenium webdriver and Java

痞子三分冷 提交于 2020-01-30 12:52:05
问题 Here is my HTML code: <ul unselectable="on" class="k-list k-reset" tabindex="-1" aria-hidden="true" id="ddlSettleMode_listbox" aria-live="polite" data-role="staticlist" role="listbox"><li tabindex="-1" role="option" unselectable="on" class="k-item k-state-selected k-state-focused" data-offset-index="0" id="18e2d509-b1e1-4588-bd2a-dcff29b45b83">Select</li><li tabindex="-1" role="option" unselectable="on" class="k-item" data-offset-index="1">Cash</li><li tabindex="-1" role="option" unselectable

Decoding Class names on facebook through Selenium

百般思念 提交于 2020-01-30 12:30:32
问题 I noticed that facebook has some weird class names that look computer generated. What I don't know is if these classes are at least constant over time or they change in some time interval? Maybe someone who has experience with that can answer. Only thing I can see is that when I exit Chrome and open it again it is still the same, so at least they don't change every browser session. So I'd guess the best way to go about scraping facebook would be to use some elements in user interface and