Assignment 6 Xpath, question


I’ve managed to work everything out except one part, the xpath to the drop down lists. So the google doc needs to be filled in with “Where are you in your rpa journey?”. I’ve tried the inspect window anc copying the xpath, but it doesn’t work.

I’ve looked at the instructions:

Sample XPath expressions that will help you, but I can’t figure this out. How can I deal with xpaths for drop down choices?

//content[contains(., ‘Actively’)]
//input[contains(@aria-label, ‘Company’)]


The Xpath which might help you click on the

“Where are you in your rpa journey?”


and the xpath for selecting the four listed options uisng the index value starts from 1 to 4 which you can choose using loop

//*[@role=“listbox”]/div[2]/div[@tabindex="-1"][index value from 1 to 4]


Hope it helps :slight_smile:

1 Like

Thanks for your reply aravindhan_mr!

Does this work for mouse click actions? Didn’t get the xpath to work in a left click mouse action. :confused:

@ErikW I think in this case you can use Xpaths copied from Chrome.

Try using //*[@id="mG61Hd"]/div/div[2]/div[2]/div[7]/div[2]/div[1]/div[2] to open the drop-down and //*[@id="mG61Hd"]/div/div[2]/div[2]/div[7]/div[2]/div[2]/div[3] to click on the option (Actively implementing RPA now).

1 Like

Yes, works! Thank you!

1 Like