stevepryde/thirtyfour

Help Wanted | driver.screenshot produces IoError

bcpeinhardt opened this issue · 2 comments

I am trying to take screenshots of some pages I am visiting like so

 driver.get(format!("https://oms.siteimpact.com/creatives/preview/{}/original?disableLinks", oid)).await?;
 driver.screenshot(std::path::Path::new(&format!("./creative_screenshots/{}_{}.png", oid, category))).await?;

and am receiving the error

Error: IoError(Os { code: 3, kind: NotFound, message: "The system cannot find the path specified." })

But the directory exists in the top level of my project. The error is actually produced even when I try

driver.screenshot(std::path::Path::new(&format!("./{}_{}.png", oid, category))).await?;

Tried to run from git bash and powershell so I don't think it's to do with that.

Update: Please ignore this, the first "category" I was scraping turned out to be "N/A". There goes a few more hours of my life, hope I didn't waste any of yours. Closing this.

Oh I didn't get to this yet. Glad you were able to sort it out.