Open DrCrunk7098 opened 1 year ago
Just a follow up on this:
ListOfWebElementFacades elements = findAll(zoneWithString(zoneName)); // returns empty
List
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