History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WTR-235
Type: Bug Bug
Status: Resolved Resolved
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: Unassigned
Reporter: Manish Harkut
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Watir

Xpath.exist returns different results in Watir and Firewatir.

Created: 11/Aug/08 10:30 AM   Updated: 31/Oct/08 04:36 PM
Component/s: FireWatir
Affects Version/s: None
Fix Version/s: 1.6.0

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: WinXP Prof SP2, Ruby 1.8, Watir 1.5.6 and Firewatir 1.2.0


 Description  « Hide
iIndex = 1
$ie.div(:xpath,'/html/body/div[18]/div[3]/div[2]/div[7]/div/div/div[' + iIndex.to_s + ']').exists?

The Watir and FireWatir returns different values for the above statement.
If FireWatir it retuen true which is right and test aare executed properly However in Watir even if when the objects exists it returns false and test fails.


 All   Comments   Work Log   Change History      Sort Order:
Bret Pettichord - 13/Aug/08 12:57 PM
There is not enough information here to reproduce. Can you provide a page?

Bret

Manish Harkut - 14/Aug/08 08:07 AM
Sorry for not providing the complete details

You can use this page to check the actual XPath results.

ht tp : / / gro ups. shi k sha . co m / i nd e x.p hp / ne t w ork / Ne t work / index / col lege / 2 / Med ical

Manish Harkut - 14/Aug/08 08:13 AM
As per my observation this is working fine in FireWatir. However it does not work in Watir.

Added this comment because in the bug Component/s: 'FireWatir' is mentioned. In my knowledge this is a problem with Watir.


Bret Pettichord - 31/Oct/08 04:36 PM
Here is the script that I used. Using Watir/Firewatir 1.6.1

require 'watir'
Watir::Browser.default = 'ie'
br = Watir::Browser.new()
url = 'http://groups.shiksha.com/index.php/network/Network/index/college/2/Medical'
br.goto url
puts br.div(:xpath,'/html/body/div[18]/div[3]/div[2]/div[7]/div/div/div[1]').exists?

I tried this with both IE and Firefox and it showed "false" both times.