Framework development

Ask general questions here.
Posts: 56
Joined: Wed Jun 10, 2015 4:35 pm

Framework development

Post by satishmohan » Sat Jan 28, 2017 11:14 am

I want to develop a Framework so that all actions are covered which appear on UI like click, select option, read text, etc and the UI element ids i want them to pass through a file so that any new addition of Test cases i can just add the xpaths in the file and the corresponding action. Then the code/method in the framework can just read the xpaths for the additional tests

User avatar
Ranorex Guru
Ranorex Guru
Posts: 6553
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Framework development

Post by odklizec » Mon Jan 30, 2017 9:00 am


I'm not quite sure what you are trying to achieve, but I think you are trying to reinvent the wheel? ;) Why would you want to write your own framework, if there is already a very nice and reliable Ranorex framework with repository and recording/code modules? I seriously doubt anything you will cook up with "plain text" will be as reliable and powerful as is already available in Ranorex Studio? Could you please describe in more details, what exactly is your problem you trying to overcome?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Posts: 56
Joined: Wed Jun 10, 2015 4:35 pm

Re: Framework development

Post by satishmohan » Mon Jan 30, 2017 5:41 pm

I would want to create a class which contains basic methods like click, getText, select value from dropdown which covers basic actions on any webpage. On other hand have an excel where i create a repository of XPaths for UI Elements in one column(A) and other column(B) the action (example CLICK). Now my code will read what action to be performed from column-B, then Take the xpath from column A. By doing this to add new Test cases or more actions to exsiting Test case i just need to add the actions in column A and get the xpath for element in col-B.

Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Framework development

Post by krstcs » Mon Jan 30, 2017 6:33 pm

I agree with what Pavel said, I think you are recreating what Ranorex already does. Ranorex is a great toolset, you should use what you have in front of you instead of trying to make it into something else.
Shortcuts usually aren't...

Posts: 32
Joined: Tue Jan 06, 2015 7:22 am

Re: Framework development

Post by Shakib » Wed Feb 01, 2017 11:52 am

hi satishmohan,
Let me try to see exactly what you want to do , please correct me if i am wrong:

I think you are not aware with Ranorex features properly, so let me make it more simple what are you are looking :

1.You want class which contains click , getText, SelectvalueFromDDL etc,
2. You want excel which control name(following xpath)and action type.
3. You want to read excel and perform the action for particular control.

Above things we need in other tools like Selenium because it does not provide us a separate entity for every functionality.

But Ranorex provide us

1. In built function(via libraries) for any control(text box, button, etc).
Click(), PressKeys("Value")
So you dont need to write any class for any function like click and all.

2. It provides you the repository where you can keep the tracked control(control contains rx path also).
through that you can perform any functionality, you dont need any excel for telling the user that this control requires only individual functionality.

3. User defined code module .
Where user can write logic like etc

I think now you can understand the power of Ranorex :)
or if you find difficulty then please reply

Posts: 56
Joined: Wed Jun 10, 2015 4:35 pm

Re: Framework development

Post by satishmohan » Mon Feb 06, 2017 1:08 pm

Hello Team,
Thank you for writing back. Please look into the attachment and suggest further pls.
1. I would want to capture most of my UI Elements in variables and will do so in a single or multiple usercode class(es). So that i can declare them once and use in multiple Test scenarios.

2. Then in the excel i Just keep adding the variableNames(of UI Elements) and corresponding actions. I will write an iterative method which reads every variable and action and perform the action. over a period i will have most of the actions in methods and Elements as variables. To add a new test case or enhance one of the Test scenario i just need to enter the variable names and actions in excel and need to touch or improve the Code.

Please suggest if I was clear. Since i have developed a framework in selenium which was useful for maintenance or Test enhancements, looking to see if it can be done here
Ranorex_Framework_Actions.JPG (72.41 KiB) Viewed 1232 times

Posts: 152
Joined: Fri Aug 15, 2014 12:24 pm

Re: Framework development

Post by Martin » Mon Feb 06, 2017 2:00 pm

This is what Ranorex Studio does. When you link the funcationality you've explained to an excel data sheet, you actually make the manageing and creating of test cases worse. Plus in many cases you would lose many useful functionalities covered by Ranorex.

I really can't see any benefit for this compared to using Ranorex Studio in the scenarios you've explained to us. Mangeing the elements for example would be per-row/per-element/per-datasheet. Whereas using Ranorex Studio you could get by with just editing an item in Repository which would correlate to every element in the test scnearios.

In my opinion as well you are re-inventing the wheel and to be honest with a lot less functionality, possiblities and rapid growth of unneeded management.

Posts: 56
Joined: Wed Jun 10, 2015 4:35 pm

Re: Framework development

Post by satishmohan » Mon Feb 06, 2017 3:10 pm

Okay. Thats true that in studio we also get all related actions/options while editing any Item from the Repository. Makes sense for me now. Thanks All