Open eliaspaulpeschke opened 2 years ago
Oh wow, thanks a lot for reporting that. Unfortunately I have no access to any MacOS here. Need to think about how to test that properly. I'll look into it how other libraries solve similar cases on MacOS and come back to you.
Does it help if you start the test execution from a folder for which you have write access? Or create the screenshots folder there before manually?
I'm sure we'll find a solution together and you can do the pull request. I believe my problem is, trying to create that screenshot folder in the current directory. I should ensure to create it inside the output directory of Robot Framework...
The tests were all in a folder where I had write access - I started them via a gradle task that starts a python script though, maybe the problem lies somewhere there.
I got it to run on my machine by importing it with the Import Library
keyword instead of in the resources file's settings section. Maybe creating the screenshot directory - if it doesn't exist yet - when a screenshot is actually produced would be the solution here.
Selenium does it that way it seems.
I'm on MacOs 12.3 using IntelliJ Idea. When I import DocTest.VisualTest, IntelliJ Idea (with the newest languageserver plugin) tells me the following:
Unresolved library: DocTest.VisualTest. Error generating libspec: Initializing library 'DocTest.VisualTest' with no arguments failed: OSError: [Errno 30] Read-only file system: '/screenshots'
The Problem has to do with
VisualTest.__init__()
, because, when I outcomment both theos.makedirs()
statements in there in my site package, everything works as expected - minus the screenshots, sadly. For me, it looks like the library needs another way of handling the screenshot directory, but i'm not apt enough to make that into a sensible pull request right now.