cancel
Showing results for 
Search instead for 
Did you mean: 

Window task scheduler + Firefox Preferences error

SOLVED
Super Contributor

Window task scheduler + Firefox Preferences error

We are running TestComplete tests on TestExecute machine using Window Task Scheduler. The browser we are using is Firefox 69.0.3. Testexecute version is 14.20. OS Window Server 2012R2

 

We have set the Task scheduler - to run the test every hour for 9 hrs.. We are getting the errors

 

You are trying to call the "Preferences" method or property of the "Sys.Browser("firefox")" object that does not exist.

You are trying to call the "setBoolPref" method or property of the "Sys.Browser("firefox").Preferences" object that does not exist.

 

No idea why it happens. We run manually the same test then no error and it work 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super Contributor

Re: Window task scheduler + Firefox Preferences error

In order to avoid the command window issues. I created the batch file. and and always run it as administrator. I also Set TestExecute to run as an Admin as mentioned in the document 

https://support.smartbear.com/testexecute/docs/general-info/configuring/testing-under-admin-account....

 

Now everything is running with administrative previleges 

Now I am getting back the same firefox error issues.

 

Thanks

Nishchal

 

 

View solution in original post

8 REPLIES 8
Community Hero

Re: Window task scheduler + Firefox Preferences error

Hi,

 

The text of the message sounds like the browser was not started. Or not found by TestComplete. The latter may happen if the browser is started outside of TestComplete and with higher privileges than TestComplete.

Just to be on the safe side: when the sheduled task is executed you do have active not locked user session and the task is configured to start interactively within this session, isn't it?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Super Contributor

Re: Window task scheduler + Firefox Preferences error

@AlexKaras 

 

here is what I am doing .

 

1. Remote desktop login to Testexecute machine

2. Create the batch file for testComplete project 

3. Create the Window  Scheduler and attach the batch file.

4. Set up the Trigger in the window scheduler - every 5 min and run upto 15 mins.

5. Ran the tscon utility from command line https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/keeping-computer-unlock...

6. Close the Remote desktop Window.

 

I am getting the errors if the Remote desktop window is closed. But if i keep it open then no issues. I am expecting after running the tscon utility from the command line we can close the remote desktop window and the Tests will run.

 

Community Hero

Re: Window task scheduler + Firefox Preferences error

Hi,

 

As per help article that you've referenced, tscon "returns the control to the original local session on the remote computer, bypassing the logon screen."

By default, Windows Scheduler runs on behalf of Local System account (which does not have user desktop).

You may configure your task so that it starts only when the certain user is logged-on - this is what must be done.

 

However:

> 5. Ran the tscon utility from command line [...]

> 6. Close the Remote desktop Window.

tscon requires administrative privileges in order to switch sessions. If it is started with proper permissions, Remote Desktop window is closed by the system when session is switched. The fact that you mention step 6 and your followup comment makes me think that your accound does not have elevated administrative permissions (Run As Administrator), thus session is not switched and your desktop is just closed by the system when you close your RDP window.

 

every 5 min and run upto 15 mins.

TestComplete and TestExecute are single-instance applications. Even more - TestComplete cannot be started if TestExecute is running and vise versa. Thus, in order to be on the safe side, I would recommend to have launch frequency lower then the execution timeout.

 

3. Create the Window  Scheduler and attach the batch file.

Depending on how you start batch file execution, task will or will not wait for the batch to end execution. In addition, batch itself may or may not wait for the TestExecute to close. If the task does not wait for the batch to finish its job and batch does not wait for TestExecute, then the task will be completed within a second or two, while TestExecute may appear to be running for more then 5 minutes and this will prevent its subsequent start when the task is triggered again.

 

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Super Contributor

Re: Window task scheduler + Firefox Preferences error

@AlexKaras 

Thanks for the updates .

 

Should we run tsconutility after setting up the window task scheduler or before setting up the window task scheduler ?

Super Contributor

Re: Window task scheduler + Firefox Preferences error

May be i am not doing in correct manner.

 

I ran tscon utility from commandline as an admin option after setting up the window task scheduler. So after this I will be disconnected from remote desktop . Tests are executed but getting the error due to the command window remain open and Test Execute attempt to perform an action on a zero sized window.

Community Hero

Re: Window task scheduler + Firefox Preferences error

Hi,

 

> Should we run tsconutility after setting up the window task scheduler or before setting up the window task scheduler ?

Not sure that I got the question... You won't be able to do anything on remote machine after execution of tscon because your remote session will be disconnected and switched to the local one.

 

> Tests are executed but getting the error due to the command window remain open 

Then this soungs like corrections to test code should be introduced to make it (test code) to handle this situation properly.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Super Contributor

Re: Window task scheduler + Firefox Preferences error

In order to avoid the command window issues. I created the batch file. and and always run it as administrator. I also Set TestExecute to run as an Admin as mentioned in the document 

https://support.smartbear.com/testexecute/docs/general-info/configuring/testing-under-admin-account....

 

Now everything is running with administrative previleges 

Now I am getting back the same firefox error issues.

 

Thanks

Nishchal

 

 

View solution in original post

Super Contributor

Re: Window task scheduler + Firefox Preferences error

I am still getiing the errors

Seem like we cannot have Window task scheduler to run the Testcomplete tests on Remote testexecute machines when the Testexecute machines get disconnected. Even though we have followed the instructions in Testcomplete docs. 

 

We are running according to admin previleges.

We still getting the same firefox errors