Rich Internet Applications (RIA) Web Testing

12
Automating and Testing Advanced Web Technologies

description

Rich Internet Applications (RIA) Web Testing

Transcript of Rich Internet Applications (RIA) Web Testing

Page 1: Rich Internet Applications (RIA) Web Testing

Automating and TestingAdvanced Web Technologies

Page 2: Rich Internet Applications (RIA) Web Testing

Advanced Web Technologies

Typical advanced (non-HTML) technologies include:

AJAX Sun Java Applets Adobe Flash Applets MicroSoft Silverlight ActiveX Elements

One Solution: DirectScreen

DirectScreen simulates real user mouse and keyboard activity.

Works with every advanced technology.

Page 3: Rich Internet Applications (RIA) Web Testing

Sending text

The DirectScreen CLICK command can send keystrokes to the web browser via the CONTENT= attribute:

In addition to regular text, it can send special keys:

ENTER       {ENTER} TAB      {TAB} DEL      {DEL} BACKSPACE   {BACKSPACE} LEFT      {LEFT} RIGHT      {RIGHT}

Example:

DS CMD=CLICK X=200 Y=263 CONTENT="hello{ENTER}"

Page 4: Rich Internet Applications (RIA) Web Testing

Winclick Text Handling Screenshot

Page 5: Rich Internet Applications (RIA) Web Testing

Comparison CLICK & DirectScreen CMD=CLICK

The DirectScreen commands operate on the visible part of the web page only, just a like human would do with a mouse. Thus DS CMD=CLICK X=1 Y= 400 will always click on the specific part of the browser window. If the web page is scrolled, the click hits another part of the web page.  

The HTML based CLICK commands operates on the complete browser web page (HTML). So CLICK X=1 Y= 980 will always click on the specific HTML element at this position of the page regardless whether the element is currently visible in the browser window or not. So whether or not the web page is scrolled, a specific X/Y combination always hits the same part of the web page.  

HTML based clicks can be used to position a page correctly for DirectScreen!

What is the difference between DirectScreen (DS) and the other TAG/CLICK commands?

Page 6: Rich Internet Applications (RIA) Web Testing

Scroll into View Screenshot - Start

Page 7: Rich Internet Applications (RIA) Web Testing

Scroll into View Screenshot – Page Scrolled

Page 8: Rich Internet Applications (RIA) Web Testing

Scroll into View Screenshot – Text Entered

Page 9: Rich Internet Applications (RIA) Web Testing

Scroll into View - Macro

VERSION BUILD=6120323 TAB T=1 TAB CLOSEALLOTHERS URL GOTO=http://www.123flashchat.com/ WAIT SECONDS=2SIZE X=559 Y=465 TAG POS=1 TYPE=FONT ATTR=TXT:Pure<SP>Java<SP>Chat<SP>Server DS CMD=CLICK X=203 Y=383 CONTENT= DS CMD=CLICK X=203 Y=383 CONTENT=It<SP>works!WAIT SECONDS=2

Record a TAG command below chat window.

Page 10: Rich Internet Applications (RIA) Web Testing

Simulate Mouse Over Events

DirectScreen automatically records and simulates mouse-over events:

DS CMD=MOVETO X=200 Y=263 

You can use this "mouse over" event to automate Javascript based menus. The same technique applies to mouseover and mousemove events in Java, Silverlight or Flash/Flex applets.

Page 11: Rich Internet Applications (RIA) Web Testing

Automating and Testing Flash Applets

DirectScreen can also be used to automate web pages with Flash-Applets.

You can also send text to Flash applets

Typical problem; Flash applets may take an unknown time to load and initialize, but do not signal their status to “outside world”:

Solution 1: Use WAIT SECONDS=<x> statement. Can be inserted automatically by using “Record at original speed” setting. Works, but can not be used for performance testing due to artificial delay.

Solution 2 (Better): Use IMAGESEARCH to check if applet is loaded completely. Works well for performance testing Flash applets.

Page 12: Rich Internet Applications (RIA) Web Testing

Demo DirectScreen

Real world examples: Javascript Event Mouseover: http://www.telecom.co.nz Java chat: http://www.parachat.com

Flash chat: http://www.123flashchat.com/

Java: http://www.stockapplets.com/currency-flaconverter/

File upload: http://validator.w3.org/file-upload.html

Test pages at iopus.com:

http://www.iopus.com/iim/demo/v6/flash/

http://www.iopus.com/iim/demo/v6/javascript-menu/

http://www.iopus.com/iim/demo/v6/file-upload.htm