-
Notifications
You must be signed in to change notification settings - Fork 106
Multiple browser tests running simultaneously with same screenshot name fails #133
Comments
I use a folder system that puts screenshots into different folders based on metadata. That works pretty well. |
@JamEngulfer Nice, can you post an example of how that works? does it fix the bug mentioned above? or a workaround? |
@kmturley Well, it's a pretty simple solution. I just generate a file path that takes into account things like the browser, element and url, then set it with the screenshotRoot option. |
OK? that didn't really answer my questions though!? :) |
Sorry, yeah. You're right. From what I can see, you haven't really got a bug there, it's just reusing the same folder (unless you are actually making it use different folders). You can set the folder that the screenshots are saved in with When I run each of my tests, I have an object with all of the information like browser, url and element. I just use the built in If I haven't been clear or if you need more information, just ask. |
That sounds like a good approach, but does that mean you need to init() for each browser separately? to be able to change the screenshotRoot per browser? or you pass a dynamic variable? |
I think there is an issue with tests running on multiple browsers simultaneously if they use the same name. Here is my setup:
wdio.conf.js
header.spec.js
One browser always fails because they are sharing the same screenshot filename and running at the same time:
However if I make the name to be unique per browser. It seems to work every time:
This then creates separate files per browser, which makes more sense to me:
Shouldn't this naming be done automatically by webdrivercss? Otherwise it fails for anyone using multiple browsers!
If you add it to webdrivercss, I would suggest we move the browser name to the end of the filename, after the user inputted name e.g.:
This allows screenshots of similar types to be grouped together, and you can easily see browser screenshots side by side.
Another point to notice is that "internet explorer" has a space in the browser name, this causes issue when naming screenshots. I would suggest using either:
The text was updated successfully, but these errors were encountered: