You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Runned the JUnit
2. package br.com.visagio.dashboard.application.control;
import static org.junit.Assert.assertEquals;
import org.junit.*;
import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.FlexUISelenium;
import com.thoughtworks.selenium.Selenium;
/**
* This test only run properly if:
* selenium-server is running
* selenium-java-client-driver.jar and junit.jar have been added to the project or classpath
* flashselenium.jar has been added to the project or classpath
* flex-ui-selenium.jar has been added to the project or classpath
*/
public class FlexUISeleniumTest {
private final static String URL = "http://localhost:6060/demodashboard/flex/login.html";
private Selenium selenium;
private FlexUISelenium flexUITester;
@Before
public void setUp() throws Exception {
selenium = new DefaultSelenium("localhost", 4444, "*chrome",URL);
selenium.start();
selenium.open(URL);
selenium.setSpeed("1000");
flexUITester = new FlexUISelenium(selenium, "login");
}
@After
public void tearDown() throws Exception {
selenium.stop();
}
@Test
public void verifyFlexAppSumIsCorrect() {
flexUITester.type("2").at("arg1");
flexUITester.type("3").at("arg2");
flexUITester.click("submit");
assertEquals("5", flexUITester.readFrom("result"));
}
}
<?xml version="1.0" encoding="utf-8"?>
<!-- usingas/SourceInclude.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
creationComplete="init();">
<mx:Script>
<![CDATA[
private function computeSum(a:Number, b:Number):Number {
return a + b;
}
]]>
</mx:Script>
<mx:TextInput id="arg1" text="3" width="40" x="170" y="24" textAlign="right"/>
<mx:TextInput id="arg2" text="3" width="40" x="170" y="52" textAlign="right"/>
<mx:TextArea id="result" height="25" width="78" x="132" y="82" textAlign="right"/>
<mx:Button id="submit" label="Compute Sum"
click="result.text=String(computeSum(Number(arg1.text), Number(arg2.text)));"
x="105"
y="115"
/>
<mx:Label x="148" y="52" text="+" fontWeight="bold" fontSize="17" width="23"/>
</mx:Application>
3.
What is the expected output? What do you see instead?
Sucessful Tests.
But Im seeing,
16:12:18.490 INFO - Got result: OK on session 831247246a3c4dd7aec023fd4c8cda16
16:13:22.802 INFO - Command request: getEval[this.browserbot.findElement("login"
).doFlexType('arg1','2');, ] on session 217fd2c2762d4f43a8a24bbd387545f5
16:13:23.817 INFO - Got result: ERROR: Threw an exception: this.browserbot.findE
lement("login").doFlexType is not a function on session 217fd2c2762d4f43a8a24bbd
387545f5
What version of the product are you using? On what operating system?
windows 7, firefox 7.0.1
Please provide any additional information below.
Original issue reported on code.google.com by magno.ma...@visagio.com on 18 Oct 2011 at 6:16
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
magno.ma...@visagio.com
on 18 Oct 2011 at 6:16The text was updated successfully, but these errors were encountered: