Reputation: 39
I want to feed values to input fields which have no name, no id or no class.
<form class="formclass">
<input type="text">
<input type="password">
</form>`
Upvotes: 0
Views: 274
Reputation: 386
Please try the following
xpath:
(//form[@class='formclass]//input)[0]
(//form[@class='formclass]//input)[1]
css:
.formclass input[type='text']
.formclass input[type='password']
Upvotes: 0
Reputation: 52695
Try XPath
//form[@class="formclass"]/input[@type="text"]
//form[@class="formclass"]/input[@type="password"]
or CSS
selector
form.formclass input[type="text"]
form.formclass input[type="password"]
Upvotes: 1