-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Hi, I am not sure if that's intended, I am using your library for Amplify components and when I set explicit timeout via
shadow.setExplicitWait(20, 1);
I noticed it always waits for all 20 seconds.
The cycle:
for(int i = 0 ; i < explicitWait && !visible;) {
try {
Thread.sleep(pollingTime * 1000);
element = (WebElement) executerGetObject(String.format("return getObject(\"%s\");", cssSelector));
fixLocator(driver, cssSelector, element);
visible = isPresent(element);
i = i + pollingTime;
} catch (InterruptedException e) {
}
}
Doesn't end because visible always evaluated "false".
var isVisible = function isVisible(object) {
var visible = object.offsetWidth;
if(visible>0) {
return true;
} else {
return false;
}
};
When I check offsetWidth from Chrome Dev Tools I see that it is equal to 0.
I am not sure what that offsetWidth is about, but please consider either doing >= 0
or using something else to detect visibility.
Metadata
Metadata
Assignees
Labels
No labels