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

一个人想着一个人 提交于 2019-12-11 10:59:15

问题


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 ideas would be greatly appreciated.


回答1:


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




回答2:


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 !!



来源:https://stackoverflow.com/questions/7434338/is-there-any-way-to-automate-the-testing-of-flash-within-web-pages-using-watir-w

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!