First, sorry for my poor English. Actually, I have a script which scrapes a website to find comments in webpage, in python. Its for scrape all messages in page, but I will want scrape just last post. How to do this please? Too, I will want to find web links probably posted in last message, but a full link. Its
Tag: selenium
How to connect to remote Selenium drivers within the same docker-compose?
I ran into a urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=’chromedriver’, port=4444): Max retries exceeded with url: /wd/hub/session (Caused by NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x7fc2de559bb0>: Failed to establish a new connection: [Errno 111] Connection refused’)) While running Selenium via Python and Docker. My Connection looks like this: The docker-compose like this: Thanks in advance! Answer I solved it by changing the entrypoint of “runner” to: I
element_to_be_clickable is giving TimeoutException
for the URL I want to induce clicks on the next page button. The next page button is a <span> tag with class attribute = ‘fa fa-angle-right’. When I try the following, it gives me a TimeoutException. This doesn’t work for any page, and even the last page. Where am I going wrong ? Any help is much appreciated! Answer
document.scrollingElement is not working . Not able to scroll down for inspecting elements
Please find the aatched screenshot. and Below code is printing only first 4-5 rows which is visible in the screenshot. It is not scrolling down and inspecting element it is prining blank spaces. Same code is running succesfully without i write code written in main function outside the function. add_data.py -> Answer May be you need to scroll to each
Python and Selenium download 0 KB excel files
I have already been to this link with same question, but I cannot find an answer to it: Although my question is the same as the other question, I posted a new one with my code as well. The code successfully downloads the file but the file is 0 KB. both on the website and on my local; however, the
How to click all of the same text span by using selenium?
I try the code but only first element been clicked so I edit like this but won’t work website is http://211.21.63.217:81/ticket_online.aspx How to click all of the span text is 08/28 ? Answer See, when you did this : you must have got web element is not iterabel error. that is due to you are using find_element, try to use
Selenium select specific content with OR/AND operators – python
I am struggling with a problem in Selenium using Python. This is a dummy draft of what I have. My target is to select the button that has info=”content1″ and aria-label=”2″ I have already tried But doesn’t work and returns NoSuchElementException Would you please help me? Answer Simply put the two bracketed attribute selectors next to each other with no
Selenium Instagram Bot – Clicking the “Like” Button
I have written a program to go on the Instagram explore page, and like the first six photos. Right now, I am using this rather convoluted method to find the “Like” button. I would much rather have it formatted like I did the “click the login button” section. So far, I have tried inspecting various elements, but I cannot pinpoint
Python selenium wait until button clickable
I have a python selenium code that upload a local video and click the button, the button can be clicked when video successfully uploaded so I try with EC.element_to_be_clickable and EC.visibility_of_element_located and when the button is clickable print a simple message, but always I got the message before video upload complete. this is my code : Answer What about using
Does an XPath change if the content inside it changes?
Does the Xpath change if the content inside the XPath changes? I.e. the website changes the text in the XPath from ‘supports’ to ‘support’. Would the XPath change even if the text change or will it stay the same? Answer XPath is a syntax to locate element on the page based on it attributes like tag name, class name, id,