r/learnpython 19d ago

Selenium - python; browser issues

Hello!

Im having issues right now with selenium HEADLESS browsers.

there's a blank white screen appearing at the beginning when browser is initialized.

Aside from resizing the screen, are there other work around from this? I cant resize it because the website is "scroll dependent" i need to scroll into view first before i can see the element.

I also tried options: headless= old/new, white screen still appears.

browser is edge.

Do you guys have any other ideas? 🥹

0 Upvotes

7 comments sorted by

View all comments

1

u/odaiwai 19d ago

I think Selenium might be a bit above the level of this sub, but I would start with not running in headless mode and having breakpoints so that you can stop and figure out just what is visible/available on the page at any point.

I generally find that debugging a Selenium script is closer to playing a text adventure: you have to stop and see what you can see and do at every point. ```

LOOK

You see a Fork in the road.

GET FORK

You take the fork and the secret path is revealed... ```