skaliber / flash-selenium

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

window.document.clickcolors is undefined #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run the sample Colors test.

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

I expect the test to pass.  Instead, I see this error.

com.thoughtworks.selenium.SeleniumException: ERROR: Threw an exception:
window.document.clickcolors is undefined
http://code.google.com/hosting/settings
What version of the product are you using? On what operating system?

flashselenium.jar....latest.
Please provide any additional information below.

Original issue reported on code.google.com by michael0...@hotmail.com on 17 Dec 2008 at 6:29

GoogleCodeExporter commented 8 years ago
which browser are you using ?

Original comment by ybh...@gmail.com on 18 Dec 2008 at 11:15

GoogleCodeExporter commented 8 years ago
I am using firefox with the url 
http://www.geocities.com/paulocaroli/flash/colors.html 
to test flash 
But i am getting the follwing error 

SeleniumCommandError: ERROR: Threw an exception: 
window.document.clickcolors has no properties 
    D:/ruby/lib/ruby/site_ruby/1.8/selenium.rb:164:in `do_command' 
    D:/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout' 
    D:/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout' 
    D:/ruby/lib/ruby/site_ruby/1.8/selenium.rb:148:in `do_command' 
    D:/ruby/lib/ruby/site_ruby/1.8/selenium.rb:172:in `get_string' 
    D:/ruby/lib/ruby/site_ruby/1.8/selenium.rb:936:in `get_eval' 
    D:/ruby/lib/ruby/site_ruby/1.8/FlashSelenium.rb:43:in `call' 
    D:/ruby/lib/ruby/site_ruby/1.8/FlashSelenium.rb:54:in 
`percent_loaded' 
    Colors.rb:34:in `test_new' 
please help me in this regard. 

Original comment by gki...@gmail.com on 7 Jan 2009 at 10:31

GoogleCodeExporter commented 8 years ago
Instead of http://www.geocities.com/paulocaroli/flash/colors.html, try with a 
custom
page with only the swf.

Original comment by B00n...@gmail.com on 18 Feb 2009 at 11:21

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
We are getting the same same error...

What steps will reproduce the problem?
We tried to Run the sample Colors test and another test using a html with only 
one
.swf, both returned the same error.

What is the expected output? What do you see instead?
The test crashes when we use any command related to FlashSelenium. Commands 
related
to only Selenium works properly (GetTitle, GetElementHeight).

What version of the product are you using? On what operating system?
We are using Windows XP, tried it in Firefox 3 and IE7.
We tried the latest version of FlashSelenium, but we got an error we couldn't 
solve:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or 
assembly
'FlashSelenium.r25.dll'. 
After that we tried the DEPRECATED version from Oct 04, 2008.

Now we got an error every time we tried to execute any FlashSelenium command, 
like
PercentLoaded, TotalFrames, Call. The only command which worked (ot at least 
didn't
throw any exception) so far was "WaitforPageLoad".

If anyone got a solution already, please, let me now.

Thanks in advance,
Carlos

Original comment by carlos.o...@gmail.com on 27 Feb 2009 at 7:24

GoogleCodeExporter commented 8 years ago
I have faced same problem and can add few comments:

 Problem appears if I run selenium-server with "-multiWindow" parameter. Both for IE7
and FF3. It looks like FlashSelenium is trying to access not page that I want 
to test
(http://www.geocities.com/paulocaroli/flash/colors.html) but selenium page 
(with last
4 executed commands and so on)

If I run selenium-server without "-multiWindow" parameter then it almost works. 
In FF3 test passed (I was able to get label, click, get new label from flash 
object).
But in IE7 FlashSelenium succeeded with getting label, but failed with executing
"click" command.

Is there any chance to run all commands using "-multiWindow" parameter for
selenium-server?

And if anyone have a solution for that, please let me now.

-regards
Pavlo

Original comment by Pavlo.Ba...@gmail.com on 6 Mar 2009 at 11:20

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Run the sample Colors test.

What is the expected output? What do you see instead?
I expect the test to pass.  Instead, I see this error:
Selenium.SeleniumException: ERROR:Threw an exception: 
widow.document.clickColors is 
undefined.

What version of the product are you using? On what operating system?
FlashSelenium.r25.dll
Windows XP, FF3.0.6

Please provide any additional information below.
The test always stoped at the very beginning:
flashApp = new FlashSelenium.FlashSelenium(selenium, "clickcolors");

Original comment by fsong...@gmail.com on 14 Apr 2009 at 7:55

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
By the way
i run the Selenium-server without "-multiWindow" parameter
just "java -jar selenium-server.jar"

the error "widow.document.clickColors is undefined." still exists

Original comment by fsong...@gmail.com on 14 Apr 2009 at 9:13

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I have a similar problem, but I did not run the example JUnit test -- I 
converted it
to Python and ran it as a Python unittest.  I can post the entire unittest 
script, if
that helps.

flash-selenium version: Flash-Selenium_python_client_r37.zip 
Selenium RC version: selenium-remote-control-1.0-beta-2
OS: Mac OSX 10.5.6 Leopard
Python version: 2.5.4.

I get errors when calling the following: 
    assert self.flashApp.percent_loaded() == 100
    assert self.flashApp.call("getColor") == ColorsTest.GREEN
    assert self.flashApp.call("getSquareLabel") == "(Click here)"

Here are some of the error messages I received (this is from multiple 
executions of
the script, with different parts commented out so I could show you a variety of 
error
messages, otherwise it would just fail on percent_loaded()):

======================================================================
ERROR: testRectangleLabel (__main__.ColorsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_flashselenium.py", line 19, in setUp
    assert self.flashApp.percent_loaded() == 100
  File "/Users/metametagirl/sandbox/com/thoughtworks/selenium/FlashSelenium.py", line
49, in percent_loaded
    return self.call("PercentLoaded")
  File "/Users/metametagirl/sandbox/com/thoughtworks/selenium/FlashSelenium.py", line
44, in call
    return self.seleniumObj.get_eval(self.jsForFunction(functionName, list(parameter)))
  File "/Users/metametagirl/sandbox/com/thoughtworks/selenium/selenium.py", line
1105, in get_eval
    return self.get_string("getEval", [script,])
  File "/Users/metametagirl/sandbox/com/thoughtworks/selenium/selenium.py", line 206,
in get_string
    result = self.do_command(verb, args)
  File "/Users/metametagirl/sandbox/com/thoughtworks/selenium/selenium.py", line 202,
in do_command
    raise Exception, data
Exception: ERROR: Threw an exception: window.document.clickcolors.PercentLoaded 
is
not a function

======================================================================
ERROR: testColorTransition (__main__.ColorsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_flashselenium.py", line 31, in testColorTransition
    assert self.flashApp.call("getColor") == ColorsTest.GREEN
  File "/Users/metametagirl/sandbox/com/thoughtworks/selenium/FlashSelenium.py", line
44, in call
    return self.seleniumObj.get_eval(self.jsForFunction(functionName, list(parameter)))
  File "/Users/metametagirl/sandbox/com/thoughtworks/selenium/selenium.py", line
1105, in get_eval
    return self.get_string("getEval", [script,])
  File "/Users/metametagirl/sandbox/com/thoughtworks/selenium/selenium.py", line 206,
in get_string
    result = self.do_command(verb, args)
  File "/Users/metametagirl/sandbox/com/thoughtworks/selenium/selenium.py", line 202,
in do_command
    raise Exception, data
Exception: ERROR: Threw an exception: window.document.clickcolors.getColor is 
not a
function

======================================================================
ERROR: testRectangleLabel (__main__.ColorsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_flashselenium.py", line 25, in testRectangleLabel
    assert self.flashApp.call("getSquareLabel") == "(Click here)"
  File "/Users/metametagirl/sandbox/com/thoughtworks/selenium/FlashSelenium.py", line
44, in call
    return self.seleniumObj.get_eval(self.jsForFunction(functionName, list(parameter)))
  File "/Users/metametagirl/sandbox/com/thoughtworks/selenium/selenium.py", line
1105, in get_eval
    return self.get_string("getEval", [script,])
  File "/Users/metametagirl/sandbox/com/thoughtworks/selenium/selenium.py", line 206,
in get_string
    result = self.do_command(verb, args)
  File "/Users/metametagirl/sandbox/com/thoughtworks/selenium/selenium.py", line 202,
in do_command
    raise Exception, data
Exception: ERROR: Threw an exception: 
window.document.clickcolors.getSquareLabel is
not a function

Original comment by metameta...@gmail.com on 14 Apr 2009 at 10:04

GoogleCodeExporter commented 8 years ago
i encountered the similar problem with  metametagirl, my environment as 
following:
flash-selenium version: Flash-Selenium_python_client_r37.zip 
Selenium RC version: selenium-remote-control-1.0-beta-2
OS: winxp professional
Python version: 2.6

I ran the code and get the errors as following:
        flashapp.open("http://www.geocities.com/paulocaroli/flash/colors.html")
        self.assertEquals("Clicking Colors", sel.get_title())
        flashapp.call("click")
Traceback (most recent call last):
  File "E:\work\project\webauto\worldexpo-web-auto\flashseltest.py", line 21, in test_new
    flashapp.call("click")
  File "C:\Python26\Lib\site-packages\FlashSelenium.py", line 44, in call
    return self.seleniumObj.get_eval(self.jsForFunction(functionName, list(parameter)))
  File "C:\Python26\lib\site-packages\selenium.py", line 1184, in get_eval
    return self.get_string("getEval", [script,])
  File "C:\Python26\lib\site-packages\selenium.py", line 219, in get_string
    result = self.do_command(verb, args)
  File "C:\Python26\lib\site-packages\selenium.py", line 215, in do_command
    raise Exception, data
Exception: ERROR: Threw an exception: 'window.document.clickcolors' is null or 
not an
object.

Original comment by xiang.da...@inventec.com.cn on 16 Apr 2009 at 7:02