Opening cmd with sikuli behaves unpredictable

Nikola Simeonov

I'm trying to do some automated testing to the GUI of my software and to validate some stuff I need to compare exported files, for witch I use fc in command line.

I need the handle of my program and cmd in order to switch between them. Unfortunately Sikuli behaves very unpredictable when calling

cmd = App("cmd.exe") 

Sometimes it opens a new console and sometimes it focuses on the console already open from the sikuli IDE.

Is there a smarter and robust way to work with console and sikuli?

Eugene S

Yes, App class can behave funny sometimes and is not 100% reliable. What you can do, is to avoid invoking the actual cmd windows which can by itself lead to confusion. Instead, you can run your actual cmd command from Sikuli script directly and read the output to a variable. For example:

output = run("cmd /C dir")

Then the output variable will contain the actual output of the dir command as if you'd run it from command line. So in your case:

output = run("cmd /C fc path1/file1 path2/file2")

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Opening an image file using Sikuli/Jython without clicking

From Dev

find a directory and opening it in Windows with cmd

From Dev

opening CMD with commands already executed

From Dev

OS X Terminal sometimes behaves oddly on cmd-c

From Dev

cmd open and close immediately while opening java

From Dev

Opening images in Python through cmd window

From Dev

Opening a new powershell window with a CMD command

From Dev

opening and writing commands to a cmd from text box

From Dev

How to provide parameters while opening a pdf in CMD?

From Dev

Opening CMD in a particular folder in Windows 7

From Dev

Opening images in Python through cmd window

From Dev

Opening .bat file in CMDER instead of default CMD

From Dev

Disable cmd opening from GUI (PyQt)

From Dev

My file isn't opening in cmd

From Dev

Opening cmd and waiting user input in cmd and exec commands from java

From Dev

Unpredictable FileWriter

From Dev

VSCode terminal behaves strangely when opening a project that is inside WSL2

From Dev

Weird behavior of a batch script for opening multiple CMD windows

From Dev

How to stop a python program executable from opening a cmd shell?

From Dev

Subprocess module not returning output when running command by opening cmd prompt

From Dev

How to read a file name from cmd that is opening the program?

From Dev

Why opening cmd.exe causes to run 2 processes?

From Dev

why does cmd.exe in CreateProcess behaves different from DOS-prompt?

From Dev

Android GridView unpredictable behavior

From Dev

Unpredictable query performance in Postgresql

From Dev

Unpredictable file order in gulp

From Dev

glGetUniformLocation unpredictable behavior

From Dev

Multithreading "unpredictable" behavior

From Dev

Unpredictable output of recursion of main()

Related Related

  1. 1

    Opening an image file using Sikuli/Jython without clicking

  2. 2

    find a directory and opening it in Windows with cmd

  3. 3

    opening CMD with commands already executed

  4. 4

    OS X Terminal sometimes behaves oddly on cmd-c

  5. 5

    cmd open and close immediately while opening java

  6. 6

    Opening images in Python through cmd window

  7. 7

    Opening a new powershell window with a CMD command

  8. 8

    opening and writing commands to a cmd from text box

  9. 9

    How to provide parameters while opening a pdf in CMD?

  10. 10

    Opening CMD in a particular folder in Windows 7

  11. 11

    Opening images in Python through cmd window

  12. 12

    Opening .bat file in CMDER instead of default CMD

  13. 13

    Disable cmd opening from GUI (PyQt)

  14. 14

    My file isn't opening in cmd

  15. 15

    Opening cmd and waiting user input in cmd and exec commands from java

  16. 16

    Unpredictable FileWriter

  17. 17

    VSCode terminal behaves strangely when opening a project that is inside WSL2

  18. 18

    Weird behavior of a batch script for opening multiple CMD windows

  19. 19

    How to stop a python program executable from opening a cmd shell?

  20. 20

    Subprocess module not returning output when running command by opening cmd prompt

  21. 21

    How to read a file name from cmd that is opening the program?

  22. 22

    Why opening cmd.exe causes to run 2 processes?

  23. 23

    why does cmd.exe in CreateProcess behaves different from DOS-prompt?

  24. 24

    Android GridView unpredictable behavior

  25. 25

    Unpredictable query performance in Postgresql

  26. 26

    Unpredictable file order in gulp

  27. 27

    glGetUniformLocation unpredictable behavior

  28. 28

    Multithreading "unpredictable" behavior

  29. 29

    Unpredictable output of recursion of main()

HotTag

Archive