Giter Club home page Giter Club logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.