vba - Selenium - pulling data from a website table assign to variable -


I am trying to drag a value and a header (string) from a website, but to use selenium Unable to find element.

My code - I used Firebug to get XPath and this is what it has been defined:

  // * [@ id = "DimensionForm Double Dial Marker in the form of dim  [1] / Table [1] / table / TB / tr [3] / TD [3]   

code

  String Marker = As Selenium Meet ("value" /*[@id="DimensionForm"]/p[1]/table/tbody/tr[]]/td[3END_LINK").getAttribute ("value))   

HTML code

  & lt; form id = "DimensionForm" name = "validate" action = "dimension" method = "post" & gt; & Lt; div style = "margin-top: 7px" & gt; & Lt; / Div & gt; & Lt; P & gt; & Lt; Width of table = "100%" cell area = "0" limit = "0" cellpadding = "0" class = "element" & gt; & Lt; TR & gt; & Lt; Td> & Amp; Nbsp; & Lt; / Td> & Lt; TD class = "formattenobug" colspan = "6" align = 'right' & gt; Regional dimensions & amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; (Area & amp; nbsp; a) & lt; Span class = 'quote' & gt; & Amp; Nbsp; Front of the & lt; / Span & gt; 25.24 & lt; / TD & gt; & Lt; / TR & gt; & Lt; Tr align = "true" & gt; & Lt; td class = "tablerowlightgreen" width = 10> & amp; Nbsp; & Lt; / Td> & Lt; th class = "formatted" width = 250 aligned = "left" & gt; Property & lt; / Th & gt; & Lt; th class = "formattil" width = 50> check & lt; / Th & gt; & Lt; th square = "formattil" width = 75> gt; Front & lt; / Th & gt; & Lt; th class = "formattil" width = 75> center < / Th & gt; & Lt; th class = "formattil" width = 75> Left & lt; / Th & gt; & Lt; th class = "formattil" width = 120> right  gt; & Lt; th class = "formattil" width = 100> Total & lt; / Th & gt; & Lt; td square = "tablelayer" width = 50> and & nbsp; & Lt; / Td> & Lt; Td square = "tablaro" & gt; & Amp; Nbsp; & Lt; / Td> & Lt; / TR & gt; & Lt; Tr align = "right" nowrap & gt; & Lt; TD & gt; & Nbsp; & Lt; / TD & gt; & Lt; td square = "table" align = "left" & gt; & Lt; Strong & gt; Property & amp; Nbsp; This is & lt; / strong> & Lt; / TD & gt; & Lt; Td class = "table" & gt; + & lt; / Td> & Lt; Td class = "table" & gt; 10 & lt; / Td> & Lt; Td class = "table" & gt; 12 & lt; / Td> & Lt; Td square = "table" & gt; & Lt; Strong & gt; 12 & lt; / strong> & Lt; / Td> & Lt; Td class = "table" & gt; & Lt; Strong & gt; & Lt; Font class = "front" & gt; 100 & lt; / Font & gt; & Lt; / strong> & Lt; / TD & gt; & Lt; Td class = "table" & gt; 120 & lt; / Td> & Lt; TD & gt; & Nbsp; & Lt; / TD & gt; & Lt; TD & gt; & Nbsp; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt;    

You have incorrect quoted quote:

  Selenium .findElementByXPath ("// * [[id =" dimension form "] / p [1] / table / tdi / tr [2] / td [3]")   

Meaning:

  selenium.findElementByXPath ("// * [[id = 'dimension form'] / p [1] / table // tr [2] / td [3]") < / code>  

Note the single-quotes in the second line!

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -