Solved

need help getting selenium to push 2 buttons on a webpage

Posted on 2015-01-26
3
107 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

717 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