Open lk-code opened 9 months ago
In short, Playwright is currently not usable for macOS users :(
The error gets thrown here:
We do RuntimeInformation.IsOSPlatform(OSPlatform.OSX)
inside, which is for some reason not working on your environment. Which TFM are you using? Are you using net6.0-maccatalyst
?
the class library has net8.0
and the app net8.0-maccatalyst
.
I know that the exception is thrown there :)
The if statement in line 107 specifies OSX, but behind it are the values MACCATALYST and IOS. This means that the if fails every time. The string comparison is always wrong on macOS.
I am experiencing the same issue. I am trying to use this on MacOS in a Blazor MAUI app.
Here same as @cyrilgupta
System info
Source code
i use the sample code from playwright on macOS and got an exception at the following line (the logic is in a .NET 8 Class Library):
EXCEPTION:
I followed the code through the StackTrace and came to a place where basically the string "OSX" is compared with the string "MACCATALYST" and "IOS" and therefore fails. The value "OSX" is set in Driver.cs line 107 and compared with the current platform in the if. In the OperatingSystem.cs file, however, only MACCATALAYST and IOS are checked as described.
As soon as the platform names for macOS are used correctly everywhere, the bug is fixed and the "Unknown-Platform" exception no longer occurs :)