Tuesday, 24 October 2017

UFT: Browser Methods

'Open a new Browser using Util Object
SystemUtil.Run "iexplore.exe""www.uftHelp.com"

'Browser Sync
Browser("CreationTime:=0").Sync

'Delete cookies from the Browser
Browser("CreationTime:=0").DeleteCookies

'Refreshes the Opened Page
Browser("CreationTime:=0").Refresh

'Opening  a new tab within the same browser
Browser("CreationTime:=0").OpenNewTab()

'Opening Browser in FullScreen mode
Browser("CreationTime:=0").FullScreen

'Sync for new tab
Browser("CreationTime:=1").Sync

'Navigate to perticular URL in the new tab
Browser("CreationTime:=1").Navigate "www.Google.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()

No comments:

Post a Comment

Spring Boot : Exception Handler 14