Thursday, January 07, 2010
Sahi in "Nagios - The Practice Book: Open Source Monitoring in the Enterprise"
There is a fairly detailed section on monitoring web applications using Nagios and Sahi in Gerhard Lausser's new book (in German): "Nagios - The Practice Book: Open Source Monitoring in the Enterprise", ISBN: 978-3-8273-2800-7
Tuesday, January 05, 2010
Web automation does not need XPaths
Really.
Learn this web automation nursery rhyme today!
XPaths are evil,
XPaths are fickle,
Developers touch code,
And the testers are in a pickle!
Have you ever used XPaths and found that it needs non-trivial amount of effort in maintenance?
Especially testers, who do not have the time or energy to get XPaths right, stay away from XPaths. Use ids or names or any other attribute the web element provides.
Sahi, since it is aimed at testers rather than developers, does not encourage use of XPath, which means that you can use it if you want, but the controller will never show you XPaths.
So how does Sahi handle something like this?
Simple, Sahi uses the _in and _near APIs.
So to access the edit link of Your name, use
_link("Edit", _near(_cell("Your name")))
Like wise
_link("Edit", _near(_cell("My name")))
_link("Edit", _near(_cell("His name")))
Visit us again or subscribe to this blog for more tips on web automation ...
Learn this web automation nursery rhyme today!
XPaths are evil,
XPaths are fickle,
Developers touch code,
And the testers are in a pickle!
Have you ever used XPaths and found that it needs non-trivial amount of effort in maintenance?
Especially testers, who do not have the time or energy to get XPaths right, stay away from XPaths. Use ids or names or any other attribute the web element provides.
Sahi, since it is aimed at testers rather than developers, does not encourage use of XPath, which means that you can use it if you want, but the controller will never show you XPaths.
So how does Sahi handle something like this?
| My name | Edit | |
| Your name | Edit | |
| His name | Edit |
Simple, Sahi uses the _in and _near APIs.
So to access the edit link of Your name, use
_link("Edit", _near(_cell("Your name")))
Like wise
_link("Edit", _near(_cell("My name")))
_link("Edit", _near(_cell("His name")))
Visit us again or subscribe to this blog for more tips on web automation ...
Subscribe to:
Posts (Atom)
