SmeeK153 / flash-selenium

Automatically exported from code.google.com/p/flash-selenium
0 stars 0 forks source link

Calling functions from nested objects #45

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm hitting a wall trying call a function in a nested object. In the code 
below, I'm trying to access myflash.player.play.  

    public void setUp() {
        selenium = new DefaultSelenium("localhost", 4444, "*firefoxproxy",Constants.MY_URL);
        selenium.start();
        flashApp = new FlashSelenium(selenium, "myflash");

        selenium.open(Constants.MY_URL);
}
    public void tearDown() {
        selenium.stop();
    }

public void testChannelPlay() {
        assertEquals(100, flashApp.PercentLoaded());
        flashApp.call("player.play");

In the above script, myflash is started successfully and the first assertEquals 
succeeds, but I cannot access play either by the flashApp.call above 
("player.play") or by using ("play").  "player.play" returns an object not 
found exception while "play" returns a function not found.  

Any ideas on how I can make this work?  

Thanks in advance.

What steps will reproduce the problem?
1. Create a test that attempts to call a function in a nested object

What is the expected output? What do you see instead?
expected output: call succeeds
actual output: no object found exception if I include the nested object in the 
flashApp.call(), no function found exception if I exclude it

What version of the product are you using? On what operating system?
1.0 on Win XP

Please provide any additional information below.

Original issue reported on code.google.com by sweetbil...@gmail.com on 8 Sep 2010 at 6:18