Gmail login Functionality error

Asked by Prasanjit on 2018-02-06

My Sikuli Automation scenario is

a) Load www.
b)Click on Gmail link at the top right
c)Login page displayed
d)Type emailid in the email id/phonenumber field
e)Click Next
f)Password field is displayed
g)Type password
f)Click Next and user is logged in

What happens is that the emailid never gets typed and the Next button gets clicked as a result of which the test fails .

Console Log however says Type emailid is successful

Please find the below code:

package popsocketsautomation;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.WebDriver;
import org.sikuli.script.FindFailed;
import org.sikuli.script.Pattern;
import org.sikuli.script.Screen;
import org.sikuli.script.SikuliException;
import org.testng.annotations.Test;

public class SikuliFirstProgram {


 public void gmailLogin() throws InterruptedException

  Screen screen = new Screen();

  Pattern image1 =new Pattern("D:\\PopsocketsAutomation\\popsocketsautomation\\PopsocketsImages\\GmailLogo.png");

  Pattern image2 =new Pattern("D:\\PopsocketsAutomation\\popsocketsautomation\\PopsocketsImages\\Username.png");

  Pattern image3 =new Pattern("D:\\PopsocketsAutomation\\popsocketsautomation\\PopsocketsImages\\Password.png");

  Pattern image4 =new Pattern("D:\\PopsocketsAutomation\\popsocketsautomation\\PopsocketsImages\\Next.png");

WebDriver driver = null;

driver = new ChromeDriver();
 driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
 screen.type(image2, "<email address hidden>");//this is not happening but console log says this is fine";
        screen.type(image3, "test");;



Console : [log] CLICK on L(1132,136)@S(0)[0,0 1366x768] (570 msec)
[log] CLICK on L(649,716)@S(0)[0,0 1366x768] (536 msec)
[log] TYPE "<email address hidden>."
[log] CLICK on L(826,510)@S(0)[0,0 1366x768] (548 msec)
FindFailed: D:/PopsocketsAutomation/popsocketsautomation/PopsocketsImages/Password.png:

Please help me as I need to give a demo to my client pertai ing to Sikuli. Your help will be deeply appreciated

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
RaiMan (raimund-hocke) said : #1

one of the most often pitfalls:
type() does not allow to enter special characters as such
see faq 933

use paste() instead.
... in any case check, wether the image is there, the GUI is ready and the text field has focus.

use the imagepath feature to set the bundlepath for the images.
No need to define patterns - just use the image file name (.png not needed), if you do not define a smilarity score and/or target offset.

Can you help with this problem?

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

To post a message you must log in.