[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

need help getting selenium to push 2 buttons on a webpage

Posted on 2015-01-26
3
Medium Priority
?
114 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 7

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 7

Accepted Solution

by:
Craig Kehler earned 2000 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

2017 Webroot Threat Report

MSPs: Get the facts you need to protect your clients.
The 2017 Webroot Threat Report provides a uniquely insightful global view into the analysis and discoveries made by the Webroot® Threat Intelligence Platform to provide insights on key trends and risks as seen by our users.

Question has a verified solution.

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

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses
Course of the Month17 days, 18 hours left to enroll

830 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