opencharles / charles

Java web crawling library
BSD 3-Clause "New" or "Revised" License
32 stars 9 forks source link

Added WebDriverWait to findElement by tagname #95

Closed SherifWaly closed 7 years ago

SherifWaly commented 7 years ago

PR for #92

SherifWaly commented 7 years ago

@amihaiemil The tests passes when I use ChromeDriver locally but with phantomJs the tests fail. I've tried to add WebDriverWait as the error happens when calling driver.findElement(By.tagName("body")) at LiveWebPage as I see that the driver times out before finding the element. Is phantomJs too slow to reach links for example at the second page?

amihaiemil commented 7 years ago

@SherifWaly Yes, it might be the case...

SherifWaly commented 7 years ago

@amihaiemil So should I change it to ChromeDriver (what would be the driver path in this case?)

amihaiemil commented 7 years ago

@SherifWaly No, that's not an option. It won't run on the server since there is no graphics there, it has to be a headless browser. Let's leave it like this for now. We have a bigger issue, anyway: https://github.com/opencharles/charles/issues/96 ... probably will do the switch in the near future, when I have more time :)