Professional Documents
Culture Documents
3. there are several browsers are opened how do you close the last opened browser?
Call CloseLatestOpenedBrowser()
Function CloseLatestOpenedBrowser()
Dim oDescription
Dim BrowserObjectList
Dim oLatestBrowserIndex
Set oDescription=Description.Create
oDescription("micclass").value="Browser"
Set BrowserObjectList=Desktop.ChildObjects(oDescription)
oLatestBrowserIndex=BrowserObjectList.count-1
Browser("creationtime:="&oLatestBrowserIndex).close
Set oDescription=Nothing
Set BrowserObjectList=Nothing
End Function
9:05 pm browser.
z=returntwo()
msgbox z(0)
msgbox z(1)
msgbox z(2)
msgbox z(3)
Function returntwo()
x="ramesh"
y="srk-hearty.Blogspot.com"
a=10
b="PASS"
returntwo=array(x,y,a,b)
end function
7. i have excel which has 4 column like username , password , status and remarks and it contains 15 set
of values
i want to take each username, password and Login . At the end of the Login need to update the status
based on application msg.?
Datatable.addsheet(“TC”)
Datatable.importsheet Path,Src,”TC”
iRC=Datatable.getsheet(“TC”).getrowcount
for i= 1 to iRC
Datatable.getsheet(“TC”).setcurrentrow(i)
lsuid=datatable.value(“Username”,”TC”)
lspwd=Datatable.value(“Password”,”TC”)
Res=Login(lsuid,lspwd) ‘ This function return the two values such as Res(0) and Res(1)
Datatable.value(“Status”,”TC”)=Res(0)
Datatable.value(“Remarks”,”TC”)=Res(1)
9. how do you check whether the page has been loaded or not?
Using SYNC
10. how do you check whether the page has been navigated successfully or not?
Using .Exist
Dim A
A=Array("A","B","C","D","E")
val=RevArray(A)
msgbox val(0)
msgbox val(1)
Function RevArray(arrayinput)
Dim i, ubnd
Dim newArray()
ubnd=Ubound(arrayinput)
Redim newarray(ubnd)
newarray(ubnd-i)=arrayinput(i)
next
RevArray=newarray
End function