Community Page
- blog.ashmind.com Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- Interesting post. Appreciate it as I have seen something new now. Can I use this info on my blog using the direct link to your blog? Thanks in advance
- Well I had crash I think, and that was related to the fact that text was not set -- it required at least "" to be provided. But they have fixed it since, so now everything should work...
- Well, I drop a TextEditor component onto my form, and everhthing crashes. I suppose there is some 'proper' way to use it, but what I would really love is an example, because I could find...
- Ok, what exceptions are you getting? They might have broken something since the version I downloaded, or I could have occasionally set some options that is required by it to work correctly.
- Hi, I saw your post on StackOverflow regarding use of AvalonEdit, so I ended up downloading it and playing with it a bit. Unfortunately, after an hour of exception after exception, I gave up. So I...
Jump to original thread »
The WatiN framework is quite cool, but it lacks two important things.First one is searching by CSS selectors, or, at least, classes.Find.ByCustom(”className”, “X”) is way too ugly. Or am I missing something?
The second (more import ... Continue reading »
The second (more import ... Continue reading »
1 year ago
The UATs are meant to be written from the user's perspective. The tests should read that way and reflect what a user would actually do, including how they themselves would verify that an action was successfully completed. The users might even be able to read and understand what the test is trying to do. When you start getting under the hood and fiddling with javascript directly from the test, then it gets further away from being a user test. The user certainly won't be calling javascript to verify that an action they took really did affect the state of the page.
Hitting the javascript also makes the test fragile because it is too tied to the implementation details which make it harder (well just more annoying really) when you want to change the implementation. Why should the (state-based) test care that certain javascript code was called, so long as the end result is that something on the page reflected the expected outcome. With ajax web app testing, this does tend to require some waits, but typically you can get it to wait for a specific expected value to appear or change to happen (i.e. wait for your ajax progress indicator to 'stop' instead of an arbitrary 3000 ms).
When I find myself (instinct) starting down this path, I step back and evaluate what is missing in the ui that is forcing the test to pop the hood. Usually all it needed was a visual indicator to the user that probably should have been there in the first place. Not always. But usually.
1 year ago
But what I was writing this time was closer to JS unit tests — something like "changing the selected value in a combo box should change some property of a global object on the page".
Basically I wanted to fix fragility of my javascript and didn't want to do it with more javascript. Even if WatiN would have to call up the browser for each test fixture.
1 year ago
I recently added the code from Ayende to WatiN. Now I read your code and it looks even better. Is it OK to include this in WatiN?
Jeroen van Menen
lead developer of WatiN
1 year ago
1 year ago
Newbie here. How do I get the WatIN document object to pass and what string code to need to send in.
Thanks,
Gerald
1 year ago