Exported Sikuli Test executable from local machine does not work on remote machine

Asked by Alex Yi

Hi again,

So I have created a script using the Sikuli IDE and exported the test as an executable. I am using Windows 7 - 64bit OS and internet explorer 8 for launching our web application. Running the test on my machine works fine.

I'm testing to run the script on other machines since I need to pass this automated test to the developers in my project team and it launches the internet explorer but fails to type the url. Basically, after it opens the IE, it does not do anything and eventually fails with message saying it cannot find an image(a Maximize button).

Here is my code (This is my first test case):
def test_01AIMLoginPage(self):
        IE = App.open("C:\Program Files (x86)\Internet Explorer\iexplore.exe")
        wait(1)
        IE.focus()
        wait(1)
        type("l", KEY_CTRL)
        paste(AIMURL)
        type("\n")
        if(not exists("1346780946846-1.png")):
            #popup("Before Clicking the Maximize button")
            click("1346780969393-1.png")
        else:
            popup("InfoView Page Already Maximized")
        assert(exists("gwSAPBusines-1.png"))

The remote machine that I am testing this script is a Windows 2008 Server machine - 64bit and IE 8.
I have installed Sikuli on the remote machine and I have also extracted unittest2 package to the sikuli/LIB folder.
Am I missing something?

Thanks,

sincerely,

Alex Yi

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
RaiMan (raimund-hocke) said :
#1

-- is there a "real" active screen on the remote machine, while script runs?

-- click("1346780969393-1.png")
this seems to click the maximize button.
But this only can happen if "1346780946846-1.png" exists before.

So check wether your image of the maximize button can be found at all or within the standard 3 seconds waiting time.

Revision history for this message
Alex Yi (ayi) said :
#2

What do you mean by real active screen? One of the developers at my company thinks it maybe due to display driver missing on the machine that I was testing against. Are you talking about the same thing?

Revision history for this message
RaiMan (raimund-hocke) said :
#3

Might be ?

I am talking about headless machines, which do not work.

When running a Sikuli script on a machine, there must be a monitor actively showing, what Windows is rendering to the screen (which might be the same as saying: a display driver is running)

Revision history for this message
Alex Yi (ayi) said :
#4

Yes, that is exactly what our developer was saying.
Thanks that solved my question.

You are amazing.

sincerely,

Alex Yi

Revision history for this message
Alex Yi (ayi) said :
#5

Thanks RaiMan, that solved my question.

Revision history for this message
RaiMan (raimund-hocke) said :
#6

Thanks for feedback ;-)

amazing is a little bit off - experienced would hit it better (3 years with Sikuli questions ;-)

Revision history for this message
Alex Yi (ayi) said :
#7

One more question. I remote into my machine from other physical machine and the test is failing. Any idea why?
It's failing to find bunch of images. Is this a resolution issue?

Basically, once I'm done with implementing the test, I need to demo it to the group and usually we go to the meeting room and remote in to the personal work machine.

I guess I need to create a region first and then find the image so that the initial starting x and y coordinates are equal?

Thank you,

sincerely,

Alex

Revision history for this message
RaiMan (raimund-hocke) said :
#8

--- guess I need to create a region first and then find the image so that the initial starting x and y coordinates are equal?
If your images are found on one screen and not on another, then it might be a rendering problem based on different resolution/scree ratio, that changes pixel contents, so the images differ on the pixel level.

You should never define a region based on absolute coordinates, if you want to run a script on different machines. Already on the same machine it is usually not guaranteed, that your app opens its windows at the same place each time.

For browser apps, starting with the browser window as region ( App.window() ) is always a good choice.

The general solution is to find some key visuals on the screen, that are fixed and specific for the app and then calculate a region relative to these matches.

Can you help with this problem?

Provide an answer of your own, or ask Alex Yi for more information if necessary.

To post a message you must log in.