← Back to team overview

sikuli-driver team mailing list archive

[Question #672323]: Sikuli .targetOffset()

 

New question #672323 on Sikuli:
https://answers.launchpad.net/sikuli/+question/672323

Hi.

I've been trying to search pretty much everywhere for a solution to my problem.
But i have'nt been able to find it.

Im trying to use Sikuli for Visual studio 2017 (C#)

So far i got some of it working. I can find images and i can click and send text.
But i can't get things like .targetOffset() to work, it does'nt recognize the command.

Btw i' m new to programming so examples are appreciated :)

This is my current code:

using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Support.UI;
using Sikuli4Net.sikuli_UTIL;
using Sikuli4Net.sikuli_REST;

private void button1_Click(object sender, EventArgs e)
        {
            APILauncher launch = new APILauncher();
            Pattern Image1 = new Pattern(@"C:\Users\Elliot\Desktop\Sikuli Images\Login.PNG");
            Pattern Image2 = new Pattern(@"C:\Users\Elliot\Desktop\Sikuli Images\Type-Email.PNG");

            ChromeOptions options = new ChromeOptions();
            ChromeDriverService service = ChromeDriverService.CreateDefaultService();
            service.HideCommandPromptWindow = true;
            options.AddArgument("--disable-infobars");
            var driver = new ChromeDriver(service, options);

            driver.Manage().Window.Size = new Size(1900, 1080);
            driver.Url = "http://www.google.dk/";;

            Sikuli4Net.sikuli_REST.Screen scr = new Sikuli4Net.sikuli_REST.Screen();
            scr.Click(Image1);
            scr.Type(Image2, "MyEmailHere");
        }
            
            // I want to do something similar to this

            scr.Click(Image1).targetOffset(300, 0);
            
            // Error message: Operator '.' cannot be applied to operand of type 'void'

I hope someone can tell me what i'm missing? 

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