Jump to content
Sign in to follow this  

Unable to execute testNg script after installing client product

Recommended Posts

Hi Folks,

We have project requirement using AutoIt in selenium web driver.


We have to right click on the client product's system tray icon, then OS native window will open. Get focus into that window and login to the product.

I have already developed AutoIt script for doing all these functionality and system has all the admin rights.

If I run this AutoIt script in normal java class that works fine but, unable to run through testNg using .exe file. The eclipse getting crashed and none of the browser is opening from testNg.

Below line of code I have used to run .exe file in testNg.

String[] cmd = {"D:automationformfpMFP.exe","1002","MattiSM","Test"};
Process p = Runtime.getRuntime().exec(cmd);

System configuration:-
Windows 7
JDK 1.6.0_45
Juno eclipse
64 bit

Workaround so far:-
1. Tried with upgrading JDK versions.
2. Tried with changing workspace.
3. Increasing heap size in eclipse ini file.
4. Developed another autoIt script to click on system tray icon, executed .exe file before installing client product, that perfectly works fine.
5. Tried with different eclipse.

The issue will reproduce once we install product into local system and execute through testNg.

Below is the eclipse console error.

java.net.SocketException: Permission denied: connect
    at java.net.DualStackPlainSocketImpl.connect0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at org.testng.remote.strprotocol.BaseMessageSender.connect(BaseMessageSender.java:58)
    at org.testng.remote.strprotocol.MessageHub.connect(MessageHub.java:32)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:84)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

But, here I haven't used any testNg library file.

Any suggestions / help would be appreciated.

Thanks in advance..


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...