Timeline for Python & Selenium: How to get values generated by JavaScript
Current License: CC BY-SA 4.0
14 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| S May 7, 2022 at 3:04 | history | bounty ended | Community Bot | ||
| S May 7, 2022 at 3:04 | history | notice removed | Community Bot | ||
| May 3, 2022 at 19:59 | comment | added | browsermator | You'd work with this just as you would any other page. Selenium will access the DOM, which is what you are seeing in devTools. If it's being tricky even when using webdriverwaits you may have a "lazy-loading" site, where the DOM has placeholders at first, then they are populated after page load or some other event. | |
| May 3, 2022 at 18:42 | comment | added | Gui LeFlea | @SamuraiBlue which webdriver are you using with python selenium? If you're using a non-headless browser, have you tried inspecting the page in the same browser using the same credentials? Selenium should be able to get the injected HTML on the page, but there maybe something about your script implentation that's preventing the HTML from being injected into the #pos-list-body element. If you're not using a headless browser, it could be helpful to watch the script execution as you're running it, and see if you can gain additional insight from that. | |
| May 3, 2022 at 2:11 | answer | added | Asmoun | timeline score: 0 | |
| S Apr 29, 2022 at 1:59 | history | bounty started | SamuraiBlue | ||
| S Apr 29, 2022 at 1:59 | history | notice added | SamuraiBlue | Authoritative reference needed | |
| Apr 27, 2022 at 11:45 | answer | added | undetected Selenium | timeline score: 0 | |
| Apr 27, 2022 at 4:54 | comment | added | SamuraiBlue | I'm afraid that I can't show you the website because the page I ask needs login. Thank you for your comment. | |
| Apr 27, 2022 at 4:24 | answer | added | cruisepandey | timeline score: 1 | |
| Apr 27, 2022 at 3:58 | comment | added | Arundeep Chohan | What website is this from? | |
| Apr 27, 2022 at 2:43 | comment | added | SamuraiBlue |
No, the elements in HTML are always blank after loading page. But the elements in DevTools exist. So result is the same if putting a time.sleep. Thank you for your comment.
|
|
| Apr 27, 2022 at 2:12 | comment | added | M B |
Do you mean that the elements show up after the page loads? Try putting a time.sleep to wait before trying to extract elements.
|
|
| Apr 27, 2022 at 1:45 | history | asked | SamuraiBlue | CC BY-SA 4.0 |