Solved

need help getting selenium to push 2 buttons on a webpage

Posted on 2015-01-26
3
103 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

763 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

10 Experts available now in Live!

Get 1:1 Help Now