rufus v0.8.1
This version, released on Dec. 10, 2013, adds a flag to the config.yml which indicates how to do a lookup on some read-only elements of a view.
config.yml has a new value it can read
optimized: trueWith this value set to true, rufus asks selenium for the current page source and then parses the return value for the needed information. When this value is set to false, rufus asks Selenium to find an element using find_element(:key, 'value'). The returned element is then asked for information.
Example: Consider getting whether or not a view is visible.
Optimized
- Ask selenium for page source
- Parse page source
- Look for the element in the page source and check the value for its "visible" property.
Non-optimized
- Ask selenium to find the needed element using find_element(:key, 'value')
- If the call to find_element returns an element, e, call e.displayed? to get the value for the visible property.
It seems that parsing the page source for the needed data is faster than the call to find_elements. The RufusApp automated tests took a little over 30 minutes to run with the optimized flag set to false. The same suite of of tests took a little over 21 minutes to run with the optimized flag set to true.
Currently the optimized calls are for some read-only elements of a view. So calls to exists?, displayed?, enabled? and class can be discovered in an optimized fashion.