Skip to content
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

make playwright instance public #75

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SabotageAndi
Copy link
Contributor

No description provided.

@304NotModified
Copy link

Looks good, but its a breaking change. Maybe leave the current property the same and make it obsolete

@SabotageAndi
Copy link
Contributor Author

We don't care that much about breaking changes in SpecFlow.Actions as in SpecFlow. But still we only do them, when we really have to.
In this case, because of the stupid async/await everywhere, I have no really good idea on how to save the old property.

@304NotModified
Copy link

304NotModified commented Mar 15, 2022

I think is really easy to keep it backwardscompatible?

Something like this?

        [Obsolete("Replaced with GetBrowser()"]
        public Task<IBrowser> Current => GetBrowser();

        public async Task<IPlaywright> GetPlaywright()
        {
            return (await _currentBrowserLazy.Value).Playwright;
        }

        public async Task<IBrowser> GetBrowser()
        {
            return (await _currentBrowserLazy.Value).Browser;
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants