DevExpress / testcafe-browser-tools

Browser manipulation utils for TestCafe.
https://testcafe.io
MIT License
30 stars 34 forks source link

Support window manipulations without window manager #112

Closed AndreyBelym closed 1 year ago

AndreyBelym commented 7 years ago

Some Linux environments do not have window manager, e.g. when Xvfb is used, or have EWMH-non-compliant window manager.

sirgallifrey commented 7 years ago

Hello @AndreyBelym we talked over this on https://github.com/DevExpress/testcafe/issues/1180

I know this is probably not the solution we are looking for but I got the screenshots working on my machine making this modification to find-window.sh

#!/bin/sh

if hash xwininfo 2>/dev/null; then
    xwininfo -tree -root | grep -i "$1" | sed -e "s/^\s*\(0x[0-9,A-H]\+\).*/\1/ip" -n
elif hash wmctrl 2>/dev/null; then
    wmctrl -l | grep -i "$1" | sed -e "s/^\s*\(0x[0-9,A-H]\+\).*/\1/ip" -n
else
    # here should be a clever error message to pop on npm output
    exit 1
fi
sirgallifrey commented 7 years ago

I also been able to resize a window, which I could not do before.

AndreyBelym commented 7 years ago

Maybe it's too late, but no, this isn't related to the window manager issue. You are just missing xorg-xwininfo package: https://www.archlinux.org/packages/extra/i686/xorg-xwininfo/