If 3 browsers are opened in our system, how to enter the
facebook url into second browser by using descriptive
programing

Answer Posted / sireesha

'Open a new Browser
SystemUtil.Run "iexplore.exe", "http://www.google.com"
'Browser Sync
Browser("CreationTime:=0").Sync

'Find total number of tabs in the browser window
iTabs = Browser("CreationTime:=0").GetROProperty("number of tabs")
msgbox iTabs 'Displays the value 1

'Open a new tab within the same browser
Browser("CreationTime:=0").OpenNewTab()
'Sync for new tab
Browser("CreationTime:=1").Sync

'Load some web page in the new tab
Browser("CreationTime:=1").Navigate "http://www.yahoo.com"

'Find total number of tabs in the browser window
iTabs = Browser("CreationTime:=0").GetROProperty("number of tabs")
msgbox iTabs 'Displays the value 2

'Close all the tabs in the browser window
Browser("CreationTime:=0").CloseAllTabs()
'OR -> Browser("CreationTime:=1").CloseAllTabs()

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi How to retrieve data from web element line by line?

1571


When to use descriptive programming?

591


Hi, I am working on microsoft infopath forms..It is standalone form..(not dotnet or web.) . I am not able to indentify any objects in it.. I am currently using active accessibility in the macro for the same but its execution is too slow.. Kindly help in case you have better solution.

2409


When to use shared and local object repository?

636


Explain the check points in quicktest professional (qtp)?

560






what is the difference between development and testing

2390


What are the different types of recording modes in qtp? Which will be used when?

571


Any body have QTP 9.5 licence key. please provide me at madhukar_dec30@yahoo.co.in

1603


What are the check points can be inserted without recording?

598


When do go for loop condition in test?

654


write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))

1505


What is the difference in testing a client-server application and a web application?

587


How you can delete excel file in qtp?

599


How to handle dynamic objects in quicktest professional (qtp)?

546


How many types of Automation frameworks are there in UFT? Describe them.

559