Я автоматизирую веб-приложение, в которое встроена флэш-память.Я использую FlashSelenium для флэш-части приложения, но каждый раз, когда я запускаю тест, я получаю следующую ошибку
com.thoughtworks.selenium.SeleniumException: ОШИБКА: выдает исключение: this.browserbot.findElement("getInfo"). PercentLoaded не является функцией
Ниже приведен код для моего теста: -
import org.openqa.selenium.server.SeleniumServer;
import org.testng.annotations.Test;
import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.FlashSelenium;
import com.thoughtworks.selenium.Selenium;
public class FlashClass extends SeleneseTestCase
{
private Selenium selenium = new DefaultSelenium("localhost", 4444, "*firefox","http://localhost:8080");
private FlashSelenium flashApp;
@Test
public void testflashTest() throws Exception
{
flashApp = new FlashSelenium(selenium,"getInfo");
SeleniumServer server = new SeleniumServer();
server.start();
selenium.start();
selenium.setSpeed("1000");
selenium.open("/web-App/Login.html");
selenium.windowMaximize();
selenium.type("userId", "test");
selenium.type("password", "test");
selenium.click("//input[@value=' Log In ']");
Thread.sleep(10000);
int i=flashApp.PercentLoaded();
System.out.println(i);
}
}
HTML-код, где Flashвложено: -
Любая помощь в этом отношении приветствуется.