Writing Xpaths

閲覧: 124 回
最初の未読メッセージにスキップ

techi...@gmail.com

未読、
2015/11/17 16:10:152015/11/17
To: Selenium Users
Team,

Is there any good online references to learn on writing xpaths? like writing generic paths instead of hard coding using ids



Ex: below is generic xpath searching for text with different patterns

/*[contains(text(),'ABC:')]/following::input[@type='text'][1] | //*[contains(text(),'ABC:')]/descendant::input[@type='text'][1] | //*[contains(text(),'ABC?')]/following::input[@type='text'][1] | //*[contains(text(),'ABC?')]/descendant::input[@type='text'][1] | //*[normalize-space(text())='ABC']/following::input[@type='text'][1] | //*[normalize-space(text())='ABC']/descendant::input[@type='text'][1] | //form/descendant::input[@type='text' and not( //*[contains(text(),'ABC:')]/following::input[@type='text'][1] | //*[contains(text(),'ABC:')]/descendant::input[@type='text'][1] |


thanks,

Moises Siles

未読、
2015/11/17 19:19:402015/11/17
To: seleniu...@googlegroups.com
Please take a look on these links related to css, you should consider to use css instead of xpath



Regards

--
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-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/6c18c4f6-568b-49e8-bd4e-a758e9ed6234%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

MWQA

未読、
2015/11/18 8:26:332015/11/18
To: Selenium Users

Mukesh otwani

未読、
2015/11/21 4:54:022015/11/21
To: Selenium Users

SantoshSarma

未読、
2015/11/23 5:54:582015/11/23
To: Selenium Users

gorants 456

未読、
2015/11/23 10:29:332015/11/23
To: seleniu...@googlegroups.com
Thank you all for your valuable inputs.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/ciV3wih_v1w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.
全員に返信
投稿者に返信
転送
新着メール 0 件