Comments (4)
That's because the Urls you're providing are not valid (the protocol is missing
in front).
When the protocol is missing, the root Url defined by the start command is
added in front.
This is why you get "http://www.google.com/www.amazon.com" in the address.
Try these Urls instead:
https://www.facebook.com
https://www.yahoo.com
https://www.google.com
https://www.amazon.com
Or add the protocol before calling the open command:
Dim r
For Each r In Range(Sheet1.Cells(2, 1), Sheet1.Cells(2, 1).End(xlDown))
selenium.executeScript "window.open()"
selenium.Open "https://" & r
Next r
Original comment by florentbr
on 10 Jan 2015 at 2:56
- Changed state: Done
from selenium-vba.
Hi florentbr
Thank you for your reply.
I tried using firefox and it managed to open 3 tabs instead of 4 tabs. I
noticed that the 2nd tab first's address is yahoo then it changes to google. it
is kind of weird. (Please refer to the attached screenshot, firefox.png)
As for chrome, it opens up 4 tabs. first tab is amazon because it went through
all the URLs on the same tab. (Please refer to the attached screenshot,
chrome.png)
Thanks for the insight!
Original comment by [email protected]
on 10 Jan 2015 at 3:20
Attachments:
from selenium-vba.
You need to set the window on which the driver will operate before opening the
Url:
wd.executeScript "window.open()"
wd.switchToWindow -1 'Switch to the last window
wd.Open ...
Original comment by florentbr
on 10 Jan 2015 at 3:51
from selenium-vba.
Hey florentbr
Thank you for the help!
The line, 'wd.switchToWindow -1' helps to ensure that each website is opened in
each tab for chrome. (Please refer to the attached screenshot, chrome2.png)
However, it does not work for firefox unless I used this
'selenium.executeScript "window.open()"' instead of this code, '
selenium.SendKeys keys.Control & "t"' which opens up the 3 tabs instead of 4
tabs. Also, 2nd tab first's address is yahoo then it changes to google.
Hopefully this thread will be useful for someone who want to work on firefox
later since it works for chrome browser.
Once again florentbr.
This will be good:
http://selenium.googlecode.com/svn-history/r5810/webdriver/javadoc/org/openqa/se
lenium/remote/server/handler/SwitchToWindow.html
Thank you for the help.
Original comment by [email protected]
on 11 Jan 2015 at 12:07
Attachments:
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 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.