librelist archives

« back to archive

issue using melomel with flash app and swfobject

issue using melomel with flash app and swfobject

From:
Adnan - Mgx Copy
Date:
2012-11-27 @ 19:58
Hello,

I have a flex application that I am trying to test with Melomel. I got 
the test app working and the rspec test passed. I then wrote a simple 
rspec test case to check that when i click a button in my application, a 
popup appears. The problem seems to be that melomel requires you to link 
it directly to the SWF file.

My normal path to the swf is domain.com/application, where an html view 
is loaded and swfobject loads the swf file and handles everything else. 
If i link directly to the swf (domain.com/application.swf), i get a 
bunch of flash errors due to not using swfobject to properly load 
everything that the flash app needs, and rspec ends up hanging. I'm not 
sure if its possible on my end to get around using swfobject and 
avoiding those errors when linking directly to the swf.

Is there any way to get around this issue?

Thanks,

Adnan

Re: [melomel] issue using melomel with flash app and swfobject

From:
Ben Johnson
Date:
2012-11-27 @ 20:20
What happens when you link to the HTML page? Melomel connects over a 
socket connection so it shouldn't matter if it's in an HTML page or direct
SWF.

Ben


On Nov 27, 2012, at 12:58 PM, Adnan - MGX Copy wrote:

> Hello,
> 
> I have a flex application that I am trying to test with Melomel. I got 
> the test app working and the rspec test passed. I then wrote a simple 
> rspec test case to check that when i click a button in my application, a 
> popup appears. The problem seems to be that melomel requires you to link 
> it directly to the SWF file.
> 
> My normal path to the swf is domain.com/application, where an html view 
> is loaded and swfobject loads the swf file and handles everything else. 
> If i link directly to the swf (domain.com/application.swf), i get a 
> bunch of flash errors due to not using swfobject to properly load 
> everything that the flash app needs, and rspec ends up hanging. I'm not 
> sure if its possible on my end to get around using swfobject and 
> avoiding those errors when linking directly to the swf.
> 
> Is there any way to get around this issue?
> 
> Thanks,
> 
> Adnan

Re: [melomel] issue using melomel with flash app and swfobject

From:
Adnan - Mgx Copy
Date:
2012-11-27 @ 21:19
When i link to the html page, the browser opens up, the flash app loads, 
but rspec hangs. rspec hangs on Melomel.connect(). I assumed this was 
melomel not being able to connect because the path wasnt directly 
pointing to the swf, but now  I know that's not true.  Here is the spec 
test:

require 'melomel'
require 'selenium-webdriver'
require 'spec_helper'

describe "The flash application user" do
   before do
     @driver = Selenium::WebDriver.for :firefox
     @driver.navigate.to "http://10.0.0.187/ss.branch.andrew/Wireframe.html"
     Melomel.connect()
     #@wireFrame  = Melomel.find!('WireFrame')
   end

   after do
     @driver.quit() unless @driver.nil?
   end

   it "should be able to open the photo importer" do
     #importer_button = Melomel.find!(spark.components.Button, :label => 
"Import Photos")
     #Melomel.click(button)

   end
end

If i comment melomel.connect(), it doesnt hang and the test runs. 
10.0.0.187 is the IP to my windows 7 machine, which is running flash 
builder. I am running the melomel rspec in a Ubuntu 12.10 VM.

On 11/27/2012 12:20 PM, Ben Johnson wrote:
> What happens when you link to the HTML page? Melomel connects over a 
socket connection so it shouldn't matter if it's in an HTML page or direct
SWF.
>
> Ben
>
>
> On Nov 27, 2012, at 12:58 PM, Adnan - MGX Copy wrote:
>
>> Hello,
>>
>> I have a flex application that I am trying to test with Melomel. I got
>> the test app working and the rspec test passed. I then wrote a simple
>> rspec test case to check that when i click a button in my application, a
>> popup appears. The problem seems to be that melomel requires you to link
>> it directly to the SWF file.
>>
>> My normal path to the swf is domain.com/application, where an html view
>> is loaded and swfobject loads the swf file and handles everything else.
>> If i link directly to the swf (domain.com/application.swf), i get a
>> bunch of flash errors due to not using swfobject to properly load
>> everything that the flash app needs, and rspec ends up hanging. I'm not
>> sure if its possible on my end to get around using swfobject and
>> avoiding those errors when linking directly to the swf.
>>
>> Is there any way to get around this issue?
>>
>> Thanks,
>>
>> Adnan