SmeeK153 / flash-selenium

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

Window.Document.clickcolors or Window.Document.coloredSquare is null or undefined in IE 7 and Firefox 3.0 #17

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Copy the code given
2. run it thru JUnit from eclipse
3.

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

-:Expecting selenium will call all the flash functions through the test by 
invoking external interfaces functions instead i am getting errors below:
 ----15:20:27.609 INFO - Command request: getEval
[this.browserbot.findElement("colore
dSquare").getSquareLabel('','');, ] on session 
f1c45df136464a0fbc7e0b3e611dc4de
15:20:27.640 INFO - Got result: ERROR: Threw an exception: Error calling 
method
on NPObject! [plugin exception: Error in Actionscript. Use a try/catch 
block to
find error.]. on session f1c45df136464a0fbc7e0b3e611dc4de

---------and the command history shows like this:
getTitle()
setContext(f1c45df136464a0fbc7e0b3e611dc4de)
open(http://www.geocities.com/paulocaroli/flash/colors.html)
getEval(this.browserbot.findElement("coloredSquare") == null)
getEval(this.browserbot.findElement("coloredSquare").getSquareLabel(''...

What version of the product are you using? On what operating system?
-: Selenium RC v1.0 beta-2[2571] with Core v1.0-beta-2 on Windows XP

Please provide any additional information below.

 I first tried and declared the flash object as: 
 flashApp = new FlashSelenium(selenium, "clickcolors");

then again with coloredSquare as i saw somewhere they asked to change:
  flashApp = new FlashSelenium(selenium, "coloredSquare");

 But both gave me the same error.

Original issue reported on code.google.com by arunb...@gmail.com on 6 Jun 2009 at 9:56

GoogleCodeExporter commented 8 years ago
Now after adding a new flash selenium jar file, the coloredSquare as id is 
recognizing and my test is running because i can see in the console that 
flashApp.percentageloaded() function is working. But the external interfaces 
function is not working and i am getting error like this:

10:25:32.484 INFO - Command request: getEval[this.browserbot.findElement("colore
dSquare").getColor('GREEN');, ] on session e76df00dc80a4ff998f41d449b68f200
10:25:32.562 INFO - Got result: ERROR: Threw an exception: Error calling method
on NPObject! [plugin exception: Error in Actionscript. Use a try/catch block to
find error.]. on session e76df00dc80a4ff998f41d449b68f200

Can anyone help me out on this?

Original comment by arunb...@gmail.com on 9 Jun 2009 at 4:56

GoogleCodeExporter commented 8 years ago
Even I am facing the same issue
the code is

Selenium.ISelenium selenium;
            selenium = new Selenium.DefaultSelenium("localhost", 4444, "*iehta",
"http://www.geocities.com/paulocaroli/flash/colors.html");
            selenium.Start();
            selenium.Open("http://www.geocities.com/paulocaroli/flash/colors.html");

            FlashSelenium.FlashSelenium flashApp = new
FlashSelenium.FlashSelenium(selenium, "coloredSquare");   
// or clickcolors 

  Assert.AreEqual("100", flashApp.PercentLoaded());

An exception is throws :(for both clickcolors and colourSquare)
15:45:36.396 INFO - Got result: ERROR: Threw an exception:
window.document.coloredSquare is undefined on session 
a8c892b19da4438dbe28b6c50215441e

Does any one have any solution

Original comment by lively.a...@gmail.com on 22 Sep 2009 at 10:47

GoogleCodeExporter commented 8 years ago
Merging this issue with issue # 31.

NPObject error can be handled with the workaround specified in issue #31

Original comment by sachin.s...@gmail.com on 3 Dec 2009 at 5:09