Thursday, 15 October 2015

Error Handling

2 types of error handling:

1. Expected Error
2. Unexpected Error

on error resume next


if you want to receive error then write following line:
On error goto 0
to resume error handling again write below mentioned line:
on error resume next

RECOVERY SCENARIO
resource-> recovery scenario manager
new scenario-> welcome(next)->
1. define trigger events-popup window-object state change(proprty change),application crash, text run error
2. specify recovery operation
3. ch
4. enter descriptive information about events

Environment Variable

Environment Variable is like global variable

1. Built in or system defined
2. User Defined
2.1 internal-we can change its value at runtime
2.2 external-we cannot change its value at runtime

file-setting-env

Environment: 
File >Setting->Environment
·         Builtin- systemDefined- (By Default) e.g  test directory, OS,OS version,Product (msgbox Environment.Value (“OS”))
·         User Defined
->Internal->we can change value at runtime
->External->cannot change value at runtime
msgbox Environment.Value ("int")
Environment.Value("int")="zellax"

msgbox Environment.Value ("int")

Descriptive Programming

Descriptive Programming

1.Static
Object repository will work before descriptive only
descriptive will not work before object repository
browser("name:=")

2.Dynamic: when object is dynamic
systemutil.Run "iexplore","http://localhost:81"
Set oDesc= description.Create
oDesc("type").value="text"
oDesc("html tag").value="input"
'oDesc("micclass").value="Link"
Set oCollection=browser("name:=vtiger.*").Page("title:=vtiger.*").ChildObjects(oDesc)
'msgbox oCollection.count
oCollection(0).set "admin"

Date Function

date only date
now date and time
dateadd add date
datediff delete date

Data Table

Data Table:

1. Global .Set datatable.Value("Lname",dtlocalsheet)
2. Local  .Set datatable.Value("Lname",dtglobalsheet)


global setting-file-setting-run-run on all rows


Runtime:
datable.Import(path,source,destination)
datable.ImportSheet()

Manually:
Right Click-Import Excel File

Checkpoints

Checkpoints: Start Recording - got Insert-checkpoints

1. Standard Checkpoint:
1. Page Checkpoint
2. Image Checkpoint
3. Table Checkpoint

2. Text Checkpoint
3. TextArea chexkpoint - window based application
4. Bitmap Checkpoint
5. Database Checkpoint
6. Accessability Checkpoint options-web-advance-accesability check- w3c standards
7. XML Checkpoint from resources
8. XML Checkpoint from application

Wednesday, 19 August 2015

Actions:

Actions:

Actions helps testers to divide scripts into groups of QTP statements called actions. Actions are similar to functions in VBScript, however there are few differences. By Default QTP creates a test with 1 action.