This has only been tested on ruby 1.8. I'm not sure what we want to do for the newer versions of ruby?
This issue might have been fixed in the future version of watir. However, I believe this diff makes sense because: a) it allows us to remove our custom hack b) it helps the few people on 1.6 c) it helps make sure this doesn't break in future versions Note: i'm not totally sure how other watir versions deal with unittests. On one hand they should all live in one place. On the other hand, if things like syntax are not compatible, somebody will have to manage the multiple copies :(
… Rails 3. Closes http://jira.openqa.org/browse/WTR-474
…atir with Rails 3
…ail when run with rake test. Made sure rake test works.
We have a bug in the way elements are located. Given the following page: <html> <body> <div id="foo"> <div id="bar"> </div> </div> </body> </html> And the following test cases: 1. Browser.div(:id, 'foo').exists? => true 2. Browser.div(:id, 'bar').exists? => true 3. Browser.div(:id, 'foo').div(:id, 'bar').exists? => true 4. Browser.div(:id, 'bar').div(:id, 'foo').exists? => false 5. Browser.div(:id, 'something').div(:id, 'else').exists? => true 6. Browser.div(:id, 'foo').div(:id, 'hello').exists? => false Case 5 incorrectly returns true. This diff fixes this bug. Note: there might be a more elegant way of fixing things, but I'm not super familiar with the jssh syntax. Feel free to suggest a better fix.
I tested this on MacOs Firefox 10.6.5. Given the following code (served with Content-Type: application/xhtml+xml): <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <a href="http://www.foo.com/correct">lowercase link</a> <A HREF="http://www.foo.com/incorrect">uppercase link</A> </html> I made sure that b.link(:text, "lowercase link").exist? returns true. Note: in this case, b.link(:text, "uppercase link").exists? returns false. I think this is the right behavior, but this can be revised.
…ead of rescue-ing exceptions
…t_until and #wait_while renamed Wait methods to .until and .while
- add Watir::Wait module with methods like #wait_until, #wait_until?, #wait_while and wait_while? - make these methods available to Watir::IE and Watir::Firefox classes - add Watir::Element #present?, #when_present, #wait_until_present and #wait_while_present
…level rakefile and each gem's gemspec have been updated.
…assertions that check contents of all select lists
the same code is tested in the next line
(should it output anything or not, defaults to true) used not to output anything in unit tests