Testing Web Forms

How to apply eValid to functional testing of web applications.

Testing Web Forms

Postby spain » Wed Jun 02, 2010 10:32 am

When testing webforms, what's the easiest way to programmatically?

1. match an element in the current browser window by it's id.

2. check if it's innerText contains a certain string?

I tried to figure it out by the code generated from the ui test builder, but I couldn't even figure out how to get the current browser window.

Thanks.
spain
 
Posts: 1
Joined: Wed Jun 02, 2010 9:58 am

Re: Testing Web Forms

Postby eValid » Tue Jun 15, 2010 6:10 am

spain wrote:When testing webforms, what's the easiest way to programmatically?

1. match an element in the current browser window by it's id.

2. check if it's innerText contains a certain string?

I tried to figure it out by the code generated from the ui test builder, but I couldn't even figure out how to get the current browser window.

Thanks.

From the question's phrasing it appears you are using the eValid structural testing methods on this particular case.

You've actually got it pretty close to right, but as you have found, the US test builder (nee the test recording engine) doesn't necessarily know about the level of detail down to the ID tag value.

Instead, your best bet is to "record from life" and then hand-modify the script.

For example, where you have a FollowLink, the replacement is a sequence:

IndexSet 0 -- to start at the top of the page
IndexFindElement -- to locate the required ID tag
IndexElementClick -- to click on the DOM element you've just found.

Or, if you wish, on that current page, you can use ValidateSelectedObjProperty to validate the valud of a property with the name you specify, e.g. innerText.

If you check in the eValid documentation you'll find a number of these standard passages already worked out for you.

eValid Technical Support
eValid
 
Posts: 2392
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to Desktop and Mobile Device Functional Testing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons