Xpath is not working..

35 views
Skip to first unread message

javel...@gmail.com

unread,
Jan 31, 2018, 11:03:48 PM1/31/18
to Selenium Users
Hey guys I am having trouble to run this Xpath.. is there something wrong with following formula
Thanks!

//input [@class= ‘input_fields  piereg_validate[required] input_fields’]


Gokul Krishna

unread,
Feb 1, 2018, 5:22:35 AM2/1/18
to seleniu...@googlegroups.com
did you try using //input[contain(@class,'input_fields')]   ?

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/2fdfd6f9-b3b9-40a2-8b2c-1420b209af41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aleksandr Melnikov

unread,
Feb 1, 2018, 12:11:30 PM2/1/18
to seleniu...@googlegroups.com
Have you tried testing in chrome console? $x(<your xpath here>)

-Aleksandr Melnikov

On Thu, Feb 1, 2018 at 2:08 AM, Gokul Krishna <gkri...@gmail.com> wrote:
did you try using //input[contain(@class,'input_fields')]   ?
On Thu, Feb 1, 2018 at 8:48 AM, <javel...@gmail.com> wrote:
Hey guys I am having trouble to run this Xpath.. is there something wrong with following formula
Thanks!

//input [@class= ‘input_fields  piereg_validate[required] input_fields’]


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.

Ripon Al Wasim

unread,
Feb 2, 2018, 6:29:32 AM2/2/18
to seleniu...@googlegroups.com
Try with another attribute instead of class

Ripon Al Wasim

unread,
Feb 2, 2018, 6:31:35 AM2/2/18
to seleniu...@googlegroups.com
You can try the following way?

driver.findElement(By.className("input_fields  piereg_validate[required] input_fields")).click();

On Thu, Feb 1, 2018 at 9:18 AM, <javel...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages