0

I tried java with selenium to take full page screenshot in applitools and I used below code for full page screenshot but am not able to take full page screenshot , it takes only the current page and stitches.I have just initiated to learn automation testing,so please help me out in detail.

public void checklogin()
{
    Eyes eyes=new Eyes();
    eyes.setApiKey("MY API KEY");
    eyes.setBatch(new BatchInfo("My Batch"));
    eyes.setMatchLevel(MatchLevel.LAYOUT);
    eyes.setForceFullPageScreenshot(true);
    eyes.setStitchMode(StitchMode.CSS);
    eyes.open(driver, "BasicInfo", "BasicInformation"); 
    eyes.checkWindow("BasicPage");
    eyes.check("basic",Target.window().fully());
    eyes.close();
}
raja
  • 11
  • 1
  • Hi raja - welcome to Stack Overflow. Your question is perfectly valid and provides enough information about what you're trying to do. You might have more success if you remove the last sentence where you're requesting detailed assistance. Remember that you're asking someone to take time out of their day to help you out. I like the idea that you should pretend you're talking to a busy colleague when asking your question. [This page is a great way to learn how to state your question](https://stackoverflow.com/help/how-to-ask) – Josh May 14 '19 at 13:01
  • If you have applitools eyes, you should open a ticket and ask them. They also have a lot of information on their site for all this... have you looked? Have you tried their different samples? – JeffC May 14 '19 at 13:32

2 Answers2

1

Just replace

eyes.setStitchMode(StitchMode.CSS);

to:

 eyes.setStitchMode(StitchMode.SCROLL);

For details, please visit: StitchMode

Tafseer
  • 23
  • 6
0

If you are using eyes.setForceFullPageScreenshot(true) than you don't need the stitch mode. Just delete or comment out the eyes.setStitchMode(StitchMode.CSS) line.

Mate Mrše
  • 7,997
  • 10
  • 40
  • 77