-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"New Context" and "New Persistent Context" keywords should always return a Path-object with full video path in recordVideo dictionary #2215
Comments
|
@Snooz82, nice to see that you have done good enhancement for the
I don't know if that issue has been fixed already as it has been a while when I created the ticket, and many releases have been made, but my opinion is that the |
You are correct that is not yet solved. I did not yet get it completely. So the only way is now the the rules of the paths have changed a bit and are now:
So are you talking about the resulting paths in Browser Catalog? |
Can you describe some reproducible cases and the effect to the users? where is the difference between a path object given or a string? |
@allcontributors please add @ssallmen for bugs |
I have now implemented it so, that the path will always be a resolved and absolute Path.
|
@Snooz82, this comment in another bug report explains the best how it used to work earlier, and what were the impications for the user: #2206 (comment) |
Ok now i understand the issue. I used your tests and all pass. If it contains a string, it stays a string, if it contains a Path object it stays a Path object. |
@allcontributors please add @ssallmen for tests |
I've put up a pull request to add @ssallmen! 🎉 |
Is your feature request related to a problem? Please describe.
At the moment it depends on whether the directory given in the dictionary as recordVideo argument already exists or not, whether the
New Context
keyword mutates the dir-key value to a Path object, or does it keep it as a string. That makes things inconsistent.Even more inconsistent is that
New Persistent Context
keyword never mutates the dir-key value of the recordVideo argument dictionary but keeps it untouched, even when user has given a relative path.New Context
keyword will mutate the dir-keys value with the full path as Path object if the path given by user did not exist, or if the given path was relative.There is also another bug in
New Permanent Context
keyword related to the video recording which I reported separately in #2214Describe the solution you'd like
Both
New Permanent Context
andNew Context
should always "return", independent whether the path was existing or not or if it was relative or absolute, the full path either as a Path-object or as a string as the value of the dir-key in dictionary given as recordVideo argument.Additional context
I have code already prepared for the change (always returning Path-object as that's what we discussed with @aaltat). Maybe some tests need to be added to make that a PR.
The text was updated successfully, but these errors were encountered: