<div dir="ltr">Thanks so much Chris for the information.I would try using css preferably or xpath if css doesnt work.<div><br></div><div>Would update definitely if it works.</div><div><br></div><div>Thanks,</div><div>Jagori</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 20, 2014 at 1:40 AM, Chris McMahon <span dir="ltr"><<a href="mailto:cmcmahon@wikimedia.org" target="_blank">cmcmahon@wikimedia.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Jagori, <div><br></div><div>We discussed this a little last week, and now that you've written this report, I remember why we made the Links test work this way. </div>
<div><br></div><div class="gmail_extra">
<div class="gmail_quote"><div class="">On Mon, May 19, 2014 at 6:31 AM, jagori samajdar <span dir="ltr"><<a href="mailto:jagori79@gmail.com" target="_blank">jagori79@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><br></div></div></div>Certain elements like span which have been defined as below in visualeditor_page.rb<br><br>span(:linksuggestion, text: "<a href="http://www.example.com" target="_blank">http://www.example.com</a>")<br>


</div><div>same for:<br>span(:newpage_linksuggestion, text: "DoesNotExist")<br><br></div>I was wondering if suppose I want to reuse these elements ,would I have to define a separate element since identification is by text and changing text might cause the other existing tests to fail.<br>


<br></div>But wouldn't adding another element lead to redundancy.<br></div></div></div></div></div></div></div></div></blockquote><div><br></div></div><div>These linksuggestion elements are spans whose only identifier other than their text is class="oo-ui-labeledElement-label".  The problem is that this identifier is also used for many many other elements in the page, so figuring which of the spans with class="oo-ui-labeledElement-label" is the correct span for the test was challenging. Ultimately we decided that text was the most reliable identifier, and that means that each of the links to be tested needed its own page element, and also its own step in the steps.rb file.</div>

<div><br></div><div>So if you follow the existing convention for the links test then yes, you would need to add a new element in visual_editor_page.rb and also a new step in links_steps.rb. </div><div class=""><div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div><div><div>Also,would identifying the element by xpath help instead of by text?<br></div>probably then we could reuse the element.<br><br></div>I know css identification is not supported for certain types but I checked the documentation on cheezy/pageobjects.<br>


<br></div>xpath seemed to be supported.</div></div></div></div></blockquote><div><br></div></div><div>I would prefer css over xpath.  If you could find a reliable way to identify the particular elements containing the link text by way of css or xpath, that would be a really good improvement to the existing test.  It might be challenging.</div>
<span class="HOEnZb"><font color="#888888">
<div><br></div><div>-Chris </div></font></span></div></div></div>
<br>_______________________________________________<br>
QA mailing list<br>
<a href="mailto:QA@lists.wikimedia.org">QA@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/qa" target="_blank">https://lists.wikimedia.org/mailman/listinfo/qa</a><br>
<br></blockquote></div><br></div>