Quantcast
Channel: Dave Copeland :ruby:
Viewing all articles
Browse latest Browse all 613

Article 3

$
0
0

Let's say you have a list of widgets and you want to find a particular one to edit by clicking an edit link.

Your test has to be coupled to your HTML in some way, so you do

li = find(`li[title=‘${widget.name}’]`)
link = li.find(`a[title='Edit Widget’]`)

if `find` fails, you don't get a useful way to debug the situation, at all. You usually have to either print out the HTML right before the call (assuming your testing framework makes it easy), or run it in a real browser


Viewing all articles
Browse latest Browse all 613