Posted: 5 Dec 2016 23:21 EST Last activity: 7 Dec 2016 9:45 EST
Unable to test the dropdown functionality using Selennium automation scripts
We are using Selennium to have automation scripts for our application . But it fails when we have to move the cursor from one dropdown list to another. It randomly chooses the cell and moves the control there,due to which we are facing problem in executing the script. We are not using "Test ID" as parameter instead we are using id/name as parameter. Can anyone help on the same
Pega - 7.1.8
Framework- Selenium with TestNG - Java
Selenium Standalone jar version-2.52 jar
Chrome driver jar version- chromedriver-2.21 jar
OS-Windows 7 (32 bit)
Browser- Chrome 53
Thanks in advance
***Updated by Moderator: Vidyaranjan | Included SR number and tagged srexists***
Can you please let me know what is the actual scenario here? Like, are you trying to move the cursor from one drop-down to another with moveToElement method (or) trying to select values from individual drop-downs. If possible povide a snaphot of code or video recording where the test is failing. It can be helpful. Coming to data-test-id support, we are extending the support to drop down in latest version of Pega. It might be available in few months.
As updated by Shruthi, just to add below points on the reported behavior:
Reported behaviour: While using automation tool i.e. Selenium for testing application (built on Pega 7.1.8), if the page has two related auto-complete control(second control’s values depend on first control’s values), the sequence of control over fields is found to be random as compared to sequential during manual entry.
Actual behaviour: Sequence of control over field is random.
Expected behaviour: Sequence of control over field to be sequential.
Workaround: For testing purpose, they need to add code to change the sequence of control over field.
The behaviour is observed only while using automation tool. The use case works as per expected behavior when accessed manually.
With Selenium, the reported behaviour is observed only if the UI page has two related auto-complete controls. If the UI page has other controls or even non-related auto-complete control then the reported behaviour is not observed.
The order of elements should work same irrespective of chrome launched manually or through selenium. The order of values in second autocomplete should only depend on order of the data retrieved(with Report Definition or Data page). I tried in my local environment with Autocomplete Chaining and it works fine.
If you can help us following information
1.How first autocomplete(what are the actions configured on changing value etc,)
2. How the second autocomplete is populated based on first one(like Report Definition or Datapage or List). We can try the same configuration here and see, if the issue is reproduciable.