Thank you very much for your help!! I will read beforehand http://watir.com/support .... <http://watir.com/support> It works actually .. But i use Page Object style for writing code, something like this:
span(:find_replace_dialog_matchcase_checkbox_3,:id => 'find-replace-regex') or button(:find_replace_dialog_done_button, :name => 'done') Can i convert b.div(:class, 'modal-dialog-content').tbodys[0].text_fields[0] to style of Page Object ? среда, 13 ноября 2013 г., 19:52:29 UTC+4 пользователь johnssn написал: > > You almost never need to resort to xpath if you're using watir. Something > like this? > > b.div(:class, 'modal-dialog-content').tbodys[0].text_fields[0] > b.div(:class, 'modal-dialog-content').tbodys[0].text_fields[1] > > > > On Wednesday, November 13, 2013 3:55 AM, QOExcel > <[email protected]<javascript:>> > wrote: > Hello, All > I have to find a couple locators (textboxes).They have the same <class> so > i need xpath to find definite locator : > > <div class="modal-dialog-content"> > <table> > <tbody> > <tr> > <td class="waffle-find-replace-dialog-label"> > <label id=":j6.findLabel">Find</label> > </td> > <td> > <input class="jfk-textinput" style="width: 20em;" aria-labelledby=" > :j6.findLabel"> > </td> > </tr> > <tr> > <td class="waffle-find-replace-dialog-label"> > <td> > <input class="jfk-textinput" style="width: 20em;" aria-labelledby=" > :j6.replaceLabel"> > </td> > </tr> > <tr> > <tr> > </tbody> > </table> > </div> > > I can find <modal-dialog-content> by such request : div(:test_el1, :xpath > => '//div[@class="modal-dialog-content"]') but i can't define lower > elements through this request. What i mean actually : div(:test_el1, > :xpath => '//div[@class="modal-dialog-content"]/table/tbody/tr/td[2]') > Does anybody know solution for this? > > -- > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > [email protected] <javascript:> > http://groups.google.com/group/watir-general > [email protected] <javascript:> > > --- > You received this message because you are subscribed to the Google Groups > "Watir General" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
