I used this xpath locator: //table/following::div[text()='value']/preceding::span[@class='x-grid-checkcolumn'][1]"}
on the page i scripted as:
public void selectTestPlan(String value) {
String[] path = {ChatTestingPagePath2.ChatTestManagement.TEST_PLAN_CHECKBOX[0].replace("{value}", value),ChatTestingPagePath2.ChatTestManagement.TEST_PLAN_CHECKBOX[1]};
click(path);
}
but it always failed, it says that it was unable to locate the element.
Hoping for your response.
Thank you!
However when changing the value in specific value like this:
//table/following::div[text()='Testing']/preceding::span[@class='x-grid-checkcolumn'][1]"}
and use the page as:
public void selectTestPlan() {
String[] path = {ChatTestingPagePath2.ChatTestManagement.TEST_PLAN_CHECKBOX[0], value),ChatTestingPagePath2.ChatTestManagement.TEST_PLAN_CHECKBOX[1]};
click(path);
}
it will passed the automated test.