Tarun
November 2, 2017, 5:13pm
1
Unable to click drp down even when xpath created correctly,reason i say so when i pasted xpath in chrome,i see xpath detects drop down oranization unit,but when i run on katalon ,i get error unable to read xpath,even i tried putting elay of seconds but no resolution.
Tried with Select by index and click test ibject but both times i get same error as xpath not found
Here is xpath
//select[@class=‘form-control ng-pristine ng-invalid ng-touched’ and @id=‘organizationUnit’]
Here is DOM
Communicationseng childEngineeringNon Opsorg@testSignalsSupporttest@enggtest@non ops
<!---->
<!---->
</select>
Error i got
11-02-2017 11:06:01 AM - [INFO] - Finding Test Object with id ‘Object Repository/CRUD Employee/Page_User Screen/Click OrgUnit’
11-02-2017 11:06:01 AM - [INFO] - Checking object
11-02-2017 11:06:01 AM - [INFO] - Checking index range
11-02-2017 11:06:01 AM - [INFO] - Converting range parameter ‘4’ to index array
11-02-2017 11:06:01 AM - [INFO] - Range parameter ‘4’ is converted to index array [4]
11-02-2017 11:06:01 AM - [INFO] - Checking timeout
11-02-2017 11:06:01 AM - [INFO] - Finding web element with id: ‘Object Repository/CRUD Employee/Page_User Screen/Click OrgUnit’ located by ‘By.xpath: //select[@class=‘form-control ng-pristine ng-invalid ng-touched’ and @id=‘organizationUnit’]’ in ‘30’ second(s)
11-02-2017 11:06:32 AM - [FAILED] - Unable to select option by index ‘4’ of object ‘Object Repository/CRUD Employee/Page_User Screen/Click OrgUnit’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/CRUD Employee/Page_User Screen/Click OrgUnit’ located by ‘By.xpath: //select[@class=‘form-control ng-pristine ng-invalid ng-touched’ and @id=‘organizationUnit’]’ not found)
11-02-2017 11:06:32 AM - [END] - End action : selectOptionByIndex
11-02-2017 11:06:32 AM - [FAILED] - Test Cases/ManualMode/ManualModeTestCase FAILED because (of) Unable to select option by index ‘4’ of object ‘Object Repository/CRUD Employee/Page_User Screen/Click OrgUnit’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/CRUD Employee/Page_User Screen/Click OrgUnit’ located by ‘By.xpath: //select[@class=‘form-control ng-pristine ng-invalid ng-touched’ and @id=‘organizationUnit’]’ not found)
11-02-2017 11:06:32 AM - [END] - End Test Case : Test Cases/ManualMode/ManualModeTestCase
Here is drop down
want katalon to click Engineering.JPG
Tarun
November 2, 2017, 5:14pm
2
Here is DOM
Communicationseng childEngineeringNon Opsorg@testSignalsSupporttest@enggtest@non ops
<!---->
<!---->
</select>
Tarun
November 2, 2017, 11:24pm
3
Got the solution from udemy instructor Rahul ,used descendants in xpath ,actually aplication is built using angular 2 and Rahul videos helped ,here is expression
//md-dialog-container[@role=‘dialog’]/descendant::select[position()=1]