Opkey logo

Testing Multilingual Website using SetOR in Opkey

June 1, 2017
/
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.

info-1

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

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

info-2

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.

info-3

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.

info-4

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.

info-5

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.

Portrait of a woman wearing a beige embroidered top.

Iffat Ara Khanam

Technical Content Lead

Iffat is the content lead at Opkey. She has expertise in writing technical content focused around ERP testing, Cloud apps, automation and other IT related topics. She has rich experience in writing content for marketing collateral like whitepapers, case studies, newsletters etc. which helps in funnel creation for sales.

Featured Content

Post

Redwood Is Oracle’s Future—Here’s How to Get There Faster, Smarter, and Without the Risk

Oracle Redwood UX is emerging as the centerpiece of Oracle’s vision for truly intelligent, user-first enterprise software. By 25C, Redwood will be the default cockpit for the HCM Fusion Cloud Pillar, with others to follow (SCM, ERP, and CX). As a result, organizations seeking a competitive edge are already aligning resources, timelines, and change-management plans. Learn how Opkey & Huron's partnership can help you make the most of Oracle Redwood.

Discover what Opkey can do for you.