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();
ldriver = new ChromeDriver(options);
String stored_Text = ldriver.getPageSource();

Output is:


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


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.