ajax-element-locator-factory

How to implement AjaxElementLocatorFactory through Selenium and Page Factory?

﹥>﹥吖頭↗ 提交于 2019-12-08 01:57:46
问题 I've used Pagefactory to set up all of my pages in Selenium. The thing is the test are dynamic in that some elements only exist in some of the test. From m understanding AjaxElementFactory works like this: PageFactory.initElements(new AjaxElementLocatorFactory(driver,5), this); @FindBy(id="ctl00_DefaultContent_RbIndividual") WebElement OwnershipIndividual; public void sendString(String stuff){ OwnershipIndividual.sendKeys(stuff); } But if the element OwnershipIndividual is not located in 5