← Back to team overview

sikuli-driver team mailing list archive

[Question #268803]: Issue While running the code of Sikuli

 

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

Hi 

I have run the below code of Sikuli to handle the web images from the Desktop.

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.sikuli.script.FindFailed;
import org.sikuli.script.Pattern;
import org.sikuli.script.Screen;


public class SikuliRun {
	
public static void main(String[] args) throws FindFailed {
	Screen screen =new Screen();
	Pattern img1 = new Pattern("‪C:\\Users\\Selenium\\Desktop\\loc.JPG");
	Pattern img2 = new Pattern("‪C:\\Users\\Selenium\\Desktop\\open.JPG");
	WebDriver driver = new FirefoxDriver();
	driver.get("http://www.zamzar.com";);
	driver.manage().window().maximize();
	driver.manage().timeouts().implicitlyWait(20L, TimeUnit.SECONDS);
	driver.findElement(By.xpath("//*[@id='inputFile']")).click();
	screen.wait(img1,10);
	//screen.type(img1, "‪C:\\test\\om.jpg");
	screen.type(img1, "‪D:\\images.jpeg");
	screen.click(img2);
}
}

Partial code is working but its not typing the location on the popup windows, My friend use the same coding and its working fine for them but not working on my system.

Request your help to solve this issue.

Regards,
Jayshree


-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.