Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/272.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用c#和selenium webdriver比较两个图像_C#_Selenium Webdriver_Compare_Selenium Chromedriver - Fatal编程技术网

使用c#和selenium webdriver比较两个图像

使用c#和selenium webdriver比较两个图像,c#,selenium-webdriver,compare,selenium-chromedriver,C#,Selenium Webdriver,Compare,Selenium Chromedriver,我想用c#和selenium webdriver比较两个图像,以改进我的测试。例如,程序正在比较两个图像,当图像相同时,程序可以继续运行。c#中的比较图像写得很好: 你想从网页下载img吗 在selenium中,获取所有img标记并获取src属性。使用以下方法下载图像的src: using (var client = new WebClient()) { client.DownloadFile("http://example.com/file/song/a.mpeg", "a.mpeg

我想用c#和selenium webdriver比较两个图像,以改进我的测试。例如,程序正在比较两个图像,当图像相同时,程序可以继续运行。

c#中的比较图像写得很好:

你想从网页下载img吗

在selenium中,获取所有img标记并获取src属性。使用以下方法下载图像的src:

using (var client = new WebClient())
{
    client.DownloadFile("http://example.com/file/song/a.mpeg", "a.mpeg");
}

你的问题是什么?你是说逐像素比较?