2 minute read

Overview

Notes

Initialization Note

$ npm init playwright@latest

Resolution

Cookie in test

Create a test with codegen and debug

 

Screenshot on Failure

Using Proxy

Waiting

Tips

Debugging with Browser

Checking Ideas

Parent Element

iframe

Unstructured

On WSL

 ここをクリックすると展開されます...
browserType.launch:
    ╔══════════════════════════════════════════════════════╗
    ║ Host system is missing dependencies to run browsers. ║
    ║ Missing libraries:                                   ║
    ║     libnss3.so                                       ║
    ║     libnssutil3.so                                   ║
    ║     libsmime3.so                                     ║
    ║     libnspr4.so                                      ║
    ║     libatk-1.0.so.0                                  ║
    ║     libatk-bridge-2.0.so.0                           ║
    ║     libcups.so.2                                     ║
    ║     libdrm.so.2                                      ║
    ║     libatspi.so.0                                    ║
    ║     libXcomposite.so.1                               ║
    ║     libXdamage.so.1                                  ║
    ║     libXrandr.so.2                                   ║
    ║     libgbm.so.1                                      ║
    ║     libxkbcommon.so.0                                ║
    ║     libpango-1.0.so.0                                ║
    ║     libcairo.so.2                                    ║
    ╚══════════════════════════════════════════════════════╝
browserType.launch:
    ╔══════════════════════════════════════════════════════╗
    ║ Host system is missing dependencies to run browsers. ║
    ║ Missing libraries:                                   ║
    ║     libgtk-3.so.0                                    ║
    ║     libgdk-3.so.0                                    ║
    ║     libXcomposite.so.1                               ║
    ║     libXdamage.so.1                                  ║
    ║     libXrandr.so.2                                   ║
    ║     libXtst.so.6                                     ║
    ║     libpangocairo-1.0.so.0                           ║
    ║     libpango-1.0.so.0                                ║
    ║     libatk-1.0.so.0                                  ║
    ║     libcairo-gobject.so.2                            ║
    ║     libcairo.so.2                                    ║
    ║     libgdk_pixbuf-2.0.so.0                           ║
    ║     libdbus-glib-1.so.2                              ║
    ║     libxcb-shm.so.0                                  ║
    ║     libX11-xcb.so.1                                  ║
    ║     libXi.so.6                                       ║
    ╚══════════════════════════════════════════════════════╝
browserType.launch:
    ╔══════════════════════════════════════════════════════╗
    ║ Host system is missing dependencies to run browsers. ║
    ║ Missing libraries:                                   ║
    ║     libsoup-2.4.so.1                                 ║
    ║     libgstreamer-1.0.so.0                            ║
    ║     libgtk-3.so.0                                    ║
    ║     libgdk-3.so.0                                    ║
    ║     libcairo.so.2                                    ║
    ║     libepoxy.so.0                                    ║
    ║     libevent-2.1.so.7                                ║
    ║     libopus.so.0                                     ║
    ║     libicui18n.so.66                                 ║
    ║     libicuuc.so.66                                   ║
    ║     libpango-1.0.so.0                                ║
    ║     libharfbuzz.so.0                                 ║
    ║     libgdk_pixbuf-2.0.so.0                           ║
    ║     libxslt.so.1                                     ║
    ║     liblcms2.so.2                                    ║
    ║     libwoff2dec.so.1.0.2                             ║
    ║     libharfbuzz-icu.so.0                             ║
    ║     libgstallocators-1.0.so.0                        ║
    ║     libgstapp-1.0.so.0                               ║
    ║     libgstbase-1.0.so.0                              ║
    ║     libgstpbutils-1.0.so.0                           ║
    ║     libgstaudio-1.0.so.0                             ║
    ║     libgsttag-1.0.so.0                               ║
    ║     libgstvideo-1.0.so.0                             ║
    ║     libgstgl-1.0.so.0                                ║
    ║     libgstfft-1.0.so.0                               ║
    ║     libjpeg.so.8                                     ║
    ║     libopenjp2.so.7                                  ║
    ║     libwebpdemux.so.2                                ║
    ║     libwebp.so.6                                     ║
    ║     libenchant-2.so.2                                ║
    ║     libsecret-1.so.0                                 ║
    ║     libhyphen.so.0                                   ║
    ║     libXcomposite.so.1                               ║
    ║     libXdamage.so.1                                  ║
    ║     libgbm.so.1                                      ║
    ║     libdrm.so.2                                      ║
    ║     libffi.so.7                                      ║
    ║     libevdev.so.2                                    ║
    ║     libgudev-1.0.so.0                                ║
    ║     libxkbcommon.so.0                                ║
    ║     libwayland-server.so.0                           ║
    ║     libwayland-egl.so.1                              ║
    ║     libwayland-client.so.0                           ║
    ║     libGLESv2.so.2                                   ║
    ║     libx264.so                                       ║
    ╚══════════════════════════════════════════════════════╝

So, Crafting apt commands

Chromium
$ sudo apt install libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libatspi2.0-0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libxkbcommon0 libpango-1.0-0 libcairo2

Firefox

sudo apt install libgtk-3-0 libpangocairo-1.0-0 libcairo-gobject2 libgdk-pixbuf2.0-0 libdbus-glib-1-2 libx11-xcb1

WebKit

still having error

undefined symbol: gbm_bo_get_modifier

and maybe https://forum.puppylinux.com/viewtopic.php?t=7542

Screen Resolution

References

Updated: