Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

I spent hours on this, I'm obviously nubie but..how to get current url? #271

Open
humblerme opened this issue Nov 20, 2019 · 1 comment
Open

Comments

@humblerme
Copy link

'page.url' only returns the last url 'page.goto' navigated to, but this may not be the current url the browser is on ( I may have navigated to another url manually.)

how do I get the actual current url?

I would very much appreciate the very code that I can..you know..copy and paste (nubie here). Thank you and..thanks again.

@ghost
Copy link

ghost commented Nov 21, 2019

url = await page.evaluate('window.location.href', force_expr=True);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant