Skip to main content
23 events
when toggle format what by license comment
Jul 16, 2017 at 19:12 comment added alecxe @SMth80 no problem! Just to not "pollute" the comments here - could you please create an SO questions with details about the code you are executing and the stacktrace of the error you are getting. Thanks! Please throw me a link here as well.
Jul 16, 2017 at 15:31 comment added SIM Hi sir alecxe! I thought that I should give it a try once again and bam!! it worked for the first time flawlessly meeting the expectation. However, i could not make it work when i tried the second, third----- time. As it worked in my first try, I suppose there should be any technical problem out there somewhere. Anyways, in your spare time, please give it a look if it is possible to fix it permanently. Thanks a lot.
Jul 16, 2017 at 15:25 vote accept SIM
Jun 15, 2017 at 16:40 comment added SIM Dear sir alecxe, in your spare time I suppose you wanna take a look into the problem described here cause along with several programs you are an expert on selenium as well. "stackoverflow.com/questions/44560727/…"
Jun 12, 2017 at 15:13 comment added alecxe Let us continue this discussion in chat.
Jun 12, 2017 at 14:42 comment added alecxe @SMth80 well, the problem described there on SO is clear - you are finding a link, getting an attribute and then navigate to the link from the current page. Then, after you are done processing the link, you are trying to get the next link, but you are already on a different page. That's why I noted that it's important to get the list of links first - before processing them..hope it is clear..
Jun 12, 2017 at 13:48 comment added alecxe @SMth80 no problem, I guess the streaming nature of the page affects the behavior of this webdriver test automation script. Does adding a time.sleep(5) before getting the links help? (not the best solution, of course - more like a workaround until we can think of a better way to handle it) The problem is that I cannot reproduce the issue..
Jun 12, 2017 at 13:42 comment added SIM Thanks sir, for your answer. I've just checked with your updated code. Getting the same error again. Here is the link to see the error: "dropbox.com/s/iswkg2aii2r7nyh/Execution%20Error.txt?dl=0"
Jun 12, 2017 at 13:30 comment added alecxe @SMth80 I've tried to make the code work and it actually worked for me almost as is - the only changes I made was the initial "login" step - navigated to a "login" page and changed the locators of the input fields. Please re-check. Thanks.
Jun 12, 2017 at 13:29 history edited alecxe CC BY-SA 3.0
added 66 characters in body
Jun 11, 2017 at 12:14 comment added cat That Jack Diederich video is one of my all time favourites, I show it to Java people all the time ;D
Jun 11, 2017 at 4:41 comment added SIM Nope, sir. I didn't do anything to your code. I'm just waiting for the time you will be free and take a look. Thanks sir.
Jun 11, 2017 at 0:32 comment added alecxe @SMth80 ah, have you modified the code I've posted by any chance? It is important to first grab all the links and only then process them..
Jun 10, 2017 at 21:53 comment added SIM Sir alecxe, console indicates line 21 which is:"links = [link.get_attribute("href") for link in driver.find_elements_by_css_selector(".stream-item-header a.js-user-profile-link")]".
Jun 10, 2017 at 21:21 comment added alecxe @SMth80 no problem, let's fix it - on which line does it fail? (I'll be afk for a bit)
Jun 10, 2017 at 21:16 comment added SIM This is the very message I'm getting. " raise exception_class(message, screen, stacktrace) selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document". Forgive my ignorance.
Jun 10, 2017 at 21:11 comment added alecxe @SMth80 I've added a wait before grabbing the links - might help - if you meant by "breaks" that it could not find the links to follow (with no errors). Thanks.
Jun 10, 2017 at 21:10 history edited alecxe CC BY-SA 3.0
added 174 characters in body
Jun 10, 2017 at 21:04 comment added alecxe @SMth80 thanks, yeah, we keep stumbling upon each other on multiple SE forums :) Thanks for the good question! How does it fail?
Jun 10, 2017 at 20:58 history edited alecxe CC BY-SA 3.0
added 392 characters in body
Jun 10, 2017 at 20:57 comment added SIM Omg!! Who did I get response from!! It's always a great pleasure to have you in the loop sir, alecxe. I just executed your code. However, it breaks when it hits the line containing "links = [link.get_attribute("href") for link----". I suppose you wanna take a look. Thanks again sir.
Jun 10, 2017 at 20:49 history edited alecxe CC BY-SA 3.0
added 155 characters in body
Jun 10, 2017 at 20:43 history answered alecxe CC BY-SA 3.0