03-01-2013, 11:44 AM
Hi,
I am facing a problem.
In my application,I have to click on a link that open a new tab. As soon as it open a new tab,I have to close this new tab only. But below code does not do this.
'********************************************
'*******************************
It print "present' in print log but not close the new tab and show error on line "Browser("creationTime:=1").close ". Error is "Object not visible".
And when I click on 'Retry' button of this Run error dialog box and get focus on new tab (by click on new tab) then only it get closed. Unless I dont foucs,it is not get closed .
Please let me the solution for this problem.
I am facing a problem.
In my application,I have to click on a link that open a new tab. As soon as it open a new tab,I have to close this new tab only. But below code does not do this.
'********************************************
Code:
If Browser("CreationTime:=1").Exist(0) Then
print "present"
Browser("CreationTime:=1").Close
'fncloseBrowser()
else
print "not present"
End If
It print "present' in print log but not close the new tab and show error on line "Browser("creationTime:=1").close ". Error is "Object not visible".
And when I click on 'Retry' button of this Run error dialog box and get focus on new tab (by click on new tab) then only it get closed. Unless I dont foucs,it is not get closed .
Please let me the solution for this problem.