Find all links / pages on a website
urls = document.querySelectorAll('a'); for (url in urls) console.log(urls[url].href);
Find all links / pages on a website
urls = document.querySelectorAll('a'); for (url in urls) console.log(urls[url].href);
How to find all links in the page
All the link TagName should be "a".
I locate the webelements starts with tagname "a".
I also use driver.findElements instead of driver.findElement since the
list of webelements will return.
List list = driver.findElements(By.tagName(“a”));
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us