MachinePublishers / jBrowserDriver

A programmable, embeddable web browser driver compatible with the Selenium WebDriver spec -- headless, WebKit-based, pure Java
Other
809 stars 143 forks source link

Javascript not being processed #294

Open Tyvain opened 6 years ago

Tyvain commented 6 years ago

I open an issue here: https://stackoverflow.com/questions/45792203/jbrowserdriver-element-not-found?noredirect=1#comment78547821_45792203

seems like tthe javascript is not being processed. Do you have any idea why?

Tyvain commented 6 years ago

code to reproduce:

public static void main(String[] args) throws InterruptedException {

    JBrowserDriver driver = new JBrowserDriver(Settings.builder()
            .ajaxResourceTimeout(10000)
            .ajaxWait(10000)
            //.blockAds(true)
            //.headless(true)
            //.ignoreDialogs(true)
            .requestHeaders(RequestHeaders.CHROME)
           .ssl("trustanything")
           // .timezone(Timezone.PACIFIC_AUCKLAND)
            .userAgent(UserAgent.CHROME)
            .build());

    driver.get("https://dtube.video/login");
    System.out.println(driver.getPageSource());
    WebElement email = driver.findElementByName("username");
driver.quit();
}
hollingsworthd commented 6 years ago

Thanks for the code to reproduce! I'll take a look.

lisheng007 commented 6 years ago

maybe timeout

imsuperman0920 commented 5 years ago

I tried the code, it was still not processed, any idea?