I am trying to load an HTTPS URL which works fine with the FirefoxDriver
, but when I use HTMLUNIT Driver, I'm getting below error when trying to access the first element on the webpage.
org.openqa.selenium.NoSuchElementException: Unable to locate element
When I use webDriver.getCurrentUrl()
, I got the page URL saying "about:blank" and webDriver.getPageSource()
produces empty HTML content (with HTMLUNIT). I have done a lot of extensive research into this and have already tried these suggested techniques:
- HTMLUNIT with no proxy
- webClient.getOptions().setInsecureSSL(true)
- Using the IP address in the URL instead of the DNS name
I want to eventually run this test on Jenkins, so have tried various HTTPS proxy and port settings on Jenkins to no prevail. If anyone has any suggestions on how to resolve this issue, it would be greatly appreciated.