Here is a simple code that could help
Set objPage = Browser("name:=Nameofbrowser").page("title:=titleofbrowser")
Call BrowserMaximize(objpage)
Function BrowserMaximize(byval ObjPage)
On Error resume next
If objpage.Exist Then
width = objPage.Object.parentwindow.screen.width
height = objPage.Object.parentwindow.screen.height
objpage.Object.Parentwindow.moveto 0,0
objpage.Object.Parentwindow.resizeto width,height
Reporter.ReportEvent micPass,"BrowserMaximize","Browser maximized"
else
Reporter.ReportEvent micFail,"BrowserMaximize","Browser/Page object does not exist"
End If
Err.clear
End Function
Call BrowserMaximize(objpage)
Function BrowserMaximize(byval ObjPage)
On Error resume next
If objpage.Exist Then
width = objPage.Object.parentwindow.screen.width
height = objPage.Object.parentwindow.screen.height
objpage.Object.Parentwindow.moveto 0,0
objpage.Object.Parentwindow.resizeto width,height
Reporter.ReportEvent micPass,"BrowserMaximize","Browser maximized"
else
Reporter.ReportEvent micFail,"BrowserMaximize","Browser/Page object does not exist"
End If
Err.clear
End Function
Or
Some may be using the Object Repository for the same purpose
Browser().page().Maximize may be also used in that case
Some may be using the Object Repository for the same purpose
Browser().page().Maximize may be also used in that case
Works well, thanx
ReplyDeleteThank youuu!!! :D
ReplyDeleteRespect and I have a swell offer: Whole House Renovation Cost custom home additions
ReplyDelete