Hi
I am trying to click on row in table
using data set I can click on first item but I can go trogh the list if they are more rows.
@Then("^(?:I |)edit my groupLink page with data:$")
public void iEditGroupLinkWithData(List<Map<String, String>> groupLinkSetup) {
SimpleAction.runs(() -> {
new ICventUiAction() {
@Override
public String toString() {
return "Editing group-Link";
}
@Override
public void accept(ExcelTestStep excelTestStep) {
ActionType.GetRandomInteger.run("3", "Random");
DataTableReaderAdapterImpl dataTableReaderAdapter = new DataTableReaderAdapterImpl(TableClass.GLSETTINGS);
GLSettings dataToBeAdded = (GLSettings) dataTableReaderAdapter.createEntity(groupLinkSetup);
String baseURL = GlobalProperties.INSTANCE.getRegionProperty(
PKEnvVariable.URL_RESDESK.getPropertyName());
String eventId = dataToBeAdded.geteventId();
String hotelId = dataToBeAdded.gethotelId();
String meetingCode = dataToBeAdded.getmeetingCode() + "_<<Random>>";
String roomTypeCode = dataToBeAdded.getroomTypeCode();
String xpath;
String[] roomTypesArray = dataToBeAdded.getroomTypeCode().split("@@");
String GlURL = "GLEntry.action?level=event&srcpage=eventSetupQuick&event_mode=glEventSetup&eventID=" + eventId + "&hotelID=" + hotelId + "&fromTools=false";
NavigateBrowser.run(String.format("%s/" + GlURL, baseURL));
Input.run(Passkey_Events.PK_Event_GroupLink.txtMeetingCodeTest, meetingCode);
Input.run(Passkey_Events.PK_Event_GroupLink.btnSave);
Input.run(Passkey_Events.PK_Event_GroupLink.btnConfirmSave);
Input.run(Passkey_Events.PK_Event_GroupLink.btnRoomsTab);
for (int i = 0; i < roomTypesArray.length; i++) {
//Xpath to target specific checkboxes
xpath = "(//td[contains(.,'" + roomTypesArray[i] + "')])[4]";
Input.run(By.xpath(xpath), roomTypesArray[i]);
Input.run(Passkey_Events.PK_Event_GroupLink.txtMeetingCodeTest, roomTypeCode);
Input.run(Passkey_Events.PK_Event_GroupLink.chkApproveForTransfer);
Input.run(Passkey_Events.PK_Event_GroupLink.btnSave);
Input.run(Passkey_Events.PK_Event_GroupLink.btnConfirmSave);
Input.run(Passkey_Events.PK_Event_GroupLink.btnGroupsTab);
Input.run(Passkey_Events.PK_Event_GroupLink.chkApproveForTransfer);
Input.run(Passkey_Events.PK_Event_GroupLink.btnSave);
Input.run(Passkey_Events. PK_Event_GroupLink.btnGroupsConfirmChanges);
Input.run(Passkey_Events.PK_Event_GroupLink.btnConfirmSave);
}
}
};
});
}
}