how can i pass two parameter to xpath

I have XPath with two parameters. but when I call it to script how can I pass parameters?

I passed as below

_WebUI.click(findTestObject(‘Object Repository/Page_GS_RoleAndPermission/chk_PermissionsWithParent’,[(‘parentPermission’):permissionCombination[0]],[(‘childPermission’):permissionCombination[1]]))
_
Note: “permissionCombination” is an array

but it giving an error

Error : No signature of method: com.helper.common.CommonFunction.findTestObject() is applicable for argument types: (java.lang.String, java.util.LinkedHashMap, java.util.LinkedHashMap) values: [Object Repository/Page_GS_RoleAndPermission/chk_PermissionsWithParent, …]

Please help on this.
Thanks.

twoParamentXPath.PNG

hmmm i think:

WebUI.click(findTestObject('Object Repository/Page_GS_RoleAndPermission/chk_PermissionsWithParent',[('parentPermission'):permissionCombination[0],('childPermission'):permissionCombination[1]]))
1 Like

Andrej Podhajský said:

hmmm i think:

WebUI.click(findTestObject('Object Repository/Page_GS_RoleAndPermission/chk_PermissionsWithParent',[('parentPermission'):permissionCombination[0],('childPermission'):permissionCombination[1]]))

Thanks, Andrej… it is working fine. :slight_smile: