It is very common that we encounter a situation where we need to upgrade our test environment such as browser version, Operating system version, Java version, Automation tools version etc...
In such cases, you might end up facing issues while playing back the test script in an upgraded environment. One of the issues is scripts which are recorded in older version of the browser fails to execute on a new version of the browser.
The reason for this is the application would have different GUI structure or hierarchy for the newer version of browser or different property value based on the browser version.
Here I am considering the scenario where the tester recorded the script on IE 9 and tries to play back the same scripts on IE 11.
You would witness 'Object not found' exception while play back.
For example, when you launch the Application Under Test in IE 9, Text field control has the following structure
<input id="" tabindex="1" type="text"> </input>
<input id="user-field" type="password" > </input>
Structure in IE 11
<input id="user-field" tabindex="1" type="password"> </input>
If you look at the structure carefully, you can witness the difference in the hierarchy. In IE 9, the user name text field is embedded inside div with 2 input control one of the text types and another is password type. However, in IE 11 it has only one input type which of password type.
If you record AUT in IE 9, user name filed would be captured as html.input.text, however in IE 11 it would be captured as html.input.password, hence the playback fails for the script recorded in I E9 on IE 11.
To resolve this issue you should run IE 11 in IE 9 browser mode by doing the following configuration.
- Launch IE 11
- Press F12 to launch the Developer Tools
- Set the browser mode to IE 9 from the Edge mode as shown in the below pic