How do I find locator for a search box from this HTML code? I tried all the possible ways but no luck.
Asked
Active
Viewed 64 times
-5

undetected Selenium
- 183,867
- 41
- 278
- 352

Amanulla SK
- 1
- 5
-
1Can you share some code where you are unable to proceed? – anurag Jan 06 '21 at 10:26
-
1Please do not post the HTML as image post it as formatted text so community members will be able to copy it possibly into an xpath tester tool or other. – Bence Kaulics Jan 06 '21 at 10:51
2 Answers
0
There are a bunch of options:
XPath = "//input[@placeholder='Enter a question']"
CSS = "[type='search']"
ID = "rc_select_1"

Villa_7
- 508
- 4
- 14
0
To locate the element you can use either of the following Locator Strategies:
Using
css_selector
:input.ant-input.ant-input-lg[placeholder='Enter aquestion']
Using
xpath
://input[@class='ant-input ant-input-lg' and @placeholder='Enter aquestion']

undetected Selenium
- 183,867
- 41
- 278
- 352