I am getting error message unable to locate element even it is selected from DD
My Element is dynamic.
I have tried this way,
static class GroupCount {
private static int i = 1;
static void inc() {
i++;
}
static int get() {
return i;
}
}
String xpathGroupSelect = "//*[@id='groupPicker" +
GroupCount.get() + "-list']//div[contains(concat(' ','x-combo-list-item', ' '), 'x-combo-list-item') " +
"and contains(text(),'"
+ name + "')]";
WebElement group = driver.findElement(By.xpath(xpathGroupSelect));
if (xpathGroupPick.isDisplayed()) {
WebDriverWait wait = new WebDriverWait(driver, 30);
wait.until(ExpectedConditions.elementToBeClickable(group)).click();
group.click();
WorkflowAction.addApprovers("Compliance");
I am trying to find 'compliance' element
Here is my html code:
> <div class="x-combo-list-inner" id="groupPicker1-list" style="width:
> 218px; margin-bottom: 8px; height: 81px;"> <div
> class="x-combo-list-item" style="">APPROVAL</div> <div
> class="x-combo-list-item" style="">Compliance</div> <div