Sign in to follow this  
Followers 0
tassadar23

Starting autoit scripts over ssh with cygwin

7 posts in this topic

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)

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

The edit-button is to the bottom-right of the post. Maybe you have to few posts to use it.

Seems so, there is just reply and multiquote

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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.

Share this post


Link to post
Share on other sites

Really?

Click.

Yep delete and edit are missing, but there is some forums software that has a option to deactivate these buttons for users below an amount of postings.

But i'm still stuck with that issue about ssh/cygwin/autoitscript

Share this post


Link to post
Share on other sites

Did you try with "screen" linux command?

It works for me. Just create screen window in windows and attach to it from ssh.

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  
Followers 0