watirways's People
Forkers
ezeetesterwatirways's Issues
Locators - Special handling for frames/iframes
Add a section for elements/situations where the basic locator rules may not apply. The big one is the handling of frames/iframes, which need to be explicitly mentioned.
Locators - frame no longer includes iframes in Watir-Webdriver
Watir-Webdriver was switched to explicitly differentiate frames from iframes. The element type methods will need to be updated accordingly.
Re-organize to use book parts
Leanpub books support a "parts" section, which basically gives another level to break the book down.
The initial thought is that instead of having chapters like "Locating an Element - Basics" and "Locating an Element - Relationships", we can switch to:
- Locating an Element (a part)
- Basics (a chapter)
- Relationships (a chapter)
Locators - Finding the html element
The html element cannot be found with browser.html
, which returns the html of the page. A different locator needs to be used such as browser.element(:tag_name => 'html')
.
I had originally written a post about this - http://jkotests.wordpress.com/2012/11/23/get-attribute-values-of-the-html-element/.
Locators - Handling of nested tables
Add a section for handling nested tables - ie using trs
vs rows
and tds
vs cells
.
We should include the performance notes for when not using a nested table - ie blog post http://jkotests.wordpress.com/2012/09/25/nested-tables-trs-vs-rows-and-tds-vs-cells/.
Collections - Number of matching elements
Add an example for counting the number of matching elements - ie using .size
or .length
.
Collections - Performing an action on each element
Add a section on iterating over a collection of elements.
Start with the basics of using each
.
Then we can go into other examples such as:
- Using other enumerable methods such as
map
- Using the short-cut for blocks - such as
.map(&:text)
- Clicking each link. We would want to discuss how to iterate through a serious of links that navigate to another page and therefore need to be re-located each time. We might also want to consider scenarios where the links cause content to change asynchronously. I recall a situation where we had to click the links from the bottom up instead of top down.
- Collecting several items into say an array that we export to CSV.
Element existence section has extra heading
The Element Existence section has the text:
Element#exists? checks if the element is in the DOM (or HTML). Element#visible? checks if the element can be seen by the user, but throws an exception if the element is not in the DOM. Element#present? is the same as Element#visible? except that it returns false, instead of an exception, when the element is not in the DOM.
ConclusionWhile the three methods are definitely different, I think, at least from my experience, that you should typically be using Element#present?.
There is an extra "Conclusion" text that must have been copied from the original blog post.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.