Page 1 of 1

Automation Framework

Posted: Wed Jul 20, 2011 2:36 pm
by omayer
Is it feasble ? common shared library across the board for 3/4 different applications which are built on diff technology-
1. Coldfusion 2. PeopleTools and 3. .NEt
-- how will it be recognized similar controls but different technology involved. ex- firstname(txtFirstname)
-- is it easy to maintain ?
-- how robust will it be
please provide any pros and cons-
Thanks
Beginner

Re: Automation Framework

Posted: Wed Jul 20, 2011 4:08 pm
by Ciege
Sure it is feasible. My framework contains methods for .NET, DOM, Excel, SQL and general helper code. All of which I put into their own classes within the same solution. Then I compile as a DLL and reference that DLL from within each automated test case that I write.

Very easy to use this way since if you have any changes that need to be made they are only required to be made in one place.

You could do it the way I described or you could create a separate DLL for each technology that you use and only reference those framework DLLs that are required by your current test.

Re: Automation Framework

Posted: Wed Jul 20, 2011 4:25 pm
by omayer
Thank you Ciege,
How do you get the control to click when 3 diff app has 3 diff xpath using a same method.
beginner

Re: Automation Framework

Posted: Wed Jul 20, 2011 5:49 pm
by Ciege
My methods take in different variables.
For example, my PushbuttonClick method takes a RanorexForm variable and a button name variable. Then in the method itself I search the passed in form for the button name that was passed in.

Code: Select all

public static int PushButtonClick(Ranorex.Form RanorexFormName, String PushButtonName)
However, you can craft your method to take in whichever variables you want, such as a form and an xPath then it will use the xPath you pass in.

Re: Automation Framework

Posted: Wed Jul 20, 2011 6:54 pm
by omayer
Hi Ciege, how to read test data from .csv file then pass it to testcase method, any input will help
Thanks,
Beginner

Re: Automation Framework

Posted: Wed Jul 20, 2011 6:59 pm
by Ciege
Do you know how to read data from the CSV file yet? If no, learn that... If yes, read the data, assign the information to a variable, pass that variable to the method.
It's quite simple...

You can either use Ranorex's CSV data connector or develop your own data reader through .NET code and read the data.