0

I have a webpage with a Flash object on it. I want to be able to click multiple different buttons within in. Regarding this method I was wondering if there is any library (preferable Python/Perl/JAVA) that can actually stream a page-open session, emulate a resolution and perform (x,y) clicks.

For example (Python-like):

I Load the SomeUrlLib:

import SomeUrlLib

browser = new SomeUrlLib()
browser.setUrl('http://www.someaddress.com/subpage/')
browser.setResolution(1280, 800)

browser.startBrowsing('SessionName') # Bind a session name to this browsing session
locX = 40
locY = 80
browser.click(locX, locY, 'SessionName')
screen = browser.takeScreenshot('SessionName')

I'm thinking this is nearly impossible, as I can't imagine any library out there would be able to have Flash-engine build-in.

"If" this is possible in some weird way I would like to try to use the Sikuli API (screen recognition) to maybe react on screenshot feedback to click on certain coordinates, yet I guess dynamically changing pages are still an issue due to the latency the script would have towards what happens live in the page.

  • Have you tried [`ghost.py`](http://jeanphix.me/Ghost.py/)? It runs a webkit browser headless, giving you access to it's rendering from Python. Perhaps it can run Flash in a page too. – Martijn Pieters Dec 23 '12 at 14:19
  • Thank you; I will try this soon, as my Homebrew (OS X) has some dylib issues I need to fix. PyQT isn't a very nice (as in kindness) tool for OS X systems :P. –  Dec 23 '12 at 14:53

1 Answers1

0

It seems that there is extension for Selenium that enables flash. Selenium http://seleniumhq.org/

Selenium python http://pypi.python.org/pypi/selenium/

Selenium extension for flash | works in python too http://code.google.com/p/flash-selenium/

Goranek
  • 826
  • 1
  • 10
  • 23
  • Can Selenium run without popping up? So could I trigger fully command-line tests? –  Dec 23 '12 at 14:54
  • Any idea where I download Xvfb (back-end required for PyVirtualDisplay)? –  Dec 23 '12 at 15:14
  • I'm running Python 2.7.x on Mac OS X, so I can't just apt-get. Also Homebrew can't fetch it, as it denies to link python to the system from there. –  Dec 23 '12 at 15:24