Can anyone help me with how to automate play/pause video present on the web page using Selenium..
Thanks in advance...
By Using FlashObjectwebDriver !
Now what is FlashObjectWebDriver ?
FlashObjectWebDriver is an interface under Webdriver Library. FlashObjectWebDriver has a Method called : callFlashObject callFlashObject method can be over loaded using arguments ie. callFlashObject(“Play”) : For Playing the Flash callFlashObject(“Pause”) : For Pausing the Flash callFlashObject(“Previous”) : For playing previous Flash video callFlashObject(“next”) : For playing next Flash video callFlashObject(“SetVariable”, “/:Message) : For displaying the message . Implementation :
FlashObjectWebDriver flashApp = new FlashObjectWebDriver(driver, "myFlashMovie");
// Pass the URL of video
driver.get("http://demo.guru99.com/flash-testing.html");
Thread.sleep(5000);
flashApp.callFlashObject("Play");
Thread.sleep(5000);
flashApp.callFlashObject("StopPlay");
Thread.sleep(5000);
flashApp.callFlashObject("SetVariable","/:message","Flash testing using selenium Webdriver");
System.out.println(flashApp.callFlashObject("GetVariable","/:message"));