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

Does quicktest professional is unicode compatible?

511


Why do we use breakpoints in QTP?

572


Why is action split used by qtp?

550


If u r using library files (Instead of Check Points) , How do u do bitmap check ?

1445


i'm using the qtp to test to vb appliction,i wanted to get the new application's title.i didn't want to use the winAPI to get it ,i 'd like to know whether a QTP function can do it. Eg: SystemUtil.Run "C:\Program Files\.....","","","" 'run an application, and misure the application is activating,then how to get the hwn wihtout using windowns api

1486






Dis advantages of XML checkpoint ?

1572


What is object spy in quicktest professional (qtp)?

531


"What are the common constrains that we need to consider when we prepare testcases for ASP application". Thanks in Advance...

1434


in data driven testing for performing operations which method is easy from manual test data,keyword view,or from database.and why?

1348


Explain the differences between table and db checkpoints?

566


I am a new tester that needs to create an automatic script involving security questions. On a webpage I need to select a security question(which are random) from a drop down menu, and then input the answer as the last word from the security question. I have the script set-up to automatically select the first security question from the drop down. The problem I am having is trying to insert the security answer. How do I insert the security answer based on the selection from the security question?

1836


What is business process testing(bpt) in qtp?

682


How to create a standard checkpoint ?

550


Can any body please tell me the steps of keyword driven frame work in qtp. My mail is saswat445@gmail.com please send some materials on keyword driven testing in qtp. thanks a lot...

1783


I AM TRYING PORT CODE FROM WINRUNNER TO QTP AND DON'T KNOW TO HOW TO CHECK THE ERRORS. IN WINRUNNER FUNCTION RETURNS EIGHER 0 OR -1 AGAINST WHICH RESULT CAN BE MADE PASS OR FAIL BUT IN QTP I DON'T SEE FUNCTIONS RETURNING ANY VALUE. APPRECIATE IF ANYONE COULD HELP ME CONVERTING FOLLWOING WINRUNNER CODE TO QTP. set_window("Customer Service"); rc = web_obj_get_text("Summary","#2","#4",ssn,""," ",1); if (rc != E_OK) { report_msg("[GetSubscriberSummary] Could Not get subscriber SSN; rc = "&rc); myRC = rc; } else { ssn = StripBlank(ssn); if (DEBUG) report_msg ("[GetSubscriberSummary] SSN: "&ssn); }

1677