← Back to team overview

sikuli-driver team mailing list archive

[Bug 1386862] Re: [1.1.0] OS X 10.10: Location: outside any screen in multi-monitor setup

 

Hi this is the log on Yosemite:

*******TestOnMouseHoverOrthogonalLayout*******
Coordinates for x =-2560
Coordinates for y =0
x= -2560
x= 0
[debug] Image: loaded: images/Mac/TomSawyerPerspectives/CommonCanvasPreview/ToolBar/OrthogonalLayoutCanvas.png (file:/Users/ljacinto/Documents/workspace/SikuliSeleniumJava/images/Mac/TomSawyerPerspectives/CommonCanvasPreview/ToolBar/OrthogonalLayoutCanvas.png)
[debug] Image: cached: images/Mac/TomSawyerPerspectives/CommonCanvasPreview/ToolBar/OrthogonalLayoutCanvas.png (1 KB) (# 9 KB 108 -- 0 % of 64 MB)
[debug] Region: hover: P(images/Mac/TomSawyerPerspectives/CommonCanvasPreview/ToolBar/OrthogonalLayoutCanvas.png) S: 0.4
[debug] Region: find: waiting 3.0 secs for P(images/Mac/TomSawyerPerspectives/CommonCanvasPreview/ToolBar/OrthogonalLayoutCanvas.png) S: 0.4 to appear in S(1)[-2560,0 2560x1440]
[debug] Region: find: P(images/Mac/TomSawyerPerspectives/CommonCanvasPreview/ToolBar/OrthogonalLayoutCanvas.png) S: 0.4 has appeared 
at M[-1604,83 27x25]@S(S(1)[-2560,0 2560x1440]) S:1.00 C:-1591,95 [836/835 msec]
Script paused for: 1500
Searching image for validationimages/Mac/TomSawyerPerspectives/CommonCanvasPreview/HoverToolTips/OrthogonalLayout.png
[debug] Image: loaded: images/Mac/TomSawyerPerspectives/CommonCanvasPreview/HoverToolTips/OrthogonalLayout.png (file:/Users/ljacinto/Documents/workspace/SikuliSeleniumJava/images/Mac/TomSawyerPerspectives/CommonCanvasPreview/HoverToolTips/OrthogonalLayout.png)
[debug] Image: cached: images/Mac/TomSawyerPerspectives/CommonCanvasPreview/HoverToolTips/OrthogonalLayout.png (4 KB) (# 10 KB 112 -- 0 % of 64 MB)
[debug] Region: exists: waiting 3.0 secs for P(images/Mac/TomSawyerPerspectives/CommonCanvasPreview/HoverToolTips/OrthogonalLayout.png) S: 0.6 to appear in S(1)[-2560,0 2560x1440]
[debug] Region: exists: P(images/Mac/TomSawyerPerspectives/CommonCanvasPreview/HoverToolTips/OrthogonalLayout.png) S: 0.6 has not appeared [1599 msec]
[debug] FileManager: tempfile create:
/var/folders/z5/kycxdqnx1nsg46fwx1g101pdwpbsln/T/Sikulix/sikuli-6755377293243039222.png
Saving Evidence in: images/Mac/SocialNetworkAnalysis/Evidence/TestSikuliTSSocialNetworkHtml5PreviewTesttestOnMouseHoverOrthogonalLayout.png
*******TestOnMouseHoverDegreeCentralityLayout*******
Coordinates for x =-2560
Coordinates for y =0
x= -2560
x= 0
[debug] Image: loaded: images/Mac/TomSawyerPerspectives/CommonCanvasPreview/ToolBar/DegreeCentralityCanvas.png (file:/Users/ljacinto/Documents/workspace/SikuliSeleniumJava/images/Mac/TomSawyerPerspectives/CommonCanvasPreview/ToolBar/DegreeCentralityCanvas.png)
[debug] Image: cached: images/Mac/TomSawyerPerspectives/CommonCanvasPreview/ToolBar/DegreeCentralityCanvas.png (1 KB) (# 11 KB 114 -- 0 % of 64 MB)
[debug] Region: hover: P(images/Mac/TomSawyerPerspectives/CommonCanvasPreview/ToolBar/DegreeCentralityCanvas.png) S: 0.4
[debug] Region: find: waiting 3.0 secs for P(images/Mac/TomSawyerPerspectives/CommonCanvasPreview/ToolBar/DegreeCentralityCanvas.png) S: 0.4 to appear in S(1)[0,0 2560x1440]
[error] Location: outside any screen (-2560, 0) - subsequent actions might not work as expected
[error] Location: outside any screen (-2560, 0) - subsequent actions might not work as expected
[error] Location: outside any screen (-2560, 0) - subsequent actions might not work as expected
[error] Location: outside any screen (-2560, 0) - subsequent actions might not work as expected
[error] Location: outside any screen (-2560, 0) - subsequent actions might not work as expected
[error] Location: outside any screen (-2560, 0) - subsequent actions might not work as expected
[debug] Region: find: P(images/Mac/TomSawyerPerspectives/CommonCanvasPreview/ToolBar/DegreeCentralityCanvas.png) S: 0.4 has not appeared [1278 msec]
can not find P(images/Mac/TomSawyerPerspectives/CommonCanvasPreview/ToolBar/DegreeCentralityCanvas.png) S: 0.4 in S(1)[0,0 2560x1440]
Script paused for: 1500
Searching image for validationimages/Mac/TomSawyerPerspectives/CommonCanvasPreview/HoverToolTips/DegreeCentrality.png
[debug] Image: loaded: images/Mac/TomSawyerPerspectives/CommonCanvasPreview/HoverToolTips/DegreeCentrality.png (file:/Users/ljacinto/Documents/workspace/SikuliSeleniumJava/images/Mac/TomSawyerPerspectives/CommonCanvasPreview/HoverToolTips/DegreeCentrality.png)
[debug] Image: cached: images/Mac/TomSawyerPerspectives/CommonCanvasPreview/HoverToolTips/DegreeCentrality.png (4 KB) (# 12 KB 118 -- 0 % of 64 MB)
[debug] Region: exists: waiting 3.0 secs for P(images/Mac/TomSawyerPerspectives/CommonCanvasPreview/HoverToolTips/DegreeCentrality.png) S: 0.6 to appear in S(1)[0,0 2560x1440]
[error] Location: outside any screen (-2560, 0) - subsequent actions might not work as expected
[error] Location: outside any screen (-2560, 0) - subsequent actions might not work as expected
[error] Location: outside any screen (-2560, 0) - subsequent actions might not work as expected
[error] Location: outside any screen (-2560, 0) - subsequent actions might not work as expected
[error] Location: outside any screen (-2560, 0) - subsequent actions might not work as expected
[error] Location: outside any screen (-2560, 0) - subsequent actions might not work as expected


and these are the code:

@Test
	public void testOnMouseHoverOrthogonalLayout()
	{
		System.out.println("*******TestOnMouseHoverOrthogonalLayout*******");
		System.out.println("Coordinates for x =" + TSAutomationTester.automationTesterCurrentScreen.x);
		System.out.println("Coordinates for y =" + TSAutomationTester.automationTesterCurrentScreen.y);
		String imageToolBar =
			environment.toolBarImagesPath + File.separator + "OrthogonalLayoutCanvas.png";
		String imageExpected =
			environment.toolTipsImagePath + File.separator + "OrthogonalLayout.png";
		boolean result =
			TSTestCases.isToolTipPresentImageMap(TSAutomationTester,
				imageToolBar,
				imageExpected);

		if (!result)
		{
			TSAutomationUtils.getScreenShot(TSAutomationTester, className
				+ "testOnMouseHoverOrthogonalLayout", environment.evidencePath);
		}
		Assert.assertTrue(result);

        }


@Test
	public void testOnMouseHoverDegreeCentralityLayout()
	{
		System.out.println("*******TestOnMouseHoverDegreeCentralityLayout*******");
		System.out.println("Coordinates for x =" + TSAutomationTester.automationTesterCurrentScreen.x);
		System.out.println("Coordinates for y =" + TSAutomationTester.automationTesterCurrentScreen.y);
		String imageToolBar =
			environment.toolBarImagesPath + File.separator + "DegreeCentralityCanvas.png";
		String imageExpected =
			environment.toolTipsImagePath + File.separator + "DegreeCentrality.png";
		boolean result =
			TSTestCases.isToolTipPresentImageMap(TSAutomationTester,
				imageToolBar,
				imageExpected);

		if (!result)
		{
			TSAutomationUtils.getScreenShot(TSAutomationTester, className
				+ "testOnMouseHoverClosenessCentralityLayout", environment.evidencePath);
		}
		Assert.assertTrue(result);
	}

**That methods call to

public static boolean isToolTipPresentImageMap(TSTester tester,
		String imageHover,
		String imageExpected)
	{
		boolean result = true;
		long timeOut = 1500;
		
			tester.onMouseHoverImageMap(imageHover);
		
		if (tester.isPresentElement(imageExpected, new Float(0.6), timeOut) != null)
		{
			result = true;
		}
		else
		{
			result = false;
		}
		return result;
	}


public void onMouseHoverImageMap(String patternStringPath)
	{

		try
		{
			int coordinateX=automationTesterCurrentScreen.x;
			int coordinateY=automationTesterCurrentScreen.y;
			System.out.println("x= "+coordinateX);
			System.out.println("x= "+coordinateY);
			
			
			automationTesterCurrentScreen.hover(new Pattern(patternStringPath).similar(new Float(0.4)));
			if(automationTesterCurrentScreen.x!=coordinateX){
				System.out.println("Trying to reach when changes to 0 the x coordinate:");
				automationTesterCurrentScreen.x=coordinateX;
			}
		}
		catch (FindFailed ff)
		{
			System.out.println(ff.getMessage());
		}
	}


NOTE: On github I saw that Hover method sets to (0,0) "getCenter" if target gets=null, I guess that why is changing to x=0 and y=0, but it only works with if I only use a Screen.

Regards!

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

Title:
  [1.1.0] OS X 10.10: Location: outside any screen in multi-monitor
  setup

Status in Sikuli:
  In Progress

Bug description:
  Sikulix API  Version: 1.1.0
  Yosemite 64 bits


  I'm developing a solution on Java with Sikuli, with two monitors, on Mac OS after I updated to Yosemite I began to get the next errors message:
  error] Location: outside any screen (-2560, 0) - subsequent actions might not work as expected
  [error] Location: outside any screen (-2560, 0) - subsequent actions might not work as expected
  [error] Location: outside any screen (-1484, 153) - subsequent actions might not work as expected

  I've make changes to Display settings and update to Java 1.8 JDK and JRE
  I use this method to get the Screen ID:

  public static int getCurrentScreenId(Pattern pattern) throws Exception
  	{
  		int result = 0;

  		for (int i = 0; i <= 1; i++)
  		{
  			System.out.println("Try number " + i);
  			if (new Screen(i).exists(pattern) != null)
  			{
  				System.out.println("Searching on Screen: " + i);
  				result = i;
  				System.out.println("Screen founded =" + result);

  			}
  			else
  			{
  				continue;
  			}

  		}
  		return result;
  	}
  NOTE: on Yosemite the screen 0 (default) is the monitor connected to the machine, if you unplugged the monitor then the screen(0) is the screen machine.

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


References