can any one tell me what is syntax error in line

msgexist=Browser("title:=Gmail: Email.*").Page(
"title:=Gmail: Email .*").WebElement(innertext=&msg).exist


'code **************

Call login("lal="," " )
wait(5)
Call errormsg("Invalid email address. [?]" )

Function errormsg(msg)
msgexist=Browser("title:=Gmail: Email.*").Page(
"title:=Gmail: Email .*").WebElement(innertext=&msg).exist
if msgexist then

Reporter.ReportEvent micPass,"enter valid username or pwd
",msg
else
Reporter.ReportEvent micFail, "entered valid uname and
pwd",msg
end if

End Function

Answer Posted / pavani prasad

Function errormsg(msg)

if Browser("title:=Gmail: Email.*").Page(
"title:=Gmail: Email .*").WebElement(innertext=&msg).exist
then
Reporter.ReportEvent micPass,"enter valid username or pwd
",msg
else
Reporter.ReportEvent micFail, "entered valid uname and
pwd",msg
end if

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about the test fusion report of quicktest professional?

534


What is use of object spy?

614


How to write business scripts using object repository with different scenarios

1389


How to do call a output parameter from one action to another action??/

1872


How should I click on the right click menu objects When I trying to add the object properties to the OR.It is showing only Window(Window).Not all the objects of the window. Also while recording I found No script. How to solve this>.

1540






how to download mercury qtp9.2 ny internet ?

2964


we add library file used in test via settings or through "ExecuteFile" command. when we implement framework do we make common library file and load the same for all the test cases execution?

1582


Is QTP Supports SWT applications? If yes, can you write a sample script for opening a new package in eclipse.

3014


Dear sir, i want to perform a QTP automated testing for mechancial engineering software like msc adams, msc nastran this softwares will help for mechanical engineering design analysis>> i know oad runner win runner, test director, QTp>> but i dont know how to use for automation

1586


PLEASE TELL ME WHEN DO YOU USE THE OBJECT SPY AT RUN TIME

5957


i am a begnner so am learning Error handling :tried using Recovery manager didnt work i want to be able to handle errors , e.g. if while running the test the folwoing does not show up then how can i use the If then else and goto next step in the test, as in many scenarios it does not show up Browser("The Shopping Channel -").Page("The Shopping Channel -_8").Image("easy pay").Click

1469


What is quicktest professional window?

565


how to test Web application using QTP software

1570


hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]

1462


In QTP TEST DIRECTOR COMBINATION WHAT IS THE PURPOSE OF TEST DIRECTOR? In Somebody says to store test cases and design test cases.?ok fine , but In test director 5.0 , QTp not launching. what u do?

1492