You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using version 3.4.3 of Serenity and find that the findAll method most of the time doesn't find any elements where the find() does find one with the same Target. I have tried grabbing a static instance of the WebDriver at startup and setting it in super() to the instance of that WebDriver. It will then begin working and later stop again. I have also seen in some cases the OnStage.actorInTheSpotlight() within the findAll() throws a NullPointerException.
Has anyone seen this and do you have some sort of solution for it. Code snippet is below:
// This is a valid selector
public static Target zoneWithString(String zoneName) {
return Target.the("Zone name " + zoneName).located(By.cssSelector("[class^=_feature_fulfillment]")).containingText(zoneName);
}
ListOfWebElementFacades elements = findAll(zoneWithString(zoneName)); // returns empty
WebElementFacade elements = find(zoneWithString(zoneName)); // returns an WebElementFacade
The text was updated successfully, but these errors were encountered:
Just a follow up on this:
ListOfWebElementFacades elements = findAll(zoneWithString(zoneName)); // returns empty
List elements = BrowseTheWeb.as(OnStage.theActorInTheSpotlight()).findElements(By.xPath(""//*[contains(text(),'" + zoneName + "')]")); // returns array with elements
Also, saving an instance of the WebDriver someplace else and using that instance to access findElements finds all the elements desired on the page.
I am using version 3.4.3 of Serenity and find that the findAll method most of the time doesn't find any elements where the find() does find one with the same Target. I have tried grabbing a static instance of the WebDriver at startup and setting it in super() to the instance of that WebDriver. It will then begin working and later stop again. I have also seen in some cases the OnStage.actorInTheSpotlight() within the findAll() throws a NullPointerException.
Has anyone seen this and do you have some sort of solution for it. Code snippet is below:
// This is a valid selector
public static Target zoneWithString(String zoneName) {
return Target.the("Zone name " + zoneName).located(By.cssSelector("[class^=_feature_fulfillment]")).containingText(zoneName);
}
ListOfWebElementFacades elements = findAll(zoneWithString(zoneName)); // returns empty
WebElementFacade elements = find(zoneWithString(zoneName)); // returns an WebElementFacade
The text was updated successfully, but these errors were encountered: