Showing posts with label QTP - Web application challenges. Show all posts
Showing posts with label QTP - Web application challenges. Show all posts

Saturday, 17 March 2018

Broken Links and any Error links check from the web page with VB Script / UFT / QTP

Some times our customers may requests us to check for links which are broken from the web pages. This might be from the production sites or from the any of the web home page in pre-production sites.

Following code snippet can be used as quick solution to fulfill our requirement.

''#########################################################################
'' Use this code to verify all links are working fine in a already opened web page
''#########################################################################
On Error Resume Next
Set objBrowser = Description.Create
objBrowser("name").Value = "XXXXXXX"
objBrowser("CreationTime").Value = 0
Set objPage = Description.Create
objPage("title").Value = "XXXXX"

Set objLink = Description.Create
objLink("micclass").value = "Link"
objLink("html tag").value =  "A"

Set objBP = Browser(objBrowser).Page(objPage)

Set colLinkObjects = objBP.ChildObjects(objLink)

'Display count of all links

'Msgbox colLinkObjects.Count

inputFilesPath = "D:\Sample\WebLinksCheck.xlsx"
strSheetName = "Sheet1"

For i=2 to colLinkObjects.Count

    strLinkURL =  colLinkObjects(i).GetROProperty("url")
    strLinkName = colLinkObjects(i).GetROProperty("Name")
    ExportData2ExcelFile inputFilesPath,strSheetName,i,1,strLinkName
    ExportData2ExcelFile inputFilesPath,strSheetName,i,2,strLinkURL

    strVerifyMsg = VerifyLinksBroken(strLinkURL)
    ExportData2ExcelFile inputFilesPath,strSheetName,i,3,strVerifyMsg

Next

On Error GoTo 0

'=======================================================================
'Function: ExportData2ExcelFile()
' Description: Exporting runtime value to excel file
'Input: 
' =======================================================================

Public Function ExportData2ExcelFile(inputFilesPath,strSheetName,ColName,intRowNum,strValue)

  On Error Resume Next
'    inputFilesPath = Environment.Value("DataPath")

Set ExcelObj = CreateObject("Excel.Application")
ExcelObj.Visible = False
Set objWorkbook = ExcelObj.Workbooks.Open(inputFilesPath)
Set worksheet = objWorkbook.WorkSheets(strSheetName)

worksheet.cells(ColName,intRowNum).value  = strValue

objWorkbook.Save
objWorkbook.Close
ExcelObj.Application.Quit
Set objWorkbook = Nothing
Set ExcelObj = Nothing

On Error GoTo 0
End Function



Public Function VerifyLinksBroken(strURL)
On Error Resume Next

  'Create a WinHTTP Request using the link's URL
  Set objWinHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
  objWinHTTP.Open "GET", strURL, False
  objWinHTTP.SetRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MyApp 1.0; Windows NT 5.1)"

  'Send the Request to the Server and capture the response
  objWinHTTP.Send
  iReturnVal = objWinHTTP.Status
  strErrorMsg = objWinHTTP.StatusText

  'Find out if the Link exists or is broken
  If iReturnVal = 200 Then
    strMsg = "Link - " & strURL & " Exists"
  ElseIf iReturnVal = 404 Then
    strMsg =  "Link - " & strURL & " is Broken with 404 error"
  Else
    strMsg =  "Error Code - " & iReturnVal & ":"&strErrorMsg&": Problem with this page"
  End If

  Set objWinHTTP = Nothing

On Error GoTo 0
VerifyLinksBroken = strMsg
End Function


Sunday, 18 February 2018

Shared Object Object Repository corrupted in UFT/QTP - INFORMATION CANNOT BE RETRIEVED FOR THE SELECTED TEST OBJECT

Sometimes you will get a message as "Information cannot be retrieved for the selected test object." when you are trying to edit/add shared object repository from Object Repository Manager in UFT/QTP.

It is quite annoying if you have lot of objects added in your shared OR and when you get such message. Once you receive this message in OR you can't add/modify any objects. It throws an error while saving OR.

Remember one thing, there is no direct solution to fix this. Following are few work around options. But some times these work around options too doesn't work. It happened for me too and Micro Focus team didn't provide any fix for this other than providing work around options.

1st Option:
Open the OR in the object repository manager.
Click on file->Export to XML. Save this xml file on the computer.
Close the object repository manager and open it again.
Click on File->Import from xml and import the XML you have just created.
Click on File->Save as to save this imported data as .tsr file.
Open the object repository comparison tool (Tools-> Object repository Comparison tool) and compare the new and the old repository. They should be same.
This newly create OR should resolve the issues.

2nd Option:
Create new empty OR and save it
Open corrupted repository in another window in OR Manager
copy objects whichever you need from corrupted OR to new OR

3rd Option:
Though this is not the option. you can choose this option if you have failed in above 2 options
Create Object Repository again from beginning :)

4th Option:
Keep maintaining back ups while you are creating OR. whenever you

Micro Focus team is aware about this defect in their product.




Wednesday, 2 August 2017

Solution for Internet Explorer (IE) browser crash with HP UFT 14.0

If you miss any of the below settings/actions it will be an issue for IE browser as this crashes or stops working

1. Open “mic.ini” file from the UFT Installation path “C:\Program Files (x86)\HP\Unified Functional Testing\bin”, and the values of the section [ie_hook] should be as below and keep other values in the section as they exist:
[ie_hook]
name=ie_hooksU.dll
method=specific
explorer.exe=yes
iexplore.exe=no 

2. Make sure that “UFT IE Agent BHO” i.e. “HP Functional Testing Agent” is enabled using the below settings: 
IE menu > Tools > Manage Addons > HP Functional Testing Agent = Enabled


3. Remove the temporary files in the system



Click OK and Select all and Click on “Delete” button in the keyboard.

4. Restart UFT & IE


5. Now Open UFT with the Web add-in and open IE and try to record, you will get the recording done without any IE browser crash.




Buy Baby Products in Amazon

Friday, 13 January 2017

Test Case Eligibility Criteria - Feasibility Analysis for Automation Testing

Following are few key points to check test case eligibility criteria/feasibility analysis for automation.

Test Case Eligibility Criteria For Automation
Category Parameters
Test Case/Scenario Structure Test Case should be well documented with
-          Defined test data
-          Prerequisites Documented
-          Clear pre and post conditions should be clearly defined or highlighted for individual steps
Test Tool Feasibility Application objects ranging all the navigational pages across the test flow should be identified by the underline automation tool
System/Test flow Test case should not contain steps that execute that involve partial execution of few steps and then wait for the system refresh for undefined hrs and continue once the system is refreshed with the required data.
These type of test cases fall under partial automation criteria and once automated these test cannot be executed in an unattended way, as the refresh time is not defined
3rd party application integration In case the test case integrates with any 3rd party application, then it would be recommended to  check the data flow between these system to ensure seamless execution of the automated tests.
Test Case Complexity Test case tending to be too complex with respect to automation and having limited execution cycles are not recommended for automation.
Hardware Interaction In case the test case interacts with an external interface, feasibility of the interface is considered while prioritizing the test case for automation, depending on the availability
Cross Browser Testing UFT supports IE, Chrome, Mozilla with limited versions. If there are any test cases for automation to execute on multiple browsers then we have to evalute those browsers with versions
Non Functional Testing - Verifying web page content with alignment, format, auto numbering, paragraphs..etc Not good candiate for Automation
Automation Testing in a Multi-Country / Multi-Lingual Deployment(localization testing) More effort required to create scripts to adopt locatization(multi-lingual) testing. PoC is required to evalute this

Friday, 9 December 2016

Measuring time taking to load object with QTP / UFT (Performance Testing with UFT)

Unlike LoadRunner or any performance testing tools, with QTP/UFT we can't reach to hard core features like running script with multiple Virtual Users as thread or a process. But we can get time taking to load for objects we are looking for.

This is pretty simple by implementing a simple loop and verify for the object is loaded. Below is the code snippet for the same.

Browser("BrowserName").Page("PageName").WebEdit("user").Set "XXXX"
Browser("BrowserName").Page("PageName").WebEdit("password").SetSecure "XXXX"
Browser("BrowserName").Page("PageName").Image("Login").Click
dblStartTime =  timer

set  objLink = Browser("BrowserName2").Page("PageName2").Link("Link1")

blnStatus = WaitForObject(obj)

dblEndTime = timer
'Print blnStatus
'Print dblStartTime
'Print dblEndTime
Print (dblEndTime-dblStartTime)

Function WaitForObject(obj)
    WaitForObject = false
    For i = 0 to 10
        If obj.Exist Then
            WaitForObject = true
            Exit For
        End If
    next

End function

Monday, 1 August 2016

Reading data from PDF files using QTP/UFT tool

Reading data from PDF files using UFT tool

We might have come across reading the pdf files (probably reports) while automating our test cases. Many of our Automation testers might have faced difficulties to access PDF files, but with below approach we can overcome this issue and play around with PDF files with UFT tools.

Accessibility of PDF
The Adobe Portable Document Format (PDF) is a file format for representing documents in a manner independent of the application software, hardware, and operating system used to create them, as well as of the output device on which they are to be displayed or printed.
PDF files specify the appearance of pages in a document in a reliable, device independent manner Adobe provides methods to make the content of a PDF file available to assistive technology such as screen readers. On The Microsoft Windows operating system, Adobe Acrobat and Adobe Reader export PDF content as COM objects. Applications can interface with Acrobat or Adobe Reader in two Ways:

1. Through Microsoft's Active Accessibility (MSAA) interface, using MSAA objects that Acrobat or Adobe Reader exorts.
2. Directly through exported COM objects that allow access to the PDF document's internal structure, called the Document Object Model (DOM).

The Microsoft Windows version of Acrobat is an OLE Automation server. In order to use the OLE objects made available by Acrobat, we must have the full Acrobat product installed on your system!!

For creating OLE AcroExch.App objects , we requires trail/licensed version of acrobat professional or Licensed version of acrobat standard.
We cannot create above object with without installing acrobrat professional/standard softwares, It gives activeX error. No trail version for acrobat standard available.

How to install acrobat professional software:
With the URL: https://acrobat.adobe.com/us/en/free-trial-download.html?sdid=KQUSA

Click on “Get started” button
This will take few minutes to download.
At the end it downloads software with name: acrobatProDCXXXXXXXXXX.exe
Install it with admin rights.
This whole installation process takes 20-30 minutes time
Once installation is ready, you are good to go to create Acrobat COM and DOM objects (AcroExch.App, AcroExch.AVDoc)

Below is the sample code to read PDF file with AcroExch OLE object
’Below Function reads to PDF file and put the content in txt file.
Call PDF_ReadPDFFileAndSaveinTextFile("C:\Govardhan\Testing\mi-certificate1.pdf","C:\Govardhan\Testing\testt.txt")

Public Function PDF_ReadPDFFileAndSaveinTextFile(strPDFFilePath,strTxtFilePath)
     
    On Error Resume Next
 
    'strFileName = "C:\Govardhan\Testing\mi-certificate1.pdf"
    Set AcroApp = CreateObject("AcroExch.App")
    AcroApp.Show
    Set AcroAVDoc = CreateObject("AcroExch.AVDoc")
    AcroAVDoc.Open strFileName,""
    Set AcroAVDoc = AcroApp.GetActiveDoc
    Set AcroPDDoc = AcroAVDoc.GetPDDoc
 
    For i = 0 To AcroPDDoc.GetNumPages - AcroPDDoc.GetNumPages
 
      ' AcquirePage: Acquires the specified page. The first page in a PDDoc is always 0. returns true if successful and false otherwise.
 
      Set PageNumber = AcroPDDoc.AcquirePage(i)
 
      'the Hilite list object is being created
 
       Set PageContent = CreateObject("AcroExch.HiliteList")
       PageContent.Add 0, 20 ' getting 3 words of first page.
 
     'text selection AcroTextSelect is being created
 
       Set AcroTextSelect = PageNumber.CreateWordHilite(PageContent)
 
       'GetNumText: Gets the number of text elements in a text selection. Use this method to determine how many times to call the PDTextSelect.GetText method to obtain all of a text selection’s text.
 
       For j = 0 To AcroTextSelect.GetNumText -1
            Content = Content & AcroTextSelect.GetText(j)
        Next
    Next
 
    msgbox Content
 
    'strFile = "C:\Govardhan\Testing\test.txt"
    strText = Content
 
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Const ForAppending = 8
 
    Set objTextFile = objFSO.OpenTextFile (strFile, ForAppending, True)
    objTextFile.WriteLine(strText)
    objTextFile.Close
 
    AcroAVDoc.Close True
    AcroApp.Exit
    Set AcroDoc = Nothing
    Set AcroApp = Nothing
    On Error GoTo 0
End Function

With this OLE object we can get below properties of PDF file
Time, show, minimize, maximize, hide, FindText, GetTitle, Open, Print size, showtextselect, GetPageNum, GetText, Getpage, Create, delete..etc)

Wednesday, 20 July 2016

Deleting Browser Temporary files, Cookies, History with QTP-VBScript

When we are executing end to end Automation scripts(from login to logoff) in batch mode, we may come across an issue in one of the scripts and script doesn't execute logoff functionality and hence next script tries to open browser and perform login functionality  whereas application retains the session we have used previously and directly opens home page by logged in already.

If we have not done exception handling on this are then there are lot of chances to get our next scripts fails in the batch and this is blocker for batch(night mode) execution

Below are the few options to resolve this issue.

Delete the browser history, temp files, cookies while launching browser always(you can include this in login functionality, so that this will always makes sure it don't retain previous session)

Though we perform above action, if still session is getting retained then we can implement logic in Login script to verify application is launched with login page or home page, if it is displayed home page then logoff and call the login functionality again.

Below are few options to delete Browser Temporary files, Cookies, History with QTP-VBScript

'Option 1:
ClearBrowserHistory
Function ClearBrowserHistory
Dim temp
Set fso = CreateObject ("Scripting.FileSystemObject")
Set winsh = CreateObject ("Wscript.Shell")
Set temp = fso.GetFolder (winsh.ExpandEnvironmentStrings("%TEMP%"))
On Error Resume Next

For each ofile in temp.Files
fso.DeleteFile ofile
Next

For Each osubfldr in temp.subfolders
fso.DeleteFolder (osubfldr),true
Next
wscript.quit
End Function

'Option 2:
Webutil.DeleteCookies

'To clear temporary Internet files
Set WShell = CreateObject("WScript.Shell")
WShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8"

'To Clear Browsing History
WShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1"

Wait (10)

'Option 3:
'To clear temporary Internet files
Set WshShell = CreateObject("WScript.Shell")
WshShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8"

'To clear browsing cookies
WshShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2"

'To Clear Browsing History
WshShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1"

'Below are few more options to use
Browser("Browser Name").ClearCache
Browser("Google.com:").DeleteCookies "Google"
WebUtil.deletecookies '-> It will delete the entire cookies session which will present in your system.

Deleting Browser Temporary files, Cookies, History with QTP-VBScript

When we are executing end to end Automation scripts(from login to logoff) in batch mode, we may come across an issue in one of the scripts and script doesn't execute logoff functionality and hence next script tries to open browser and perform login functionality  whereas application retains the session we have used previously and directly opens home page by logged in already.

If we have not done exception handling on this are then there are lot of chances to get our next scripts fails in the batch and this is blocker for batch(night mode) execution

Below are the few options to resolve this issue.

Delete the browser history, temp files, cookies while launching browser always(you can include this in login functionality, so that this will always makes sure it don't retain previous session)

Though we perform above action, if still session is getting retained then we can implement logic in Login script to verify application is launched with login page or home page, if it is displayed home page then logoff and call the login functionality again.

Below are few options to delete Browser Temporary files, Cookies, History with QTP-VBScript

'Option 1:
ClearBrowserHistory
Function ClearBrowserHistory
Dim temp
Set fso = CreateObject ("Scripting.FileSystemObject")
Set winsh = CreateObject ("Wscript.Shell")
Set temp = fso.GetFolder (winsh.ExpandEnvironmentStrings("%TEMP%"))
On Error Resume Next

For each ofile in temp.Files
fso.DeleteFile ofile
Next

For Each osubfldr in temp.subfolders
fso.DeleteFolder (osubfldr),true
Next
wscript.quit
End Function

'Option 2:
Webutil.DeleteCookies

'To clear temporary Internet files
Set WShell = CreateObject("WScript.Shell")
WShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8"

'To Clear Browsing History
WShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1"

Wait (10)

'Option 3:
'To clear temporary Internet files
Set WshShell = CreateObject("WScript.Shell")
WshShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8"

'To clear browsing cookies
WshShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2"

'To Clear Browsing History
WshShell.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1"

Tuesday, 19 July 2016

Mercury DeviceReplay option in QTP

Apart from SendKeys option, DeviceReplay is another alternative way to take control on objects which are not getting recognized.

The Device Replay feature is used to perform mouse and keyboard actions against screen coordinates that are provided. The Device Replay functions are not automatically recorded, but must be programmed manually in the Expert View.
1. Create the Device Replay Object.
Example:
Set DeviceReplay = CreateObject(“Mercury.DeviceReplay”)

2. Call the desired Device Replay function.
Example:
DeviceReplay.SendString(“Hello, Automation Testing World”)

3. When done with the Device Replay object, release it.
Example:
Set DeviceReplay = Nothing

The functions that can be used with the Device Replay object are (all coordinates are relative to the top left corner of the screen)

The functions that can be used with the Device Replay object are (all coordinates are relative to the top left corner of the screen):
FunctionDescription
MouseMove x, yMove the mouse to the screen coordinate (x,y).
MouseClick x, y, buttonMove the mouse to the screen coordinate (x,y) and click the button
(0=left; 1=middle; 2=right).
MouseDblClick x, y, buttonMove the mouse to the screen coordinate (x,y) and double-click the button
(0=left; 1=middle; 2=right).
DragAndDrop x, y, dropx, dropy, buttonDrag the mouse from screen coordinate (x,y) to (dropx,dropy) with the button
(0=left; 1=middle; 2=right) pressed.
PressKey keyPress a key using the ASCII code of the key.
For example, Chr(13), vbCR and vbTab.
MouseDown x, y, buttonPress the mouse button on screen coordinate (x,y).
MouseUp x, y, buttonRelease the mouse button on screen coordinate (x,y).
KeyDown keyPress a key using the ASCII code of the key.
For example, Chr(13), vbCR and vbTab.
KeyUp keyRelease a key using the ASCII code of the key.
For example, Chr(13), vbCR and vbTab.
SendString stringType a string.

UFT/QTP using SendKeys option

When we are automating an application, sometimes objects may not be recognized. If we don't have any other option to recognize objects with QTP then we can chose option to take the keyboard control and automate the pending part.

Now a days, almost all applications are designed in such a way to follow W3C standards. For example, if we want to click on a button and currently cursor is focused on another object, we can use keyboard Tab option till that button focused. and then later we can hit on Enter button from keyboard to achieve our goal(clicking on button which is not recognized with QTP)

When this approach is recommended:
If we have automated almost 95%  of our script and only less then 5% steps are not able to automate because of objects not getting recognized then we can go ahead with keyboard sendkeys option.

To achieve this option we have a COM object available in VBScript.

Set objWshShell = WScript.CreateObject("WScript.Shell")

once above object is created then with this object
objWshShell.SendKeys "{TAB}"
objWshShell.SendKeys "{ENTER}"

Or

objWshShell.SendKeys "{TAB}~"

this will resolve above problem to click on button.

Below are few keystokes with equivalent to keyboard buttons available in VBScript

KeystrokeEquivalent
Alt%
Backspace{BACKSPACE}
Break{BREAK}
Caps Lock{CAPSLOCK}
Ctrl^
Delete{DELETE}
Down Arrow{DOWN}
End{END}
Esc{ESC}
Help{HELP}
Home{HOME}
Insert{INSERT}
Left Arrow{LEFT}
Num Lock{NUMLOCK}
Page Down{PGDN}
Page Up{PGUP}
Print Screen{PRTSC}
Right Arrow{RIGHT}
Scroll Lock{SCROLLOCK}
Shift+
Tab{TAB}
UP Arrow{UP}
F1{F1}
F2{F2}
F3{F3}
F4{F4}
F5{F5}
F6{F6}
F7{F7}
F8{F8}
F9{F9}
F10{F10}
F11{F11}
F12
{F12}

Friday, 13 November 2015

HP UFT/QTP Web Automation testing challenges and mitigations

1. Web application Objects which are specific to technology(Ex: SAP, .Net, Java Applets, Oracle Applications..etc) doesn't identify by default QTP addins
Mitigation:
in HP QTP/UFT there are below listed addins available and we can recognize objects once we install those based on the technology used in the application under test.
• .Net
• Delphi
• Flex
• Java
• Oracle
• peopleSoft
• PowerBuilder
• Qt
• SAP
• Web
• VisualAge
• WPF

2.Reading data from Web integrated PDF files
Mitigation:
Till HP QTP 11.0 version:
install AcroRd32.exe and make enable AcroExch object to recognize PDF files content
From UFT 11.5 Version:
There is a content checkpoint feature added. From that we can read the data from different files ex: PDF, HTML, RFT, txt, doc, etc: easily.

3. Recognizing Custom Objects in AUT (Application Under Test)
In UFT 11.5 version on wards there is an option to record objects with Insight Recording. With that option you can learn an object’s (or images) different states and convert that into a recognizable object within the object library.

4. Running web application batches with takes more than 2-3 minutes time to run and then verify for results once the batch is completed
Mitigation:
Keep periodic wait time till it compleates 2-3 minutes and after executing batch verify for the results

5. Object property values are keep on getting changed on each release
Mitigation:
Make all objects completely generic with their properties also keep in mind that objects are getting identified uniquely

6. Identifying run time generated objects
Mitigation:
use descriptive programming or use regular expression in object property values to recognize run time generated values

7. Verifying web page content with alignment, auto numbering, paragraphs..etc
Mitiagation:
It is not possible to verify web page content with alignment, auto numbering, paragraphs..etc

8. Double/Triple click on objects or clicking on object without page loading properly
Mitigation:
QTP doesn't supports such actions with script execution. It only perform action on object once the page is completely loaded

9. Handling certain popups during automation execution. For example, sometimes during execution of automated test, application throws popup and QTP hangs up at this point.
Mitigation:
The only solution is to kill the session. Write VB code to handle the popup and call the script separately.

10. QTP/UFT is installed in Machine A and Application is available in Machine B and required script creation and run on the application
Mitigation:
QTP/UFT and Application should be available on single machine to record/run script

11. Multi Browser Testing: Recording script in other than IE browser
Mitigation:
Recording script in Mozilla, Saffari, Chrome..etc not possible, Script only can run on these browsers

12. Not able to automate E2E scenarios. For example, consider a scenario where order is placed in Web application and needs to be validated in another integrated component such as Outlook/Mainframe. The backend system takes time to reflect the order and the QTP script fails to validate the same.
Mitigation:
If the time gap is more, it is not feasible to add more wait time. This would have impact on total execution time. In this case, a separate script to validate the backend system or interfaces can be prepared and executed separately.

13. Object Identification issues with all the version of the Mozilla even with the patches and QTP/UFT
Mitigation:
1. XPath or CSS identifier property
2. .Object property to access the Firefox DOM 
3. Event Identifiers
4. Embed or Run JavaScripts in Your Web Pages.
features of QTP/UFT should be used to over the issue with Object Identification while automating creating and running QTP script on Mozilla browser

14. Automation Testing in a Multi-Country / Multi-Lingual Deployment Scenario:
Large web applications projects often involve multi-country roll-outs wherein the application has to be rolled out in multiple languages. Such rollouts are also characterized by a common set of functionality applicable across all countries (core requirements) in addition to certain unique country specific requirements (localization requirements).
Mitigation:
In such a multi-country deployment scenario the following salient points need to be considered:
1) Prioritization of Test Cases for Execution - It is advisable to initially do an assessment on the
criticality of the requirements for each country. Post this exercise, a prioritization of the test cases for automation should be conducted for each country.

2) Changes in Automation Approach -Normally, automation tools identify test objects used in the application by means of the text displayed on the GUI of the object. For example, a button with caption “Submit” will be recognized by the text “Submit” displayed on it. When the application is deployed in multiple languages, this becomes a serious problem for the reusability of the scripts across different languages. This difficulty is easily overcome in Web applications, as all the objects used in a Web application have a unique repository ID which can be utilized to uniquely identify the object. This ID remains same even when the GUI text of the object changes for different languages. The framework designer must enforce the use of repository ID as the object identifier in all automation scripts if they are intended to be used for multiple languages.

Reporting structure of the automation framework should also be amended to store the country-specific results separately. This adds one layer of complexity on the reporting structure of the automation framework, but offers long-term benefits by providing a clear picture of the test execution result for individual countries.

3) Stress on Re-usability - As long as repository ID is used as the identifying property of the Web objects used in the automation scripts, the same scripts can be used for all countries. Care should be taken for situations where a particular Web object is present for one country but is absent for another country due to localization requirements. This type of scenarios must be handled individually for each country.

15. Managing reusability of functionalities and dynamic test data.
Mitigation:
A well defined test automation framework with definded guidelines and best practices to be used.