问题描述
我尝试了下面的代码,但它只是下载带有 gif 扩展名的空白文件。
MobileElement image1 = (MobileElement)driver.findElementByXPath(XpathOfelement);
byte[] imageinbyte = image1.getId().getBytes();
ByteArrayInputStream bis = new ByteArrayInputStream(imageinbyte);
BufferedImage bImage2 = ImageIO.read(bis);
ImageIO.write(bImage2,"gif",new File("File Location"))````
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)