Thanks for the replies. The code i posted wasn't the cleanest. Let me try and explain myself better.
The code here works and is the normal way of opening a browser using selenium
Dim A As New SeleniumWrapper.WebDriver
A.Start "firefox", "https://www.google.com/"
A.Open "/"
But. I want to put this in a loop passing in what selenium often calls the "driver" as a variable (in the last case "A").
The code below attempts to do that but fails...
' Set Up Selenium
Dim A As New SeleniumWrapper.WebDriver
Dim B As New SeleniumWrapper.WebDriver
Dim C As New SeleniumWrapper.WebDriver
Dim D As New SeleniumWrapper.WebDriver
Dim E As New SeleniumWrapper.WebDriver
Sub initiate_browsers()
Possible_Browsers = Array("A", "B", "C", "D", "E")
'Loop
For Each Item In Possible_Browsers
Call open_browser(Item)
Next
End Sub
' Create Browser
Sub open_browser(Bro_Var)
' A.Start "firefox", "https://www.google.com/"
' A.Open "/"
Bro_Var.Start "firefox", "https://www.google.com/"
Bro_Var.Open "/"
End Sub
Thanks again for the help
Bookmarks