On Flipkart site - https://www.flipkart.com/
I am entering "laptop" in the Search Bar
Now I want to click on the fifth suggestion whatever it is, here in this case it is laptop table.
How can I find it's xpath (locator) as on opening the console - suggestor gets closes automatically?
Since you haven't shared your code trials nor you have mentioned which programming language you use, I assume it is PYTHON.
Below is the XPath expression which should work for you:
Note:
[5]
- refers to fifth dropdown suggestion itemWorking code in Python: