Connection failed to establish with python eggrdrive

Hello Experts,

I am trying to execute sensetalk command using python eggdrive. However, I always got connection exception error: “A connection attempt failed because the connected party did not properly respond after a period of time.”

My code as follows:
import xmlrpc.client

server = xmlrpc.client.ServerProxy(“http://123.456.789.000:5400”)

server.startsession(“C:\test.suite”)
server.execute(‘connect “123.456.789.000”’)

result = server.execute(‘Typetext(altKey, f4)’)

please advise.

Thank you
Regards,
Siti

It looks like your connection command does not have the right information. If you have connected to the SUT in Eggplant functional it should be the connection name, for example “AWS VM” and have the connection information in the connection window.

If you are not using a saved connection then you need to give all the information in the command to execute

server.execute(‘Connect serverID:“SUTIPOrHostname”, portNum:portNum, password:“SUTPassword”, type:“VNCorRDP”')

more properties can be found here: SUT Information and Control | EPF Docs

It seems you’re encountering a connection issue when executing the SenseTalk command using Python EggDrive. The error message suggests that the server may not be responding properly. Ensure the server IP and port are correct and that the server is running. Also, check your firewall settings to allow the connection. For further assistance, consider enrolling in the best Python course at CETPA Infotech, which can enhance your programming skills and troubleshooting abilities. Good luck!