Solved

need help getting selenium to push 2 buttons on a webpage

Posted on 2015-01-26
3
104 Views
Last Modified: 2015-03-04
I am formatting a macro I recorded in selenium both ways with vbs and vba and it keeps erring out. Partly bcuz it keeps opening up a new instance fo firefox which then requires a new login. Is there a way to get vba or vbs too work sellenium on a previously opened web browser?
Are then any good free macro recorders for web pages I need to automate two simple webpage link mouseclicks they are
driver.findElementById("download").click
driver.findElementByCssSelector("button.png-download-btn").click
0
Comment
Question by:Dov_B
  • 2
3 Comments
 
LVL 6

Expert Comment

by:Craig Kehler
ID: 40626291
Have you tried the Selenium IDE Add-on for firefox? http://www.seleniumhq.org/projects/ide/

You can record a macro and play it back. You can also export those recorded tests for use in WebDriver.
0
 

Author Comment

by:Dov_B
ID: 40627215
yeah I exported it to vba and it throws an error when run from excel I also added the reference to the vba project it manages only to open the site then errs out
0
 
LVL 6

Accepted Solution

by:
Craig Kehler earned 500 total points
ID: 40627247
Ah I see, you want it to use a currently open browser and run from excel. The IDE would handle only the latter part of that.

I'm guessing you don't want to automate the login. There is no way to "hijack" a currently running browser and they closed out the feature request as "not feasible". https://code.google.com/p/selenium/issues/detail?id=18&colspec=ID%20Stars%20Type%20Status%20Priority%20Milestone%20Owner%20Summary

You might be able to accomplish it using the IDE in an already authenticated browser and writing out what data it gathers to a file that is read into excel.

Sorry, I don't have a lot of experience with selenium in excel I mainly use the java variant to test web pages. I just hate to see these automation questions sit neglected.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task of choosing a web design company to build a website for your business should never be taken in a light manner. Provided the fact that your website will act as a representative to your business and will be responsible for imposing an online …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now