Forum Discussion

prekar's avatar
prekar
Occasional Contributor
4 years ago

The script runs perfectly if executed alone, but fails when it is joined together

Hi All, I have wriiten a script to select colors/options for various dropdown fields as below. When i execute each field separately, it opens the dropdown box and selects the required option but whe...
  • prekar's avatar
    prekar
    4 years ago

    Hi All,

    So i found out the root cause of the issue. Since all the drop down fields have same values, when it selects a value from the first drop down field, it stores that field's dom values or bounday values and though it opens the second drop down, it searches for the values in first drop down and since it couldn't find it, the test gave me out of the bounds error.

    Therefore, I made my xpath element more absolute(teels it in which dropdown, it should look for the values) and it resolved the issue.

    Hope it helps.