Ask a Question

Script run in WINXP but not in WIN7

DevaV
Contributor

Script run in WINXP but not in WIN7

Hi,



We have a code in line that reads a text from the help page of the application. It works fine with WINXP but in WIN7 it throws script error (attached image of the error).





var wndHelpPage = Sys.Process("explorer").WaitWindow("HH Parent", "M-Files Help", 1,3000);

var panelHelp = wndHelpPage.Window("HH Child", "", 1).Window("Shell Embedding", "", 1).Window("Shell DocObject View", "", 1);

var textContent = panelHelp.Window("Internet Explorer_Server", "", 1).Page("*").TextNode(0).innerText;





The same codes are used in winxp and win7. At last line of the code the specified error comes and script gets paused.



Please help out on this situation.
Regards,
Deva
5 REPLIES 5
Julia_K
SmartBear Alumni (Retired)

Hello Deva,

The “An error has occurred in the script on this page” error message can be caused by an internal script error of your tested help page. Does the error occur only when you run TestComplete tests that interact with the tested help page? Could you please check whether your tested help page is displayed correctly, and the script it uses contains no errors?


If the tested help page’s script contains no errors, but the “An error has occurred in the script on this page” error message still appears, you can follow the steps below:

1. Launch Internet Explorer and open the Internet Options dialog.

2. Switch to the Advanced tab.

3. In the Browsing group, enable the Disable script debugging (Other) option.

4. Disable the Display a notification about every script error option.

5. Click OK to save the changes and close the dialog.


If this does not help, you can create a routine that will close the unwanted error message. To learn how to do this, please see the "Handling Unexpected Windows" topic in our Help system.


Please let us know if this does not help, or if you have any additional questions.


Thank you.

I’m not a member of the SmartBear Support Team, I’m just helping users in this community.


Any views or opinions expressed do not necessarily represent those of SmartBear Software.
DevaV
Contributor

Thanks for your suggestion Julia Klimenkova,



Internet options was already set as you said. The error occurs only when test-complete interacts with the help page in WIN7 machine. The error occurs only in WIN 7 but is not occurring while executing the same scripts windows XP.



Possibly, it was not able to handle as unexpected window as test-complete becomes idle or does nothing till that script error dialog is manually closed.



Please suggest on this.
Regards,
Deva
Julia_K
SmartBear Alumni (Retired)

Hello Deva,

Could you please specify what TestComplete version and Internet Explorer version you are using? Does the issue persist on the latest version of TestComplete - 9.0? You can apply for a free trial version of TestComplete 9.0 here.

Possibly, it was not able to handle as unexpected window as test-complete becomes idle or does nothing till that script error dialog is manually closed.


Could you please check whether TestComplete fails to handle only this script error unexpected window or any type of unexpected windows?

Thanks in advance.
I’m not a member of the SmartBear Support Team, I’m just helping users in this community.


Any views or opinions expressed do not necessarily represent those of SmartBear Software.
DevaV
Contributor

Hi Julia Klimenkov,



I have tried with testcomplete 8.7 and 9.0 both has same problem.



As of now, Only this window is failed to capture as unexpected window by testcomplete.



Please do suggest on the issue.
Regards,
Deva
Julia_K
SmartBear Alumni (Retired)

Deva,

To continue investigating your problem, we need your tested help file and your test project. Could you please zip your test project folder and your tested help file and post the archive here or send it to our Support Team via the Contact Support web form?

Thanks in advance.
I’m not a member of the SmartBear Support Team, I’m just helping users in this community.


Any views or opinions expressed do not necessarily represent those of SmartBear Software.
cancel
Showing results for 
Search instead for 
Did you mean: