I do not understand the point in here that

the messages you are looking are all in the screen at the same time ?
or all they should appear at least one before counting ?

can you post a screensot ?

2012/8/27, Akhalesh Yadav <[email protected]>:
> Dear,
>         i want to capture all error message from my web pages using this
> code but msgbox show only 0 errors, so plz check this code whether it is
> working or not
>
> Set desc=description.Create()
> desc("micclass").value="
> webelement"
> desc("class").value="errormsg"
> 'desc("visible").value=-1
> Set errs=browser("name:=Google Accounts").page("title:=Google
> Accounts").ChildObjects(desc)
> msgbox errs.count
>
> *OUTPUT*  0    while page have more errors, bcz i am clicking on submit
> without filled any feild
>
>
> On Mon, Aug 27, 2012 at 11:28 AM, Rasim Avci <[email protected]> wrote:
>
>> Set errs=browser("name:=Google Accounts").page("title:=Google
>> Accounts").ChildObjects(desc)
>> msgbox errs.count
>>
>> thi will give your total number. what are you getting in the msgbox ?
>>
>> 2012/8/27, Akhalesh Yadav <[email protected]>:
>> > Guys m using this code but faced one problem unable to count the total
>> > no
>> > of errors.
>> >
>> > systemutil.Run "Iexplore.exe","www.gmail.com","open"
>> >
>> > Browser("Gmail: Email from Google").Page("Gmail: Email from
>> > Google").Link("Create an account").Click
>> > 'myp.link("text:=Create an account ", "Creation Time:=1").Click
>> > set myp=browser("title:=.*").page("title:=.*")
>> > myp.webedit("name:=FirstName").Set datatable("Fname",1)
>> > myp.webedit("name:=LastName").Set datatable("Lname",1)
>> > myp.webedit("name:=GmailAddress").Set datatable("Gmailaddress",1)
>> > myp.webedit("name:=Passwd").Set datatable("pwd",1)
>> > myp.webedit("name:=PasswdAgain").Set datatable("Conpwd",1)
>> > myp.weblist("name:=BirthMonth").select("May")
>> > myp.webedit("name:=BirthDay").set "25"
>> > myp.webedit("name:=BirthYear").set "1987"
>> > myp.weblist("name:=Gender").select("Female")
>> > myp.webedit("name:=RecoveryPhoneNumber").Set "9888777887"
>> > myp.webedit("name:=RecoveryEmailAddress").Set "
>> [email protected]"
>> > myp.webcheckbox("name:=HomepageSet").Set "ON"
>> > a=inputbox("enter captcha")
>> > myp.webedit("name:=recaptcha_response_field").Set a
>> > myp.weblist("name:=CountryCode").Select("India (भारत)")
>> > myp.webcheckbox("name:=TermsOfService").Set "ON"
>> > myp.webbutton("name:=Next step").click
>> >
>> >
>> > Set desc=description.Create()
>> > desc("micclass").value="webelement"
>> > desc("class").value="errormsg"
>> > 'desc("visible").value=-1
>> > Set errs=browser("name:=Google Accounts").page("title:=Google
>> > Accounts").ChildObjects(desc)
>> > msgbox errs.count
>> > For i=0 to errs.count
>> >     m=errs(i).getroproperty("innertext")
>> >     datatable("Errors",1)=m
>> >     errs(i).highlight
>> >
>> > Next
>> >
>> > --
>> > Akhalesh yadav
>> > +919555717928
>> > +919310680659
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > "QTP - HP Quick Test Professional - Automated Software Testing"
>> > group.
>> > To post to this group, send email to [email protected]
>> > To unsubscribe from this group, send email to
>> > [email protected]
>> > For more options, visit this group at
>> > http://groups.google.com/group/MercuryQTP?hl=en
>> >
>>
>>
>> --
>> Rasim Avcı
>>
>> --
>> You received this message because you are subscribed to the Google
>> "QTP - HP Quick Test Professional - Automated Software Testing"
>> group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/MercuryQTP?hl=en
>>
>
>
>
> --
> Akhalesh yadav
> +919555717928
> +919310680659
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>


-- 
Rasim Avcı

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to