Monday, March 9, 2009

FunFX and Firewatir on JRuby

Hi

Today we wanted to get FUNFX tests running by Maven and then it was easier to get things going with JRuby than with Ruby. We found that regular Firewatir for the moment does not support JRuby, but we found a patch by Sai Venkatakrishnan here http://rubyforge.org/pipermail/wtr-development/2008-November/000323.html

This patch worked great for us on Firewatir 1.6.2. Maybe this patch has been entered into the next release candidate, I did not check. But copy the patch into the case statement in firewatir.rb where it checks for java and you are good to go.

Works great for us.

Thanks Sai!

After installing JRuby and FunFX with the gem installer for JRuby and the same with Firewatir. Just run your scripts with jruby instead of ruby.

Friday, January 30, 2009

FunFX 0.2.2 released on Rubyforge

Hi everybody.

Again I am so sorry that I have not updeted this blog.

But now we have released the 0.2.2 version on Rubyforge. Have not yet had the time to get up and going a real getting started guide. But have started one here http://wiki.github.com/peternic/funfx

Please just edit the page and add what ever you find missing or is nice to know for the next person.

To install FunFX: gem install funfx :-)

Monday, December 1, 2008

FunFX 0.2.0

Hi everybody

I am sorry about the slow update rate of this blog. I have lately been developing the new FunFX. It is still located at github.com
(http://github.com/peternic/funfx/tree/master)

We are going to release it on Rubyforge soon, but please try it by downloading it from github.

It is much better that the first version, and there are just small changes you need to do to your test scripts.

- Peter

Tuesday, August 19, 2008

Taking FunFX to the next level

Hi everybody

FunFX have been needing a facelift for a while now. It works, but there are aspects of FunFX that bearly works.

Aslak Hellesøy, a colleague from BEKK and creator of many fantastic Ruby applications, has taken the initiative to help me improve FunFX.

The bad thing about this facelift will be that there will be some changes in the way test scripts are written, so some rewriting will be necessary.

The first thing we have done is to base FunFX on Watir. This will make it simpler to get going with FunFX and alot of functionality is allready in place.

In the current version, all ruby classes of the Flex objects are created at runtime and in memory. This has made it difficult to begin using FunFX due to bad documentation. In the next version, these classes will be created on file, so that there will be a nice rdoc explaining these classes making it easier to use.

We have also changed to git instead of subversion, so it will be possible to create own versions, that we can merge.

I will write more about the upcomming FunFX during development. For now it is possible to find the new FunFX source at github.com. But notice that it is still early in development.

Hope you will use the new version!

Friday, July 11, 2008

Use the new Flex 3 components like AdvancedDatagrid

Hi

I just recently (yesterday) needed to test a advanced datagrid. I have just tested it as a regular datagrid for the moment. I have not been able to release a fix for this, so I write about it here instead, since I am going on a holiday now for the next 2 weeks.

To be able to utilize the advanceddatagrid you need to include a new file to the Flex project automation_dmv.swc. But with this file included the FunFX version out fails. But with a quick fix this will not be a problem.

Ilkka Kudjoi have made a fix, which is located http://dpaste.com/62646/. His fix makes FunFX only care about automationchildren. I used to only care for automationchildren, but changed it for a while back, but do not remember that for the moment.

So try it if you would like. But will release a new version i agust.

Have good summer!

Monday, June 23, 2008

Automation.swc locks application

Hi, I had a strange problem at work last week. The problem was when I added automation.swc and automation_agent.swc to a new project I am working on, all controls was lokced. I was not able to click on any objects. But as soon as I removed the swc files, everything worked great.

I did not have the time to take a closer look at the problem until today. And searched flexcoders (a great group by the way for information about Flex and Actionscript), to see if anyone else been through the same thing. And what do you know :-) At this post, I got to this site.

The problem seems to be that if you have an invisible container of some sort that overlaps other containers, that container will steal all the focus from any other container.

The solution to this problem is to add an eventlistener to the stage to be able to locate the container. And when you have discovered the container, add mouseEnabled="false" to it. Then everything should be working!

Thursday, June 12, 2008

Use FunFX together with Watir

Usually Flex applications uses a regular HTML pages for authentication or by other support. When this is the case, FunFX alone is not able to get to the Flex part. In these situations you can use the excellent tool Watir.

To make Watir work together with FunFX you do the same setup as usually with FunFX, but you also require watir, and attaches Watir to the browser FunFX started. With the example below I use the the title of the page to make Watir understand what browser to choose.

@ie = Funfx.instance@ie.start(true)
@ie.speed = 1
@ie.goto("http://localhost/flexapplication.html", "flexapplication")
$browser = Watir::IE.attach(:title, "PageTitle")


When you have done this, both the FunFX instance and the Watir instance is able to control the browser. But one thing you should watch out for is that when FunFX enter the Flex application, it must set the flex object again, so either if you use FunFX to navigate to the Flex application, you can define the flex object in the goto statement. Or you can use the setFlexObject method.

@ie.goto("www.google.com", nil)
$browser.text_field(:name, "q").set "pickaxe"
$browser.button(:name, "btnG").click
@ie.goto("http://localhost/flexapplication.html", "flexapplication")
@ie.button("buttonName").click


@ie.set_flex_object("flexapplication")