[Sikuli-driver] [Question #678057]: capture command wrong using vnc

2019-01-24 Thread Christoph Fetzer
New question #678057 on Sikuli:
https://answers.launchpad.net/sikuli/+question/678057

Hello,

I managed to use sikulix on a vnc connection and are writing due to two points:
- I'd like to share my experience making it work
-  I'd like to report an issue.

Point 1, my way:
I have a Windows 7 machine running in a virtual box that I'd like to control 
with sikulix (1.1.3 BTW) using vnc. My host also is Windows 7.
The first vnc server I tried to use was UltraVNC. Installation procedure worked 
really smooth, connection using vncviewer from the host worked but with sikulix 
I was not able to read screen content. capture only showed black screens (yes, 
I played around with wait(1-5)).
The next vnc-server I played around was tiger vnc because I read success 
messaged here and in the docs.
Unfortunately the tiger vnc installer let me alone with the firewall settings 
and did not tell me. Since I found that out and opened the firewall for vnc, I 
was able to capture the screen and work with sikulix.
My script currently is looking like this:

client = vncStart(ip="192.168.56.104", port=5900 ) 
#wait( 5 )
img = client.capture()
client.click( client.wait("StartButton.png",10) )
client.type( "Explorer" )  
client.click( client.wait("Windows-Explorer.png") )

client.stop();

Point 2:
when I use the capture(filename) variant as capture( client, "Test.png" ) my 
screenshot file shows a screenshot from the host instead of the virtual box, so 
I guess there's something like a 'feature' somewhere in there.

Thank you for listeing!

Regards,
Christoph

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #678057]: capture command wrong using vnc

2019-01-28 Thread Christoph Fetzer
Question #678057 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678057

Christoph Fetzer posted a new comment:
Hi!

Thank you very much for the information. I think, your first point 
(client.capture( client, "Test.png" )) won't help, because docs say: only 
available in Python scripting (MUST be used as such undotted)
That's why I didn't even try. I'll give it a chance 
But I am very happy with your second solution because I only intend to work 
with the mut using vnc and that will also help with all other undotted commands.

Thank you very much again!

Regards,
Christoph

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #678057]: capture command wrong using vnc

2019-01-28 Thread Christoph Fetzer
Question #678057 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678057

Status: Answered => Solved

Christoph Fetzer confirmed that the question is solved:
Thanks RaiMan, that solved my question.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #678057]: capture command wrong using vnc

2019-02-01 Thread Christoph Fetzer
Question #678057 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678057

Status: Solved => Open

Christoph Fetzer is still having a problem:
Hm, sorry, i have to come back here.

That's what I do:
client = vncStart(ip="192.168.56.102", port=5900 ) 
use( client )
wait( 1 )
type( "R", Key.WIN )
wait( 1 )
capture( client, "1.png" )

That's what I get:
[error] script [ Install ] stopped with error at line --unknown--
[error] Error caused by: Traceback (most recent call last): File 
"D:\x\anovis2\Funktionstest\sikuli\Install.sikuli\Install.py", line 7, in 
 capture( client, "1.png" ) File 
"C:\Users\CKl\AppData\Roaming\Sikulix\Lib\sikuli\Sikuli.py", line 57, in 
capture shot = SCREEN.cmdCapture(args) AttributeError: 
'org.sikuli.vnc.VNCScreen' object has no attribute 'cmdCapture'

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #678057]: capture command wrong using vnc

2019-02-01 Thread Christoph Fetzer
Question #678057 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678057

Christoph Fetzer posted a new comment:
Sorry, forgot about one thing: type( "R", Key.WIN ) doesn't seem to
work. Also a combination of keyDowns doesn't work.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #678057]: capture command wrong using vnc

2019-02-01 Thread Christoph Fetzer
Question #678057 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678057

Christoph Fetzer posted a new comment:
Some more questions, as I am going the first steps inside sikulix now
and I'm wondering about some oddities:

Documentation recommends entering text via "paste()". Ever tried this in a 
cmd-Window?
(Hint: the result you get looks "^V")
Documentation says, you can enter text using type() only on US keyboards and 
instead it recommends paste(). Ever tried to enter a path in a cmd-shell of a 
german windows?

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #678057]: capture command wrong using vnc

2019-02-04 Thread Christoph Fetzer
Question #678057 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678057

Christoph Fetzer posted a new comment:
Thank you very much for your investigations!

Some experiences from me:

For me it seems, I accidentally used my machine under test using the
virtual box GUI instead of the vnc interface. As I am consequently using
client.blabla hardly anything is working.

My script:
client = vncStart(ip="192.168.56.102", port=5900 ) 
wait( 1 )

client.type( "r", Key.WIN )
client.capture().saveInBundle("1.png")

client.keyDown( Key.WIN )
client.keyUp()

wait( 10 )
client.capture().saveInBundle("2.png")

client.wait("Ausfuehren.png",10)
client.capture().saveInBundle("3.png")


Capture 1 shows only the clean desktop (OK, I should wait but there really 
happens nothing).
Capture 2 shows an incomplete Start menu that doesn't contain what I'd like to 
search for in the next step (is there a way to give you the file?).
In the virtual box GUI I see a complete Start menu.
When I remove the client. before the wait(), everything s working but not the 
intended way. (it's supposed to run on a jenkins controlling virtual test 
machines on vSphere).

By the way I updated to 1.1.4 in the meantime.

A - surprise! With that typing paths suddenly works.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #678057]: capture command wrong using vnc

2019-02-04 Thread Christoph Fetzer
Question #678057 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678057

Christoph Fetzer posted a new comment:
Hi!

I mixed two issues, sorry for making this not clear enough:
client.type( "r", Key.WIN )
-> will never show any result, regardlesss how long I wait. Neither on the 
screen of the virtual box, nor over the vnc connection. Instead I hear some 
sound out of the virtual machine but I can't relate the source.

client.keyDown( Key.WIN )
client.keyUp()

# wait for the start menu instead of the ausführen window is a
workaround for failing step 1.

client.type( "cmd.exe" )

Issue two:
this wait for the screenshot will fail regardless how long I wait (I went up to 
20s). Cause: the captures taken from the vnc connection show an incomplete 
startmenu with the parts missing, I am searching for ( the entry field at the 
bottom with the text "Programme/Dateien durchsuchen").
If I use the wait undotted and instead search on my host system in the virtual 
box window, everything works fine.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #678057]: capture command wrong using vnc

2019-02-18 Thread Christoph Fetzer
Question #678057 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678057

Christoph Fetzer posted a new comment:
Any news on this?
Can I help by explaining more detailed what the problem is for me? I might take 
some screenshots and upload or make a short video and upload to youtube if it 
helps.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Bug 1817031] Re: VNC some key commands not working in Windows guests

2019-02-21 Thread Christoph Fetzer
Sorry, was intended to become a question.

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1817031

Title:
  VNC  some key commands not working in Windows guests

Status in Sikuli:
  New

Bug description:
  Hi!

  I am currently developing some software tests using virtual Windows 7
  and 10 guests in VirtualBox. My VNC-Server on the guests is TigerVNC.

  I am discovering some keystrokes on the machines not working properly.

  On Windows 10 my problems are:
  the code:
  client = vncStart(ip="192.168.56.100", port=5900, password="vnc"  ) 
  wait( 1 )
  client.type( "r", Key.WIN )

  nothing happens.
  Instead this is working:

  client.keyDown( Key.WIN )
  client.type( "r" )
  client.keyUp()

  when I do this sequence:

  client.keyDown( Key.WIN )
  client.keyUp()

  wait(1)

  
  client.type( "cmd.exe" )
  client.type( Key.ENTER )

  wait(1)

  client.type( "cd \\" ) 
  client.type( Key.ENTER )
  wait(1)

  I am missing all the ENTER-keys

  The combination 
  client.type( "cmd.exe" + Key.ENTER )
  isn't working as well.

  With the Windows 7 client,
  I have the following:

  client = vncStart(ip="192.168.56.101", port=5900, password="vnc"  ) 
  wait( 1 )

  client.type( "r", Key.WIN )

  -> nothing happens

  client.keyDown( Key.WIN )
  client.type( "r", Key.WIN )
  client.keyUp()

  -> works

  In this code snippet RETURN-keys are working:

  client.type( "cmd.exe" )
  client.type( Key.ENTER )

  wait(1)

  client.type( "cd \\" ) 
  client.type( Key.ENTER )
  wait(1)

  I am aware that I need to implement something like a handshake, a combination 
of
  type(...)
  and
  wait(...)
  for a screenshot but with the waits I have another issue I am asking for in 
another question.

  Best regards,
  Christoph

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1817031/+subscriptions

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Bug 1817031] [NEW] VNC some key commands not working in Windows guests

2019-02-21 Thread Christoph Fetzer
Public bug reported:

Hi!

I am currently developing some software tests using virtual Windows 7
and 10 guests in VirtualBox. My VNC-Server on the guests is TigerVNC.

I am discovering some keystrokes on the machines not working properly.

On Windows 10 my problems are:
the code:
client = vncStart(ip="192.168.56.100", port=5900, password="vnc"  ) 
wait( 1 )
client.type( "r", Key.WIN )

nothing happens.
Instead this is working:

client.keyDown( Key.WIN )
client.type( "r" )
client.keyUp()

when I do this sequence:

client.keyDown( Key.WIN )
client.keyUp()

wait(1)


client.type( "cmd.exe" )
client.type( Key.ENTER )

wait(1)

client.type( "cd \\" ) 
client.type( Key.ENTER )
wait(1)

I am missing all the ENTER-keys

The combination 
client.type( "cmd.exe" + Key.ENTER )
isn't working as well.

With the Windows 7 client,
I have the following:

client = vncStart(ip="192.168.56.101", port=5900, password="vnc"  ) 
wait( 1 )

client.type( "r", Key.WIN )

-> nothing happens

client.keyDown( Key.WIN )
client.type( "r", Key.WIN )
client.keyUp()

-> works

In this code snippet RETURN-keys are working:

client.type( "cmd.exe" )
client.type( Key.ENTER )

wait(1)

client.type( "cd \\" ) 
client.type( Key.ENTER )
wait(1)

I am aware that I need to implement something like a handshake, a combination of
type(...)
and
wait(...)
for a screenshot but with the waits I have another issue I am asking for in 
another question.

Best regards,
Christoph

** Affects: sikuli
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1817031

Title:
  VNC  some key commands not working in Windows guests

Status in Sikuli:
  New

Bug description:
  Hi!

  I am currently developing some software tests using virtual Windows 7
  and 10 guests in VirtualBox. My VNC-Server on the guests is TigerVNC.

  I am discovering some keystrokes on the machines not working properly.

  On Windows 10 my problems are:
  the code:
  client = vncStart(ip="192.168.56.100", port=5900, password="vnc"  ) 
  wait( 1 )
  client.type( "r", Key.WIN )

  nothing happens.
  Instead this is working:

  client.keyDown( Key.WIN )
  client.type( "r" )
  client.keyUp()

  when I do this sequence:

  client.keyDown( Key.WIN )
  client.keyUp()

  wait(1)

  
  client.type( "cmd.exe" )
  client.type( Key.ENTER )

  wait(1)

  client.type( "cd \\" ) 
  client.type( Key.ENTER )
  wait(1)

  I am missing all the ENTER-keys

  The combination 
  client.type( "cmd.exe" + Key.ENTER )
  isn't working as well.

  With the Windows 7 client,
  I have the following:

  client = vncStart(ip="192.168.56.101", port=5900, password="vnc"  ) 
  wait( 1 )

  client.type( "r", Key.WIN )

  -> nothing happens

  client.keyDown( Key.WIN )
  client.type( "r", Key.WIN )
  client.keyUp()

  -> works

  In this code snippet RETURN-keys are working:

  client.type( "cmd.exe" )
  client.type( Key.ENTER )

  wait(1)

  client.type( "cd \\" ) 
  client.type( Key.ENTER )
  wait(1)

  I am aware that I need to implement something like a handshake, a combination 
of
  type(...)
  and
  wait(...)
  for a screenshot but with the waits I have another issue I am asking for in 
another question.

  Best regards,
  Christoph

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1817031/+subscriptions

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Bug 1817046] [NEW] VNC synchronisation of screen content for wait and capture not working properly

2019-02-21 Thread Christoph Fetzer
Public bug reported:

Hi!

I am currently developing some software tests using virtual Windows 7
and 10 guests in VirtualBox. My VNC-Server on the guests is TigerVNC.

What I am trying:

client = vncStart(ip="192.168.56.100", port=5900, password="vnc"  ) 
wait( 1 )

client.keyDown( Key.WIN )
client.type( "r" )
client.keyUp()

client.wait("Run.png",60)

Run.png is a screenshot of the "run"-panel in Windows 7 or 10.
This wait fails  on both Windows 7 and 10.
The reason seems to be a failing synchronisation of the screen contents to the 
client-object.
As a proof I made a capture of the client after 120s and attached the files for 
Windows 7 and 10.
The code:
client.keyDown( Key.WIN )
client.type( "r" )
client.keyUp()

wait( 120 )
client.capture().saveInBundle("Win10.png")
Remark: on the virtual box window itself, I see the open run-panel, only the 
capture is empty.

When I'm doing the wait and search-commands in my tests undotted on the
virtual desktop window , everything works fine. I only avoid this with
the goal starting the tests from a jenkins server testing virtual
machines later.

Best regards,
Christoph

** Affects: sikuli
 Importance: Undecided
 Status: New

** Attachment added: "screenshots.zip"
   
https://bugs.launchpad.net/bugs/1817046/+attachment/5240598/+files/screenshots.zip

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1817046

Title:
  VNC synchronisation of screen content for wait and capture not working
  properly

Status in Sikuli:
  New

Bug description:
  Hi!

  I am currently developing some software tests using virtual Windows 7
  and 10 guests in VirtualBox. My VNC-Server on the guests is TigerVNC.

  What I am trying:

  client = vncStart(ip="192.168.56.100", port=5900, password="vnc"  ) 
  wait( 1 )

  client.keyDown( Key.WIN )
  client.type( "r" )
  client.keyUp()

  client.wait("Run.png",60)

  Run.png is a screenshot of the "run"-panel in Windows 7 or 10.
  This wait fails  on both Windows 7 and 10.
  The reason seems to be a failing synchronisation of the screen contents to 
the client-object.
  As a proof I made a capture of the client after 120s and attached the files 
for Windows 7 and 10.
  The code:
  client.keyDown( Key.WIN )
  client.type( "r" )
  client.keyUp()

  wait( 120 )
  client.capture().saveInBundle("Win10.png")
  Remark: on the virtual box window itself, I see the open run-panel, only the 
capture is empty.

  When I'm doing the wait and search-commands in my tests undotted on
  the virtual desktop window , everything works fine. I only avoid this
  with the goal starting the tests from a jenkins server testing virtual
  machines later.

  Best regards,
  Christoph

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1817046/+subscriptions

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp