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

WebKit doesn't appear to work with files loaded from disk #159

Open
simonw opened this issue Sep 27, 2024 · 0 comments
Open

WebKit doesn't appear to work with files loaded from disk #159

simonw opened this issue Sep 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@simonw
Copy link
Owner

simonw commented Sep 27, 2024

I tried this:

# Different browsers
echo '<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>User Agent</title>
</head>
<body>
    <h1>Your User Agent:</h1>
    <p id="ua"></p>
    <script>
        document.getElementById("ua").textContent = navigator.userAgent;
    </script>
</body>
</html>' > user-agent.html
shot-scraper user-agent.html \
  -o examples/useragent-default-chromium.png -h 400 -w 800
shot-scraper user-agent.html \
  -o examples/useragent-firefox.png -h 400 -w 800 -b firefox
shot-scraper user-agent.html \
  -o examples/useragent-webkit.png -h 400 -w 800 -b webkit
rm user-agent.html

It passed for Chrome and Firefox but failed for WebKit:

playwright._impl._api_types.Error: A server with the specified hostname could not be found.
=========================== logs ===========================
navigating to "http://user-agent.html/", waiting until "load"
============================================================

Looks like there's a bug where WebKit doesn't correctly work with files loaded from disk.

Originally posted by @simonw in #158 (comment)

@simonw simonw added the bug Something isn't working label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant