Discussion:
[selenium-users] Unable to click on Auto Suggestions - Amazon Seach
Ajeet Yadawa
2018-11-18 20:26:16 UTC
Permalink
*HI Friends,*

*I am trying to automate "Amazon Product Search". Want to click on
suggested itrems but not able to find xpath and suitable way.*

*Please suggest.*

*Refer below for reference image-*


[image: click on suggested text.png]
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/6247f766-3b02-4953-a3a7-4adc06631e9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Meenal Jain
2018-11-19 06:49:37 UTC
Permalink
HiAjeet,

You can try below solution:
1. Open page you want to test(amazon)
2.open developer tools(using F12)
3.enter your search keyword
4.press F8 To pause script execution
5.inspect the element you want. Screen with all the elements will remain on
its place.

For your case I tried.. It gave me below xpath for the first suggestion
it's showing
//div[@class='s-suggestion'][1]

Similarly if you want to capture second item from suggestions list you can
use
//div[@class='s-suggestion'][2]

Pls try these and let me know in case you face any issue.

Thanks,
Meenal

On Nov 19, 2018 09:34, "Ajeet Yadawa" <***@gmail.com> wrote:

*HI Friends,*

*I am trying to automate "Amazon Product Search". Want to click on
suggested itrems but not able to find xpath and suitable way.*

*Please suggest.*

*Refer below for reference image-*


[image: click on suggested text.png]
--
You received this message because you are subscribed to the Google Groups
"Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/selenium-users/6247f766-3b02-4953-a3a7-4adc06631e9f%40googlegroups.com
<https://groups.google.com/d/msgid/selenium-users/6247f766-3b02-4953-a3a7-4adc06631e9f%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAHd%3D%3DmLL4Kr9r%3D-0vXeDhxSVbiR4tvaxoQnLLxYrUOci9O2h3Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...