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

Bug. #247

Closed ghost closed 7 years ago

ghost commented 7 years ago

I noticed a small bug.

For example, if I do this:

driver.findElementsByClassName("my element").get(0).click();

It does not work.

However, if I do this:

driver.findElementsByClassName("my element").get(0); driver.findElementsByClassName("my element").get(0).click();

It works.

This is a mistake?

hollingsworthd commented 7 years ago

Interesting. It could be a bug in this project certainly. There's a chance it's not and just the nature of the webpage being used -- either the DOM being changd between calls by Javascript running in the page or something like that. Either way it's likely caused by the particular nature of the webpage--if that can be isolated into a test case it's ideal... or the URL posted here. If you prefer you can email the URL to ops@machinepublishers.com if it's not sensitive but you don't want it publicly posted. Otherwise it's hard to know what's specifically causing this. Thanks.

ghost commented 7 years ago

@hollingsworthd It's bothering me a LOT. There's a time that works, there's a time you don't.

However, it takes a lot to get information of the page, has some configuration that improve your performance?

hollingsworthd commented 7 years ago

Without a test case to reproduce this or more to go on I don't think I can offer any more insight.