This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix exists? which was incorrectly returning true in some cases
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.
- Loading branch information