Note that there are some explanatory texts on larger screens.

plurals
  1. POSelenium to read the content from website
    text
    copied!<p>I have some contents like this in a webpage.</p> <pre><code> Appname Description Price Part Number Validity App1 some desc1 25 JH32 30 App2 some desc2 250 PB36 180 App2 some desc3 20 QL76 10 App3 some desc4 50 KQ3J 30 </code></pre> <p>My application is like after starting the app, user will enter an app name in which selenium will search for that particular appname in this site. What I want beyond this step is that:</p> <p>Whatever appname I search for, selenium must retrieve the values corresponding to that fields such like selenium should retrieve the values of Price, Validity and Part Number fields. I tried selenium to retrieve the value by using attributes like classname, tagname, id etc. But all the fields have the same attribute for each of these fields, which makes selenium confusing to select the field.</p> <p>Only thing I could find different is innertext which I can't use here since I can't predict what the user will give as the appname in the searchbox at the start of my application.</p> <p>My sample html code, which I got once I clicked a field(price) in my site. I used firebug for this. and i am using firefox browser for selenium..</p> <pre><code>&lt;td height="100%" class="ms-vb-title"&gt;&lt;table height="100%" cellspacing="0" surl="" uis="512" cid="0x0100DFF86ACBE51BE549AA56639FCC32D7E0" ctype="Item" ms="0" csrc="" hcd="" couid="" otype="0" icon="icgen.gif||" ext="" type="" perm="0x1b03c4312ef" dref="sites/SoftwareDev/IAG/IAS/Lists/Unify Parts" url="/sites/SoftwareDev/IAG/IAS/Lists/Unify%20Parts/27_.000" id="27" ctxname="ctx1" onmouseover="OnItem(this)" class="ms-unselectedtitle"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="100%" class="ms-vb"&gt;&lt;a target="_self" onclick="GoToLink(this);return false;" href="/sites/SoftwareDev/IAG/IAS/Lists/Unify%20Parts/DispForm.aspx?ID=27" onfocus="OnLink(this)"&gt;MindMeister - 251-500 Pupil License&lt;img height="1" border="0" width="1" alt="Use SHIFT+ENTER to open the menu (new window)." class="ms-hidden" src="/_layouts/images/blank.gif"&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;img width="13" alt="" style="visibility:hidden" src="/_layouts/images/blank.gif"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt; </code></pre> <p>How can I achieve what I said?Any comments would be really appreciated..</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload