Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pas parameters to the Extrenalized API call and get the output? #2

Closed
GoogleCodeExporter opened this issue Apr 12, 2016 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Lets say am attempting to test Login functionality. Since I don't have
controls to get the Flex App UI components values, How do I pass the
Username & Password for the Login test from my test code?
 assertEquals("LoginPage", seleniumIns.getTitle()); 
 flashApp.call("successLogin");             assertEquals(LOGIN_STATUS_SUCCEES,
  flashApp.call("getLoginStatus"));

What I wanted is status = flashApp.call(doLogin("userName", "password"))
assertEquals("true", status)
or if the function returns object, then we need to have a way to verify
objects.

What is the expected output? What do you see instead? NA

What version of the product are you using? On what operating system?
recent flash-selenium-java-client extn on Windows XP SP3 machine

Please provide any additional information below.


Original issue reported on code.google.com by murali.o...@gmail.com on 17 Oct 2008 at 9:17

@GoogleCodeExporter
Copy link
Author

In order to call the doLogin Flex function from a test using Selenium RC and
flash-selenium.

First you have to externalize the Flex function. In your example:
ExternalInterface.addCallback("doLogin", doLogin);

Then you can call it from your test code with the following syntax:
status = flashApp.call(“doLogi”,"userName", "password");

Original comment by paulocar...@gmail.com on 30 Oct 2008 at 4:31

  • Changed state: Invalid

@GoogleCodeExporter
Copy link
Author

status = flashApp.call(“doLogin”,"userName", "password");


Original comment by paulocar...@gmail.com on 30 Oct 2008 at 5:27

@GoogleCodeExporter
Copy link
Author

How about the call like flashApp.call('@menu.showScreen','test');
I was able to execute the command from the javascript. But when tried to 
execute the 
same from the java client I am getting the error. However the standard method 
like flashApp.PercentLoaded() and flashApp.TotalFrames() works perfectly. 
Please help me.

Trace is attached.

com.thoughtworks.selenium.SeleniumException: ERROR: Threw an exception: 
window.document.W48f466331bd53a6548f467e870bb60ab.@menu has no properties
    at 
com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.ja
va:73
)
    at 
com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.ja
va:15
4)
    at 
com.thoughtworks.selenium.DefaultSelenium.getEval(DefaultSelenium.java:334)
    at com.thoughtworks.selenium.FlashSelenium.call(FlashSelenium.java:54)
    at ColorsTest.testlogin(ColorsTest.java:56)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at junit.framework.TestCase.runTest(TestCase.java:164)
    at junit.framework.TestCase.runBare(TestCase.java:130)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:120)
    at junit.framework.TestSuite.runTest(TestSuite.java:230)
    at junit.framework.TestSuite.run(TestSuite.java:225)
    at 
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestR
efere
nce.java:130)
    at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner
.java
:460)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner
.java
:673)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java
:386)
    at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.jav
a:196
)




Original comment by Densilde...@gmail.com on 12 Nov 2008 at 4:48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant