What screenshot command I should use while doing Visual regression test with Cypress on LambdaTest?

I am doing Visual regression test with Cypress on LambdaTest and I want to capture the screenshot the view port only instead of full page. What screenshot command I should use? cy.screenshot() captures full page by default.

Hey Tom-dale,

You can pass the URLs in an array and then open each website simply using an array with for loop like the below:

String[] url = [{"](https://www.google.com/)[https://www.google.co](https://www.google.com/)m/", "https://www.fb.com/"} for (int i=0; i< url.length; i++) { driver.get(url[i]); Thread.sleep(3000); driver.executeScript("smartui.takeScreenshot="+url[i]); }