0

I had to make chrome browser headless after which when I try to see the html code by executing below lines

ChromeOptions options = new ChromeOptions();
options.addArguments("--headless");
ldriver = new ChromeDriver(options);
String stored_Text = ldriver.getPageSource();
System.out.println(stored_Text);

Output is:

<html><head></head><body></body></html>

Because of which when I write xpath after making the page headless I'm getting no such element exception

Is there a way for me to circumvent this problem. Please help

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.