Forum Discussion
AlexKaras
12 years agoCommunity Hero
Hi Mike,
Are you talking about recording made for Keyword test or the recorded script code?
In the latter case you need to manually edit the recorded code.
In the former case, you also need to edit the recorded test:), but (as for me) it requires more actions. This is what I ended-up with:
1. Create a variable for the recorded test (e.g. vObj);
2. Add the Call Object Method operation to the test and set its object field to Aliases.Sys.iexplore. Select the WaitAliasChild method from the subsequent wizard page and set the ChildName parameter to panelCommercialpolicylist. Set the WaitTime parameter to the number of milliseconds you like to wait and complete the wizard by pressing the Finnish button;
3. Save the obtained object to the variable: Add the Set Variable Value operation, select the vObj variable, press Next button and select Last Operation Result option for the Mode field. Press Finish to complete the wizard;
4. Add the If...Then operation. Press the ellipsis button for the Value1 field and select the Code Expression option for the Mode field. Press the ellipsis button for the Value field, select the vObj variable for the expression, press OK to close the Edit Expression dialog and add '.Exists' (without quotes) to the value entered into the Value field. Press OK button to close the Edit Value dialog. Select Equals for the Condition field. Press the ellipsis button for the Value2 field, select Constant for Mode and Boolean for Type fields. Select either True or False for the Value field as needed and press OK twise to close all dialog windows.
5. Proceed further in the test as needed.
Are you talking about recording made for Keyword test or the recorded script code?
In the latter case you need to manually edit the recorded code.
In the former case, you also need to edit the recorded test:), but (as for me) it requires more actions. This is what I ended-up with:
1. Create a variable for the recorded test (e.g. vObj);
2. Add the Call Object Method operation to the test and set its object field to Aliases.Sys.iexplore. Select the WaitAliasChild method from the subsequent wizard page and set the ChildName parameter to panelCommercialpolicylist. Set the WaitTime parameter to the number of milliseconds you like to wait and complete the wizard by pressing the Finnish button;
3. Save the obtained object to the variable: Add the Set Variable Value operation, select the vObj variable, press Next button and select Last Operation Result option for the Mode field. Press Finish to complete the wizard;
4. Add the If...Then operation. Press the ellipsis button for the Value1 field and select the Code Expression option for the Mode field. Press the ellipsis button for the Value field, select the vObj variable for the expression, press OK to close the Edit Expression dialog and add '.Exists' (without quotes) to the value entered into the Value field. Press OK button to close the Edit Value dialog. Select Equals for the Condition field. Press the ellipsis button for the Value2 field, select Constant for Mode and Boolean for Type fields. Select either True or False for the Value field as needed and press OK twise to close all dialog windows.
5. Proceed further in the test as needed.