skaliber / flash-selenium

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

FlashSelenium.java - createJSPrefix_browserbot fails for iframe embedded swf file #37

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a sample html file with iframe which refers to another html with 
swf file
2. Now create flash-seleniu object and tried to call the ExternalInterface 
function but the script fails.
3.

What is the expected output? What do you see instead?
For swf embedded inside iframe doesn't work.
13:44:16.676 INFO - Got result: ERROR: Threw an exception: 
this.browserbot.findElement("clickcolors").PercentLoaded is not a function 
on session 7824dd0bb8ae46d0bd6340d55568d2e1
com.thoughtworks.selenium.SeleniumException: ERROR: Threw an exception: 
this.browserbot.findElement("clickcolors").PercentLoaded is not a function

What version of the product are you using? On what operating system?
Windows 7, flash-selenim-java-1.0

Please provide any additional information below.
Please refer to attached files , which I used for the testing.

Original issue reported on code.google.com by vikram.s...@gmail.com on 2 Feb 2010 at 10:42

Attachments:

GoogleCodeExporter commented 8 years ago
Please find one more additional update on this issue

ffbrowser
.getEval(" this.browserbot.getCurrentWindow().frames[\"test-
iframe\"].document.getElementById(\"coloredSquare\").getAttribute(\"src\") "); 
this statement is working perfectly fine , it gives result as below 

18:44:04.836 INFO - Command request: getEval[ this.browserbot.getCurrentWindow
().frames["test-iframe"].document.getElementById("coloredSquare").getAttribute
("src") , ] on session f35d42d683584efcab66784c881fcf41
18:44:04.868 INFO - Got result: 
OK,http://flashselenium.t35.com/ColoredSquare.swf on 
session f35d42d683584efcab66784c881fcf41

but when I run as 
ffbrowser
.getEval(" this.browserbot.getCurrentWindow().frames[\"test-
iframe\"].document.getElementById(\"coloredSquare\").click() "); 

it throws below error

18:53:27.834 INFO - Command request: getEval[ this.browserbot.getCurrentWindow
().frames["test-iframe"].document.getElementById("coloredSquare").click() , ] 
on 
session e5f64298af694b4b8cf39abb198678f5
18:53:27.892 INFO - Got result: ERROR: Threw an exception: 
this.browserbot.getCurrentWindow().frames['test-iframe'].document.getElementById
("coloredSquare").click is not a function on session 
e5f64298af694b4b8cf39abb198678f5
com.thoughtworks.selenium.SeleniumException

: ERROR: Threw an exception: this.browserbot.getCurrentWindow().frames['test-
iframe'].document.getElementById("coloredSquare").click is not a function

Original comment by vikram.s...@gmail.com on 2 Feb 2010 at 1:28