Here is the code i am using please use yourown user name and password for 
facebook for a facebook login

Dim bro,url

bro="iexplore"
url="http://www.cadillac.com/2013-cts-v-sport-coupe.html";
systemutil.Run bro,url
'page.sync
wait 10
i=0
Set mypage=browser("title:=.*").page("title:=.*")
mypage.Sync
While mypage.WebElement("html id:=share","index:=0").Exist
wait 3

'print   mypage.Link("name:=Send").getroproperty("innertext")
   mypage.WebElement("html id:=share","index:=0").click
  wait 2
Set mypage1=browser("creationtime:=0").page("title:=.*")


Set desc=description.create
 desc("micclass").value="WebElement"
 desc("class").value="social facebook"
 set obj=mypage1.childobjects(desc)
' msgbox obj.count
obj(0).click

'  mypage1.Link("name:=Send","index:="&i).getroproperty("innertext")
'  mypage1.Link("name:=Send","index:="&i).click

i=i+1
wait 3
Set mypage2=browser("title:=Facebook").page("title:=Facebook")

If mypage2.Exist Then
mypage2.WebEdit("html id:=email","name:=email").Set"Anyusernameyouhave"
    mypage2.WebEdit("html id:=pass","name:=pass").Set"pleaseseturpassword"
mypage2.WebButton("html id:=u_0_1","name:=Log In").Click

End If
'
Set mypage3=browser("title:=Facebook").page("title:=Facebook")
       msgbox mypage3.WebElement("class:=_b--").GetROProperty("innertext")
'
   Set desc=description.Create
   desc("micclass").value="WebElement"
   desc("class").value="uiButton uiButtonConfirm uiButtonLarge"

 set obj=mypage3.childobjects(desc)
' set obj=browser("title:=Post to Your Wall").page("title:=Post to Your 
Wall").childobjects(desc)
' msgbox obj.count
 obj(0).Click

Wend

On Thursday, July 18, 2013 8:17:56 AM UTC-4, sreedhar wrote:
>
> Use the window handle of the browser; these are unique to each browser.
>
> Sreedhar Mallipeddi 
> 8133340327
>
> On Jul 18, 2013, at 6:13 AM, Ajay Rana <[email protected] <javascript:>> 
> wrote:
>
>
> Can you verify how many browser are identified there using below code?
>  
> For x = 0 to 2
>  Print "Browser CreationTime::" & x & "--" & Browser("creationtime:=" & 
> x).GetROProperty("title")
> Next
> Thanks,
> Ajay
> On Thu, Jul 18, 2013 at 2:18 AM, <[email protected] <javascript:>>wrote:
>  
>>
>> But is it still not been able to identify if the login page is present or 
>> not. 
>> So i am running a loop. Where application is sharing vehicle information 
>> on a fb.
>> When you have a clear cache window ie for the first time login page 
>> displays and it enter the user name and password and click ok. and then 
>> show the share screeen
>> now once it share it close the facebook interface
>> it will come back on my application click on a different share with 
>> facebook button
>> now this time login window will not display as window is cached during 
>> run time. 
>> It will go share view share
>>  can if login page is present still looks for login page even if i put 
>> creation time 1 or 0 
>>
>> On Wednesday, July 17, 2013 4:05:47 PM UTC-4, Akhalesh Yadav wrote:
>>
>>> Agree with asiqahmad replied.
>>>  On 18 Jul 2013 01:19, <[email protected]> wrote:
>>>
>>>> ** 
>>>> Ok, try this,
>>>>
>>>> Browser(“creationtime:=0“).**Page(“micclass:=Page“,"index:=**
>>>> 0").highlight
>>>>
>>>> Browser(“creationtime:=1“).**Page(“micclass:=Page“,"index:=**
>>>> 0").highlight
>>>>
>>>> Sent on my BlackBerry® from Vodafone
>>>> ------------------------------
>>>>  *From: *[email protected] 
>>>>  *Date: *Wed, 17 Jul 2013 12:46:12 -0700 (PDT)
>>>> *To: *<[email protected]>
>>>> *Cc: *<[email protected]>; <[email protected]>
>>>>  *Subject: *Re: Two different pages have same browser and page name 
>>>> how to identify them ?
>>>>
>>>> Nope it is not working.  
>>>>  
>>>>
>>>> On Wednesday, July 17, 2013 2:48:03 PM UTC-4, Asiq Ahamed wrote: 
>>>>>
>>>>> Sorry, try this,
>>>>>
>>>>> Browser(“creationtime:=0“)
>>>>> Browser(“creationtime:=1“)
>>>>>
>>>>> Sent on my BlackBerry® from Vodafone
>>>>> ------------------------------
>>>>> *From: *[email protected] 
>>>>> *Date: *Wed, 17 Jul 2013 11:45:45 -0700 (PDT)
>>>>> *To: *<[email protected]>
>>>>> *Cc: *<[email protected]>
>>>>> *Subject: *Re: Two different pages have same browser and page name 
>>>>> how to identify them ?
>>>>>
>>>>> Still not working
>>>>>
>>>>> On Wednesday, July 17, 2013 1:49:41 PM UTC-4, Asiq Ahamed wrote: 
>>>>>>
>>>>>> Use creation time,
>>>>>>
>>>>>> Browser(“creationtime:=1“)
>>>>>> Browser(“creationtime:=2“)
>>>>>>
>>>>>> Sent on my BlackBerry® from Vodafone
>>>>>> ------------------------------
>>>>>> *From: *[email protected] 
>>>>>> *Sender: *[email protected] 
>>>>>> *Date: *Wed, 17 Jul 2013 10:43:22 -0700 (PDT)
>>>>>> *To: *<[email protected]>
>>>>>> *ReplyTo: *[email protected] 
>>>>>> *Subject: *Re: Two different pages have same browser and page name 
>>>>>> how to identify them ?
>>>>>>
>>>>>> So i am running a loop 
>>>>>> when it comes back it still looks for login page and fails 
>>>>>>
>>>>>>
>>>>>> here is my code
>>>>>>
>>>>>>
>>>>>> Set mypage2=browser("title:=**Facebo**ok","index:=0").page("**title:=
>>>>>> **Facebook","index:=0")
>>>>>>  if mypage2.Exist Then
>>>>>> mypage2.WebEdit("html id:=email","name:=email").Set"****Team.com"
>>>>>>     mypage2.WebEdit("html id:=pass","name:=pass").Set"**36**0"
>>>>>> mypage2.WebButton("html id:=u_0_1","name:=Log In").Click
>>>>>>
>>>>>> End If
>>>>>> '
>>>>>> Set mypage3=browser("title:=**Facebo**ok","index:=1").page("**title:=
>>>>>> **Facebook","index:=1")
>>>>>>        msgbox mypage3.WebElement("class:=_b-****
>>>>>> -").GetROProperty("innertext")
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wednesday, July 17, 2013 12:45:21 PM UTC-4, Akhalesh Yadav wrote: 
>>>>>>>
>>>>>>>  Use ordinal identifier index=0 for first one login pop up and 
>>>>>>> index=1 for wall popup.
>>>>>>>
>>>>>>>
>>>>>>> Thanks
>>>>>>> Akhalesh
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Jul 17, 2013 at 8:30 PM, <[email protected]> wrote:
>>>>>>>
>>>>>>>> I am working on an application which has facebook interface button 
>>>>>>>> to share a story. 
>>>>>>>>  When i click on a button it brings popup window of facebook login 
>>>>>>>> page. has browser & page title(FACEBOOK)
>>>>>>>> when i enter user name and password and login to the site
>>>>>>>>  the next wall popup window displays has browser & page 
>>>>>>>> title(FACEBOOK)
>>>>>>>> this wall popup page and login popup page have same page & browser 
>>>>>>>> title. What should i do to identify them as two different pages ?
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> -- 
>>>>>>>> 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
>>>>>>>> MercuryQTP+...@googlegroups.**co**m
>>>>>>>> For more options, visit this group at
>>>>>>>> http://groups.google.com/**group**/MercuryQTP?hl=en<http://groups.google.com/group/MercuryQTP?hl=en>
>>>>>>>>  
>>>>>>>> --- 
>>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>>> Groups "QTP - HP Quick Test Professional - Automated Software Testing" 
>>>>>>>> group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>>> send an email to mercuryqtp+...@googlegroups.**co**m.
>>>>>>>> For more options, visit https://groups.google.com/**grou**
>>>>>>>> ps/opt_out <https://groups.google.com/groups/opt_out>.
>>>>>>>>  
>>>>>>>>  
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -- 
>>>>>>> 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
>>>>>> MercuryQTP+...@googlegroups.**co**m
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/**group**/MercuryQTP?hl=en<http://groups.google.com/group/MercuryQTP?hl=en>
>>>>>>  
>>>>>> --- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "QTP - HP Quick Test Professional - Automated Software Testing" 
>>>>>> group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>> send an email to mercuryqtp+...@googlegroups.**co**m.
>>>>>> For more options, visit 
>>>>>> https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out>
>>>>>> .
>>>>>>  
>>>>>>  
>>>>>>
>>>>>  -- 
>>>> -- 
>>>> 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
>>>> MercuryQTP+...@**googlegroups.com
>>>> For more options, visit this group at
>>>> http://groups.google.com/**group/MercuryQTP?hl=en<http://groups.google.com/group/MercuryQTP?hl=en>
>>>>  
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "QTP - HP Quick Test Professional - Automated Software Testing" 
>>>> group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to mercuryqtp+...@**googlegroups.com.
>>>> For more options, visit 
>>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>  
>>>>  
>>>>
>>>  -- 
>> -- 
>> 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]<javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/MercuryQTP?hl=en
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "QTP - HP Quick Test Professional - Automated Software Testing" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>  -- 
> -- 
> 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]<javascript:>
> To unsubscribe from this group, send email to
> [email protected] <javascript:>
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "QTP - HP Quick Test Professional - Automated Software Testing" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
>
>

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups "QTP 
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to