Flex testing - add new functionality - Call Selenium Api usage

167 views
Skip to first unread message

Anca Nitu

unread,
Feb 23, 2011, 4:38:29 AM2/23/11
to robotframework-users
Hi all!
I have some questions related to flex testing and adding testing
functionality to Selenium.
I want to make some tests with the functionality for some other mouse
events than the ones that Selenium Library currently has keywords
(e.g. Mouse Up event) and I found the keyword Call Selenium Api.

I tried a test to call Call Selenium Api for flex click.
In the Keywords section, it is defined:
| Submit credentials |
| | SeleniumLibrary.Call Selenium Api | flexClick | btLogin |

I receive an error :
ERROR: Element btLogin not found

But btLogin exists and it works fine with Click Flex Element

Quote from documentation:
Call Selenium Api
This keyword can be used if some functionality provided by Selenium is
not yet exposed as a keyword.

method_name is the name of the method to call in the Selenium API and
args specify the arguments it expects.

The keyword first tries to find a method in Selenium's Python API
provided by the selenium.py file. If no matching method is found, the
keyword calls the Selenium Server's Remote Controller API directly via
the do_command method in the Python API [1]. In both cases the keyword
returns the return value of the call directly without any
modifications or verifications.
-----
Could the method Call Selenium Api be called for flex test cases? Or
is it other keyword that should be used for flex case?(from what i
investigated the flex methods are not present in selenium.py, but in
flex,.py, but anyway, in the user-extensions.js, the flex methods are
added to the RemoteSelenium).

Thanks,
Anca Nitu.

sandeep s

unread,
Feb 23, 2011, 5:24:34 AM2/23/11
to zabe...@gmail.com, robotframework-users
Did you go through this link and did the pre-requsites whats needed to be automated?

-Sandi


--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To post to this group, send email to robotframe...@googlegroups.com.
To unsubscribe from this group, send email to robotframework-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/robotframework-users?hl=en.


sandeep s

unread,
Feb 23, 2011, 5:24:56 AM2/23/11
to zabe...@gmail.com, robotframework-users

nitu anca

unread,
Feb 23, 2011, 5:40:39 AM2/23/11
to sandeep s, robotframework-users
Yes, sorry, I forgot to mention that i have the working testing case for Flex. I have a login test case that works and I'm using Click Flex Element :
| Submit credentials |
|                    | SeleniumLibrary.Click Flex Element | btLogin |

And i've modified it to use Call Selenium Api instead of Click Flex Element.
| Submit credentials    |
|                               | SeleniumLibrary.Call Selenium Api     | flexClick | btLogin |
Which throws an error.

Pekka Klärck

unread,
Feb 23, 2011, 4:51:24 PM2/23/11
to zabe...@gmail.com, robotframework-users
2011/2/23 Anca Nitu <zabe...@gmail.com>:

> Hi all!
> I have some questions related to flex testing and adding testing
> functionality to Selenium.
> I want to make some tests with the functionality for some other mouse
> events than the ones that Selenium Library currently has keywords
> (e.g. Mouse Up event) and I found the keyword Call Selenium Api.
>
> I tried a test to call Call Selenium Api for flex click.
> In the Keywords section, it is defined:
> | Submit credentials    |
> |                               | SeleniumLibrary.Call Selenium Api     | flexClick | btLogin |
>
> I receive an error :
> ERROR: Element btLogin not found
>
> But btLogin exists and it works fine with Click Flex Element

First of all, why do you want to use flexClick via Call Selenium Api
when you can use Click Flex Element instead??

The reason your attempt didn't succeed is that flexClick expects the
argument to contain information is the argument id, name, chain, or
some other locator strategy understood by Flex Pilot. I think it could
work if you would use `id=btLogin` but I'm not sure. Please refer to
Flex Pilot's documentation or look at the implementation of Click Flex
Element for more information.

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

nitu anca

unread,
Feb 28, 2011, 4:28:56 AM2/28/11
to Pekka Klärck, robotframework-users
Pekka, thanks for your answer!
I wanted to add right click functionality for flex applications in the tests, and thought i could use Call Selenium Api.
I tried with click to see if it's working, but didn't seem to work.
But I've found in the documentation how to extend RobotFramework using BuiltIn, and i've succedded with this.
Thanks!
Reply all
Reply to author
Forward
0 new messages