Note that there are some explanatory texts on larger screens.

plurals
  1. POXPath Selector Working fine with FirefoxDriver but not working with HtmlUnitDriver
    primarykey
    data
    text
    <p>I have below code in my html page.</p> <pre><code>&lt;tr id="HL1035569648A" bgcolor="#ffffff"&gt; &lt;td rowspan="2" align="center" width="40"&gt;&lt;input name="product_id" value="1035569648" onclick="syncSA(this,document.inquiry.toggleSA);hlChecked(this,document.inquiry.product_id,2,'#ffffff');" type="checkbox"&gt;&lt;/td&gt; &lt;td rowspan="2" width="90"&gt; &lt;div id="ysop"&gt;&lt;a href="http://www.globalsources.com/gsol/I/Induction-cooker/p/sm/1035569648.htm"&gt;&lt;img class="imgborder" src="http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/pdt.static.globalsources.com/IMAGES/PDT/THUMB/648/T1035569648.jpg" alt="Induction Cooker Manufacturers" title="Induction Cooker Manufacturers" onmouseout="showPPOut();" onmouseover="showPPSummary(event,'1035569648',false,rollOvInqURL);" align="left" height="80" hspace="1" vspace="1" width="80"&gt;&lt;/a&gt; &lt;/div&gt;&lt;/td&gt; &lt;td&gt;&lt;a href="http://www.globalsources.com/gsol/I/Induction-cooker/p/sm/1035569648.htm" name="1035569648"&gt;Induction &lt;b&gt;Cooker&lt;/b&gt;&lt;/a&gt;&lt;br&gt; Induction Cooker with 50/60Hz Rated Frequency, 90 to 230V AC Input Voltages and 7.2kW Maximum Power&lt;br&gt;&lt;/td&gt; &lt;td&gt;&lt;a href="http://inductioncooktop.manufacturer.globalsources.com/si/6008838306671/Homepage.htm" title="TOPBAND Induction cookers Division"&gt;TOPBAND Induction cookers Division&lt;/a&gt;&lt;br&gt;&lt;a href="http://inductioncooktop.manufacturer.globalsources.com/si/6008838306671/Showroom/3000000149681/ALL.htm"&gt;47&amp;nbsp;products&lt;/a&gt;&lt;/td&gt; &lt;td rowspan="2"&gt;China (mainland)&lt;/td&gt; &lt;td rowspan="2"&gt; &lt;div class="space_filler"&gt;&lt;a href="javascript:actionInqSingleInqPath('/gsol/GeneralManager?&amp;amp;catalog_id=2000000003844&amp;amp;design=clean&amp;amp;language=en&amp;amp;action=GetInquireNowBasket&amp;amp;page=inquiry/InqForm&amp;amp;template=RFI&amp;amp;inqflow_path=NLI','InquireNow_KW',1035569648)"&gt;&lt;img src="http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/static.globalsources.com/gsol/en/clean/images/ICON-INQUIRE.GIF" border="0" height="13" width="55"&gt;&lt;/a&gt;&lt;/div&gt; &lt;div class="space_filler"&gt;&lt;a href="javascript:void(0);" onclick="javascript:checkIM('/gsol/GeneralManager?&amp;amp;catalog_id=2000000003844&amp;amp;design=clean&amp;amp;language=en&amp;amp;page=im/IMSelection&amp;amp;id=6008838306671&amp;amp;IMSource=productsearch',340,455,'pop',null);"&gt;&lt;img src="http://akamai.globalsources.com.edgesuite.net/f/593/3445/5d/static.globalsources.com/gsol/en/clean/images/ICON-CHAT.GIF" alt="Chat with this supplier (Login/Registration required)" title="Chat with this supplier (Login/Registration required)" border="0" height="13" width="55"&gt;&lt;/a&gt;&lt;/div&gt; &lt;/td&gt; &lt;/tr&gt;` </code></pre> <p>I want to retrieve link and description </p> <pre><code>&lt;td&gt;&lt;a href="http://www.globalsources.com/gsol/I/Induction-cooker/p/sm/1035569648.htm" name="1035569648"&gt;Induction &lt;b&gt;Cooker&lt;/b&gt;&lt;/a&gt;&lt;br&gt; Induction Cooker with 50/60Hz Rated Frequency, 90 to 230V AC Input Voltages and 7.2kW Maximum Power&lt;br&gt;&lt;/td&gt;` </code></pre> <p>I am using below XPath:</p> <pre><code>//Link: http://www.globalsources.com/gsol/I/Induction-cooker/p/sm/1035569648.htm driver.findElements(By.xpath("//tr[starts-with(@id, 'HL')]/td[3]/a"); //Summary: Induction Cooker with 50/60Hz Rated Frequency, 90 to 230V AC Input Voltages and 7.2kW Maximum Power driver.findElements(By.xpath("//tr[starts-with(@id, 'HL')]/td[3]"); </code></pre> <p><em><strong>Note: I cannot use <code>HL1035569648A</code> full <code>id</code> because there are many Table Rows having this links and all table rows has different class name but they all starts with HL.</em></strong></p> <p>This works fine with <code>FirefoxDriver</code> but it is not working with <code>HtmlUnitDriver</code>. Is anyone can help me. I am not understanding the issue.</p> <p>thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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