Comments (6)
You can use the setProxy command :
selenium.setProxy "xxx.xxx.xxx.xxx"
selenium.start "firefox", "http://www.google.com"
selenium.open "/"
Or you can manually create a new Firefox profile with the desired proxy and use
it :
selenium.setProfile "Selenium"
selenium.start "firefox", "http://www.google.com"
selenium.open "/"
Original comment by florentbr
on 4 May 2013 at 7:40
- Changed state: Accepted
from selenium-vba.
Many thanks for this reply. selenium.setProfile works exactly as I wanted.
Is there however a way to have 2 Selenium Sessions, one with proxy the other
without running on the same Excel Instance, and be able to use both of them at
the same time?
I have prepared a code below, but it returns the following error:
Run-time error '-2146233088 (80131500)'
Unable to bind to locking port 7054 within 45000 ms
Dim selenium As SeleniumWrapper.WebDriver
Dim selenium2 As SeleniumWrapper.WebDriver
'Session with proxy
Public Sub StartSelenium()
Set selenium = New SeleniumWrapper.WebDriver
selenium.setProfile "Selenium"
selenium.Start "firefox", "http://www.google.com/"
End Sub
Public Sub PlayWithGoogle()
selenium.Open "http://www.google.com"
End Sub
Public Sub PlayWithYahoo()
selenium.Open "http://www.yahoo.com"
End Sub
'Session without proxy
Public Sub StartSelenium2()
Set selenium2 = New SeleniumWrapper.WebDriver
selenium2.Start "firefox", "http://www.google.com/"
End Sub
Public Sub PlayWithGoogle2()
selenium2.Open "http://www.google.com"
End Sub
Public Sub PlayWithYahoo2()
selenium2.Open "http://www.yahoo.com"
End Sub
The same error repeats, even when I use a separate Excel Instance.
Original comment by [email protected]
on 5 May 2013 at 5:38
from selenium-vba.
Can you tell me which line is throwing the error?
Original comment by florentbr
on 6 May 2013 at 1:04
from selenium-vba.
Thank for looking into this. I checked on my PC and on Windows Azure W2008
instance:
on my PC:
as i run sub after sub, it stops at line:
selenium2.Start "firefox", "http://www.google.com/"
and I get:
Run-time error '-2146233088 (80131500)'
Unable to bind to locking port 7054 within 45000 ms
I believe second instance of Selenium Webdriver Browser doesn't want to load
here
On Windows Azure I am able to launch second instance of Selenium Webdriver
Browser, but am not able to go back and forth between 2 instances for example
After running Subs in the following order:
StartSelenium
PlayWithGoogle
PlayWithYahoo
StartSelenium2
PlayWithGoogle2
PlayWithGoogle - nothing will happen here.
PlayWithYahoo2 - but this one will work
Is it actually possible to use two Selenium Webdriver Browsers parallely? as I
tried in the above sequence? IE. once I open second Selenium Webdriver Browser,
can i still go back to the first Browser, and run macros on that instance?
If so could you please provide sample VBA code that will work?
Original comment by [email protected]
on 6 May 2013 at 11:47
from selenium-vba.
I had a look at the code and found that it's not currently possible to work
with two instances at the same time due to some temporary file cleaning at each
instanciation.
It will be fixed in the next release.
Original comment by florentbr
on 8 May 2013 at 1:16
from selenium-vba.
Fixed in version 1.0.13.3
Original comment by florentbr
on 7 Jun 2013 at 1:10
- Changed state: Fixed
from selenium-vba.
Related Issues (20)
- how to get innertext or textcontent with selenium HOT 2
- extract product data from web HOT 7
- Unable to open the URLs in the excel file using chrome HOT 4
- Unable to use chrome browser to work HOT 6
- Method <type> failed HOT 2
- Selenium user session cookies HOT 1
- Set HTMLDOC = driver.Document Here I would like to know the source for the Document. HOT 1
- how to scroll down till element is visible HOT 2
- Click item "a" and "href =" HOT 3
- how to identify if page has scrollbar, using Selenium VBA HOT 2
- how to send user credentials through VBA selenium HOT 4
- The execution is getting slower. HOT 1
- How to click button with no ID, Name or Value HOT 2
- How to set a profile in VBA (excel) HOT 2
- Compatability With Firefox 36 HOT 4
- Selenium VB.net "NuGet Package" HOT 3
- Can not switch frames HOT 2
- Find correct Element with Different Elements Having same ID HOT 1
- Update to 2.45 HOT 1
- Click failed (id=xxxx not found) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from selenium-vba.