Sunday 15 July 2012

html - Extracting a value from webpage element with selenium, fiebug, xpaths -


I'm trying to remove the value displayed in an element (drop down box) on the webpage using xpaths. I have a firebug and xpath checker installed in Firefox and I'm trying to look like this:

  & lt; "Id =" text " Read-only = "Read-only" & gt;   

Apologies I'm not really allowed to share what I am working, but it is jist

I value values ​​(value = "Thursday 20 June ") in the string so that I can parse it for the date. But I'm not able to correct xpath. The number of times in my code is the same as

  text = @ driver.find_element (: xpath = & gt; "// * [@ id = \" dateTxt \ "])) < / Code>  

If I do some text on it, then the text is assigned.

If more information is required, please require it, this is my first day Working with xpaths.

hmm .. you can try the following:

  @driver.find_element ("CSS", "input # date text"). Attribute ("value") # => "Thursday 20 Ju "Driver @fid_lement (: xpath," // input [@id = 'dateTxt'] "). Attribute (" value ") # = & gt;" Thursday 20 June "  

See the page below and

No comments:

Post a Comment