minkphp / minkphp/Mink

Screenshot not getting captured , please help

Open
#796 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

response-needed
Dominant language
PHP
Stars
1.6k
Forks
286
PR merge metrics
No merged PRs in 30d

Description

package selenimfile;

import java.io.File;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class ScreenshotDemo {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		System.setProperty("webdriver.chrome.driver", "C:\\Users\\GLB-114\\Downloads\\chromedriver.exe" );
		
		WebDriver driver = new ChromeDriver();
		driver.manage().window().maximize();
		driver.manage().timeouts().pageLoadTimeout(50, TimeUnit.SECONDS);		
		driver.get("https://www.lambdatest.com/");
		
		TakesScreenshot sc= (TakesScreenshot)driver;
		File source= sc.getScreenshotAs(OutputType.FILE);
		FileUtils.copyFile(source,  new File("./selenim/screenshot/screen.png"));
		
		System.out.println("screenshot has been taken ");
		driver.close();
	
}

}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the ScreenshotDemo.main entry point shown in the issue and inspect the screenshot capture and file-copy steps. Reproduce the run with the provided ChromeDriver setup; done means the program completes and creates the expected screen.png file.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.