leeleoo / flash-selenium

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

ERROR: Threw an exception: this.browserbot.findElement("clickcolors").getSquareLabel is not a function on session #34

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. On Windows 7, FF 3.5.7 , flashselenium-java-client-extension-1.0,
Selenium RC 1.0.1 
2. Trying to run test cases using junit and got the error as below
12:07:46.875 INFO - Command request:
getEval[this.browserbot.findElement("clickcolors").getSquareLabel();, ] on
session 75093c545a4243b696449faa8386cdba
12:07:46.893 INFO - Got result: ERROR: Threw an exception:
this.browserbot.findElement("clickcolors").getSquareLabel is not a function
on session 75093c545a4243b696449faa8386cdba
3.

What is the expected output? What do you see instead?
http://www.adobe.com/devnet/flash/articles/flash_selenium_04.html#ach-setscr
I was trying to run sample scripts mentioned on this site and start
automation for our browser based flash application.

What version of the product are you using? On what operating system?
Windows 7, FF 3.5.7, flashselenium-java-client-extension-1.0, Selenium RC
1.0.1 

Please provide any additional information below.

Original issue reported on code.google.com by vikram.s...@gmail.com on 21 Jan 2010 at 9:31

GoogleCodeExporter commented 8 years ago
If you are trying to use the application hosted on t35.com, use "coloredSquare" 
instead of "clickcolors" and see if that works.

Original comment by sachin.s...@gmail.com on 23 Jan 2010 at 8:17

GoogleCodeExporter commented 8 years ago
http://www.adobe.com/devnet/flash/articles/flash_selenium_03.html
Per this I should be using id="clickcolors", but you asked to use 
name="clickcolors"
can you please clarify in details on this.

view source for the hosted site is as below
----------------
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#
versi
on=8,0,0,0" width="100" height="100" id="clickcolors" align="middle"> 
        <param name="allowScriptAccess" value="sameDomain" /> 
        <param name="movie" value="Talker.swf" /> 
        <param name="quality" value="high" /> 
        <param name="bgcolor" value="#ffffff" /> 

        <embed src="ColoredSquare.swf" quality="high" bgcolor="#ffffff" width="500" 
height="500" name="coloredSquare" align="middle" allowscriptaccess="*" 
type="application/x-shockwave-flash" 
pluginspage="http://www.macromedia.com/go/getflashplayer" />   

Original comment by vikram.s...@gmail.com on 25 Jan 2010 at 4:43

GoogleCodeExporter commented 8 years ago

I am having the same exact issue as vikram.silk using the instructions from 
adobe.

I tried "coloredSquare" as suggested and got:

"ERROR: Threw an exception: Element ColoredSquare  not found on session 
9e6c527200e34541ac6e1bad18986394"

I have tried this with both FF 3.0.17 and 3.5.7.

I understand that this function that is listed as part of the ActionScript 
'should' 
make the callbacks available, but I can't figure out how to verify they are OR 
if any 
are available.  Is there a method to show the calls that exist?  See function 
from 
Adobe's site below:

public function ColoredSquare() {
      currentColor = COLOR_HEX_VALUES[currentColorIndex % 3];
      updateButtonLabel();
      drawButton();
      addEventListener(MouseEvent.CLICK, buttonClicked);

      // functions available for JavaSript calls
      ExternalInterface.addCallback("getColor", getColor);
      ExternalInterface.addCallback("click", changeColor);
      ExternalInterface.addCallback("getSquareLabel", getSquareLabel);
      ExternalInterface.addCallback("setSquareLabel", setSquareLabel);
    }

Original comment by ethan.cl...@gmail.com on 27 Jan 2010 at 12:00

GoogleCodeExporter commented 8 years ago
Hi Ethan,
instead of "ColoredSquare" use "clickcolors" to run the script properly.

But my latest doubts are something different which is about the id

Thanks,
Vikram

Original comment by vikram.s...@gmail.com on 27 Jan 2010 at 11:27

GoogleCodeExporter commented 8 years ago
Getting same issue as shown below

estcase: testColorTransition(com.sun.tests.FlashSeleniumTest):        Caused an 
ERROR
ERROR: Threw an exception: this.browserbot.findElement("clickcolors").click is 
not a function
com.thoughtworks.selenium.SeleniumException: ERROR: Threw an exception: 
this.browserbot.findElement("clickcolors").click is not a function
        at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
        at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
        at com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:262)
        at com.thoughtworks.selenium.DefaultSelenium.getEval(DefaultSelenium.java:461)
        at com.thoughtworks.selenium.FlashSelenium.call(FlashSelenium.java:57)
        at com.sun.tests.FlashSeleniumTest.testColorTransition(FlashSeleniumTest.java:45)

Original comment by thavva...@gmail.com on 3 Dec 2010 at 5:30

GoogleCodeExporter commented 8 years ago
Hi, I am also getting similar error: 

13:52:37.946 INFO - Got result: ERROR: Threw an exception: 
this.browserbot.findElement("clickcolors").getColor is not a function on 
session 270c63ffb6324a478955e294dff0d518

Please let me know how to resolve this. 

Original comment by jayagup...@gmail.com on 11 Jul 2011 at 9:19