Selenium/Python: When I am click on the particular link text, then I am navigated to particular page. I just want to confirm that I navigated to right link.
Asked
Active
Viewed 98 times
-1
-
compare the link you clicked and the the url to which you are navigated to – Himanshu Poddar Aug 19 '22 at 08:04
1 Answers
0
I assume this is for a site that gives random redirects when a link is clicked?
Calling driver.current_url
after switching pages will give you the URL of the page you've navigated to. You can then compare that to whatever page you were supposed to navigate to.

Thorium
- 191
- 1
- 14