Is there any way to identify textbox from its inner text?
Html elements have attributes
in belowe html snippet input is tag
and all highligted are called as attributes
you can use any attribues with tag name to create xpath
like in your case you can create xpath as
//input[@placeholder=’Type Departure City‘]
other attributes can also be used to create xpath like
i hope your doubt is clear now.
Ankit Thanks for reply,
here i want to sendkeys to textbox by finding it through inner text
for example, if you check http://www.akbartravels.com/ there is also textbox asking Type Departure Location here, so i want to write common script for different url and detect textbox and execute my script, can this be done using selenium webdriver?
once again thanks for helping!!