Can anyone explain how to write Selenium script for Flash Testing?

0 votes
May 22 in Selenium by Wasim
209 views

1 answer to this question.

0 votes

Hey Wasin, to understand how Selenium scripts can be written for Flash testing, refer to the following code snippet:

import org.openqa.selenium.firefox.FirefoxDriver;		
import Flash.FlashObjectWebDriver;		
public class Flash {				
    public static void main(String[] args) throws InterruptedException {								
  	// Open firefox browser		
	FirefoxDriver driver = new FirefoxDriver();			
  	// Maximize browser		
	driver.manage().window().maximize();		
  	// Under Flash jar file there is separate FlashObjectWebDriver class		
	FlashObjectWebDriver flashApp = new FlashObjectWebDriver(driver, "myFlashMovie");		
  	// Pass the URL of video		
	driver.get("http://demo.guru99.com/test/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"));						
  }		
}
answered May 23 by Neelam

Related Questions In Selenium

0 votes
2 answers

Can anyone help me that how to run Selenium WebDriver test cases in Chrome?

You first need to download chrome driver ...READ MORE

answered Aug 26 in Selenium by Abha
• 27,180 points
341 views
0 votes
0 answers

How to write a code for combo box and how can i select a country from country dropdown?

Hi, I want to select a country from ...READ MORE

Mar 14 in Selenium by ch Praveen
377 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,110 points
1,147 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,150 points
1,246 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,150 points
1,002 views
0 votes
1 answer

How to automate Flash using Selenium Webdriver?

Hey Gaurav, to automate Flash using Selenium ...READ MORE

answered May 23 in Selenium by Gaurav
227 views
–1 vote
1 answer