Forum Discussion
Hi tristaanogre
Thanks for reply.
I want to inform you when I execute my script It was wotking fine on (Windows 10, Chrome73-64bit). Whole script execute fine and generate report.
But when I am choosing (window 8, Or any other version of chrome, firefox)...not 64 bit then script is failed. Kindly check the failure in attachment.
Below is the code that i'm using.
Sub OpenBrowserWithURL (BrowserName,URL)
Dim firefox,InternetExplorer,Chrome,Edge
If (BrowserName="Firefox")Then
Browsers.Item(firefox).Navigate(URL)
Sys.Browser.BrowserWindow(0).Maximize
ElseIf (BrowserName="InternetExplorer")Then
Browsers.Item("iexplore", "11", Browsers.pX64).Run URL
Sys.Browser.BrowserWindow(0).Maximize
ElseIf (BrowserName="Edge")Then
Browsers.Item(btEdge).Navigate(URL)
Sys.Browser.BrowserWindow(0).Maximize
ElseIf (BrowserName="Chrome")Then
Browsers.Item(btChrome).Navigate(URL)
Sys.Browser("chrome").BrowserWindow(0).Maximize
Log.Checkpoint("Browser Name: "&BrowserName)
Log.Checkpoint("URL: "&URL)
End If
Browsers.Refresh
End Sub
Hi,
> Below is the code that i'm using.
Either this is not the code that you reported problem for or attached screenshots do not correspond to this code.
So request to provide actual code, the line that fails and screenshot of the relevant test log still remains.
As a side note:
> Set page = Sys.Browser("*").Page("*")
This is a bad code that may be used only if you really need this and completely control the state of the test environment.
Translated into human, this line of code means: "Search the system for any instance of any browser. For the found instance search for any web page it contains and use this found page".
Considering the above: can you guarantee that your system has only one instance of required browser running with only one web page opened and the opened web page is the expected one? Note, that the "any instance of any browser" means not only browsers that you can see on the screen, but also those that are running in the background or hung and did not end on close.