I am using win app driver tool to automate my application. I am automating a combo box selection . To click the combo box and the name. But here my GUI has 4 combo box is there, in that 2 box has same name. so second box click action is not performing.

This is the code for first combo box, firstly it will click the combo box and select the name.

WebElement comboplayer=AppSession.findElementByAccessibilityId("CmbDefPlayer");   
                             comboplayer.findElement(By.name("DEF Rebound")).click();

This is the second combo box selection, here it won’t click becasue of having same name.. when I command the fisrt code, it is showing nosuch element exception.

 WebElement comboplayerdef=AppSession.findElementByAccessibilityId("cmbdefrebound");   
                                 comboplayerdef.findElement(By.name("DEF Rebound")).click();

How do I select the name from the second box ?

First combo box selection

second combo box

Source link https://sqa.stackexchange.com/questions/35074/how-to-select-a--if-both-having-same-name


Please enter your comment!
Please enter your name here