We mentioned several times in our articles or responses to user queries that we need to run OATS or run command prompt as administrator, It becomes quite annoying if you have to do it every time. So we are sharing with you as how to set it for good and need not do it repeatedly.
Especially when working with OATS, people want to execute scripts from command prompt and land on to the following error
“oracle.oats.scripting.modules.webdom.common.api.exception.BrowserHelperException: Cannot get a connection from helper after 120 seconds”
Steps how to always run command prompt as administrator
- Type cmd in your windows start program
- Right click on Command Prompt and select “Open file location”
- You will see the short cut files command prompt, run, control pane and etc
- Right click on command prompt shortcut and select properties menu to view the Command Prompt properties window.
- Click on “Advanced” button to see the “Advanced properties” window
- Select the checkbox “Run as administrator” and click OK button
- Click on “Apply” in command prompt properties window and click OK to close it.
- You might be asked to provide administrator username and password, so which means your user should have the admin privileges. Otherwise, you will not be able to set this option.
From next time on wards whenever you open a command prompt you will see that it starts with “Administrator privileges” by default
There is one last thing that you need to do, otherwise you end up entering username & password every time you launch the command prompt. You need to set the User Account Control settings to “Never notify me when”
How to change UAC in Windows 10 – ideally same for all windows versions
- Open windows start menu and type “UAC”
- Select Change User Account Control Settings
- Drag down the lever to have it available at “Notify never when” this way user need not enter the username and password every time.
This is all you need to do so that you can always run command prompt with administrator privileges, in case of any queries please feel free to reach to us in form of comments.
Founder of TestingTools.co, constantly shares knowledge on different test automation tools. Has experience in building proof of concepts, solutions, frameworks, platforms & implementation of test automation projects.
In pursuit of building a platform with inbuilt framework and reusable components for Oracle Cloud applications ( Oracle HCM, CX, SCM, Financials clouds, Salesforce and other cloud applications )
Major accomplishments in his career:
- Product architect and development manager for test automation platforms
- Oracle Flow Builder @ Oracle
- CloudTestr @ Suneratech
- 2 times to oracle open world
- More than 20 successful POCs ( Proof of concepts )
- 100 demos
- Designed pricing models.
- Trained more than 50 members.
- Built more than 100 re-usable functions.
Worked with tools:
Thank you Srinivas for sharing information.
i have one doubt can we ran OATS EBS/FORMS scripts through grid like selenium.
when i ran OATS EBS/FORMS scripts through bat file, it is working fine, but scripts are executing background at that time screen shot are looking black, is there any way to run foreground.
Yes one of the option is to use Oracle Test Manager, where you can attach multiple nodes and trigger multiple scripts in parallel across these machines. But you will still have an issue of screenshots being blank. One of the solution is to keep the other machines logged in and make sure their screens are not locked.
Also, you need to make the execution view able, configuration is explained in this article.
Thank you srinivas for reply
When i run bat file through SMA machine at that time screen shots are not capturing and script are executing background. Is there any way to run foreground with screen shots.
As of now there is no solution available, which I am aware of, in case you find one please do share it here it will be a great value add to the readers too
Currently am facing below issue. When I double clicked on .bat file which I created to execute openscripts scripts, its working as expected.
But same .bat file if I trigger from Jenkins, am keep on getting below error message.
oracle.oats.scripting.modules.webdom.common.api.exception.BrowserHelperException: Cannot get a connection from helper after 120 seconds.
May I know do you have any solution to resolve this issue.
Hi Lakshmi Narayana,
Thank you for reaching out to us, I am assuming that the bat file is not getting triggered with elevated privileges. Not sure if you are getting issue even if the bat file is triggered with elevated privileges.
Well, we can go on a screen share and see how we can solve this issue, as you have reached out to me on whatsapp, we can continue to discuss how we can proceed there.