Jump to content

Starting autoit scripts over ssh with cygwin


Recommended Posts

Hi,

thanks for the nice tool. I work with linux at work but we have some customers with windows clients, so we need to extend our test framework with windows clients. The problem is, we use shell scripts (bash) and so we installed cygwin on our windows test clients and connect via ssh to execute commands there.

Now i want to have a small script to start IE, connect to a website and get the results (success or failed). I have made the script and it works fine with the windows client i'm connected to via rdesktop. But when i execute the same .exe on ssh cygwin i get errors. I guess the problem is, that the ssh session over cygwin is a seperated non-gui session.

$ ./ie.exe

test_start--> IE.au3 V2.4-0 Error from function _IECreate (Browser Object Creation Failed)

--> IE.au3 V2.4-0 Error from function _IEBodyReadText, $_IEStatus_InvalidDataType

test_endResult: 0--> IE.au3 V2.4-0 Error from function _IEQuit, $_IEStatus_InvalidDataType

It's still testing code, but at least it works. Maybe you have any suggestion what i can do, to get this working under cygwin over ssh.

#include <IE.au3>

Opt("WinTitleMatchMode", 2)
ConsoleWrite( "test_start")
$oIE = _IECreate ("http://10.0.13.3:8000/riabconf/generate.html")
$sHTML = _IEBodyReadText ($oIE)
$result = 0
$result1 = StringInStr($sHTML, "Die Webseite kann nicht angezeigt werden")
$result2 = StringInStr($sHTML, "makro")
$result3 = StringInStr("foo", "bar")
If $result1 > 0 Then
    $result = 1
ElseIf $result2 > 0 Then
    $result = 2
ElseIf $result3 > 0 Then
    $result = 3
Else
    $result = 0
EndIf

;MsgBox(0, "Example", "Result: " & $result)
ConsoleWrite( "test_end")
ConsoleWrite( "Result: " & $result)

Sleep(2000)

_IEQuit ($oIE)
Link to comment
Share on other sites

Hmm there is no edit function in this forum?

I wanted to add, that i read this thread:

http://www.autoitscript.com/forum/index.php?showtopic=119129&st=0&p=828789&hl=cygwin&fromsearch=1&#entry828789

but that didn't solve the permission issue. I don't know what the login keys would do with IE.

Link to comment
Share on other sites

Seems so, there is just reply and multiquote

Really?

Click.

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

  • 9 months later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...