开发者

Is there any way to automate the testing of flash within web pages using Watir-Webdriver?

I am attempting to test several web pages built in Flex, and need to automate clicking on several videos through the Flash interface. I'm using Ruby and Watir-Webdriver, but I'm not sure how to interact with Flash using them.

Has anyone figured this out? I've tried using Sikuli, but have found it to be a little clunky and not very fast. Any i开发者_JS百科deas would be greatly appreciated.


I will quote myself:

It is important to say that Watir CAN NOT control browser plugins like Java applets, Adobe Flash or Microsoft Silverlight.

From https://github.com/zeljkofilipin/watirbook/blob/master/about.md


There is a way though. You can embed javascript into your ruby watir script.

It has worked for me

browser.execute_script <<-JS

Global.videoPlayer.sendEvent("play")

JS

Similarly you can do a pause or stop based on the controller on the player

Enjoy !!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜