announcement
Webinar: Unlock the full potential of Oracle HCM with Redwood UI through smart testing | Register now
announcement
Advisory for Oracle Cloud 24B Release | Download now
Testing Multilingual Website using SetOR in Opkey

Testing Multilingual Website using SetOR in Opkey

June 1, 2017
 / 
by 
Iffat Ara Khanam

Now, multilingual website testing is easily possible with Opkey. There are two specific keywords (SetOR & ResetORtoOriginal) which are used while multilingual website testing.

Instructions to be followed while testing a multilingual website with Opkey using SetOR:

1. First of all, set a specific language (suppose English) to your multilingual website to be tested.

2. Create an Object Repository (OR) file by fetching objects manually from your site by using Add Objects from Internet Explorer.

3. Fetch your object(s) by using Navigate and Fetch button.

4. Now, you have an OR file with fetched objects as shown below:

5. Now, create a Function Library file and add test step(s) corresponding to your test scenario.

6. Map your fetched objects and provide input arguments to your corresponding test steps.

7. Execute your Function library file. Your execution should complete successfully.

Note: Here, objective is to automate the same website in other language (suppose Chinese language) by using SetOR and ResetORtoOriginal keywords.

8. Go to your first test step and provide URL of your site in data input arguments of Chinese language (website to be tested in that language).

9. Execute this Function Library file which get failed due to errors like object not found.

10. Now, you need to use SetOR keyword to automate this Chinese language website successfully.

11. Create another Object Repository (OR) file by fetching objects from your site in Chinese language (website to be tested in that language) by using Add Objects from Internet Explorer.

12. Now, you have another OR file in Chinese language as shown below. You must have the same object name in both OR file. So, edit the name of the object fetched in Chinese language as per the object name in first language.

13. You have changed only object names in Chinese language but their properties are same as they fetched.

14. Let us provide URL of website in Chinese language (website to be tested in that language) in data input argument. (You can make a Global variable for the same)

15. Let us add a new test step by using SetOR keyword and provide OR Full Name as data input argument value. (Format: Folder_nameOR_name). For example: RSP_TestBritish_Airways [zh_cn].

Note: While mapping your OR file with the SetOR keyword Test Step, you need to provide full path of the OR file in Provide Data tab. In this case, your OR file must be in Shared mode so that it can be used for Test Execution on Cloud. To share an OR file, right click on OR file in Project Workspace and click Share option.

16. When you execute this FL, you can see that it opens the website in Chinese language and clicks on the targeted object. Finally, your execution completed successfully.

17. In fact, SetOR is used to change OR to be used during runtime instead of the original OR. If you want to go back to your original OR then you just need to add a new test step using ResetORtoOriginal.

18. In this way, you can automate a multilingual website in a hassle free manner.

Contact us