String searchKey = searchUser.replace("@werner.com", "");
WebElement dynamicActionOption = driver.findElement(By.xpath("(//table[@id='carrier-details-table']//tbody//tr)//td[1]//ancestor::tr//td[4]//a[contains(text(),'" + searchKey + "')]//ancestor::tr//td[7]//button[@id='action-options'][@aria-haspopup='true']"));
System.out.println("Actionoption Expanded dialogue: " + dynamicActionOption.getAttribute("aria-expanded"));I am now using this as a part of implementation; I couldnt add this in pagefactory @Findby as it uses a constant xpath cant send variable.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/86fde1b5-882e-48b7-ac63-924417679d84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
String searchKey = searchUser.replace("Variable", "");
WebElement dynamicActionOption = driver.findElement(By.xpath("(//table[@id='details-table']//tbody//tr)//td[1]//ancestor::tr//td[4]//a[contains(text(),'" + searchKey + "')]//ancestor::tr//td[7]//button[@id='action-options'][@aria-haspopup='true']"));
System.out.println("Actionoption Expanded dialogue: " + dynamicActionOption.getAttribute("aria-expanded"));
This is written as a part of the class file not in PageFactory @FindBy uses only contact Xpath.
On Tuesday, April 16, 2019 at 11:25:19 PM UTC-5, Mallichetty Hemanth Kumar wrote: