Selenium Java to get domain name, URL, and page title using JavascriptExecutor
KW.java
Output
Domain Name - kodingwindow.com URL - https://kodingwindow.com/testapp/ Page Title - Kodingwindow's TestApp
What Next?
Selenium Java to generate alert and navigate to another page using JavascriptExecutor
Selenium Java to scroll down the page at the bottom using JavascriptExecutor
Selenium Java to take screenshots using TakesScreenshot interface
Advertisement