如何隐藏Firefox的窗口

如何隐藏Firefox的窗口,第1张

1. 最后,我发现那些谁Windows机器运行的嘛,是不是在java中的解决方案,但你可以做到这一点很容易。 使用AutoIt工具。它具有所有处理窗口的能力。它是free的工具。 安装的AutoIt: 打开编辑器,并散举在下面写代码 为隐藏任何窗口。AutoItSetOption("WinTitleMatchMode", 2)

WinSetState("Title Of Your Window", "", @SW_HIDE)

要取消隐藏它,你下面的代码行。AutoItSetOption("WinTitleMatchMode", 2)

WinSetState("Title Of Your Window", "", @SW_SHOW)

WinTitleMatchMode有不同的选项,可以匹配的Windows称号。1 = Match the title from the start (default)`

2 = Match any substring in the title

3 = Exact title match

4 = Advanced mode, see Window Titles &Text (Advanced)

那么 CodeGo.net,我做的是:我已经创建了一个小程序exe文件,并通过线下。Runtime.getRuntime().exec("C:/Diiinnovation/HideNSeek.exe 0 \"" + "Mozilla Firefox" + "\"")

在HideNSeek.exe-我有下面的AutoIt代码:AutoItSetOption("WinTitleMatchMode", 1)

if $CmdLine[0] >0 Then

if $CmdLine[1] == 0 Then

WinSetState($CmdLine[2], "", @SW_HIDE)

ElseIf $CmdLine[1] == 1 Then

WinSetState($CmdLine[2], "", @SW_SHOW)

Else

EndIf

EndIf

$CmdLine[]是将具有线的数组$CmdLine[0] = number of Parameter

$CmdLine[1] = 1st Parameter after Exe Name

.

.

如果在窗口标题的任何空间,那么你有双引号把它作为像上面一行。 下面的代码行会执行AutoIt的exe文件,如果我通过'0'在优先,然后它会隐藏窗口,如果我将通过'1',那么它会取消隐藏窗口相匹配的标题。Runtime.getRuntime().exec("C:/Diiinnovation/HideNSeek.exe 0 \"" + "Mozilla Firefox" + "\"")

我希望这会帮助你。谢谢!

2. 如果你Selenium RC的或远程的webdriver,那么你可以在远程或虚拟机上运行的浏览器实例。你不应该担心隐藏浏览器窗口,因为他们不会被启动您的本地计算机上。

3. 还尝试运行硒作为一个窗口服务。 在这里看到更多的细节: 硒-我可以隐藏浏览器?

4. 我有一个类似的问题,(我所需要的运行答掘老测试时清升,以最小化浏览器窗口)。我无法找到一个更好的方式来做到这一点,所以我结束了Alt +空格键,N做到这一点。这应该只在Windows中,在Java AWT Robot类玩键盘快捷键: //Alt + Space to open the window menu

Robot robot = new Robot()

robot.keyPress(KeyEvent.VK_ALT)

robot.keyPress(KeyEvent.VK_SPACE)

robot.keyRelease(KeyEvent.VK_SPACE)

robot.keyRelease(KeyEvent.VK_ALT)

Thread.sleep(200)

// miNimize

robot.keyPress(KeyEvent.VK_N)

robot.keyRelease(KeyEvent.VK_N)

5. 如果您的KDE桌面,你可以让Firefox的Windows将最初打开被最小化。这使得关于这个问题我的一天。只是请执行以下 *** 作: 打开Firefox 点击上栏的左上角的Firefox的图标->高级->特殊应用程序设置... 转到“大小和位置”选项卡。 单击“最小化”,然后选择“应用最初”(是)。 这些设置将应用于新的Firefox窗口从现在开始,用d窗与运行测试的webdriver时,你就不会被人打扰了。

6. 哪一种作业系统我想你可以在UNIX系列的系统中实现这一目标。你甚至不会手动访问浏览器。它运行在后台,虽然我没多少它是如何实现的。

7. XVFB来解决这样的问题。 下面有一个链接,/>

aalib 1.4rc5-14

acl 2.2.53-3

adobe-source-code-pro-fonts 2.030ro+1.050it-6

adobe-source-han-sans-cn-fonts 2.001-2

adobe-source-han-serif-cn-fonts 1.001-3

adwaita-icon-theme 3.36.1-1

alacritty 0.5.0-1

alpm_octopi_utils 1.0.2-1

alsa-lib 1.2.3.2-1

alsa-plugins 1:1.2.2-2

alsa-topology-conf 1.2.3-1

alsa-ucm-conf 1.2.3-2

alsa-utils 1.2.3-2

aom 2.0.0-1

appstream-glib 0.7.17-1

archlinux-appstream-data 20200828-1

archlinux-keyring 20200820-1

archlinuxcn-keyring 20200728-1

archlinuxcn-mirrorlist-git 20200703-1

argon2 20190702-3

aspell 0.60.8-2

aspell-en 2019.10.06-1

at-spi2-atk 2.34.2-1

at-spi2-core 2.36.0-1

atk 2.36.0-1

atkmm 2.28.0-2

attr 2.4.48-3

audit 2.8.5-6

autoconf 2.69-7

autoconf-archive 1:2019.01.06-2

automake 1.16.2-3

avahi 0.8+15+ge8a3dd0-1

base 2-2

bash 5.0.018-1

binutils 2.35-1

bison 3.6.4-1

bluez 5.54-2

bluez-utils 5.54-2

boost-libs 1.72.0-2

brotli 1.0.7-3

btrfs-progs 5.7-1

bumblebee 3.2.1-21

bzip2 1.0.8-3

c-ares 1.16.1-1

ca-certificates 20181109-4

ca-certificates-mozilla 3.56-1

ca-certificates-utils 20181109-4

cairo 1.17.2+25+gaee96d175-1

cairomm 1.12.2-4

cantarell-fonts 1:0.201-1

cdparanoia 10.2-8

cifs-utils 6.10-1

clutter 1.26.4-1

clutter-gtk 1.8.4-2

code 1.48.2-1

cogl 1.22.8-1

colord 1.4.4+9+g1ce26da-2

confuse 3.3-1

coreutils 8.32-1

cpio 2.13-2

crda 4.14-3

cryptsetup 2.3.3-1

ctags 1:r20200106+ga3c87ab5-1

curl 7.72.0-2

dav1d 0.7.1-1

db 5.3.28-5

dbus 1.12.20-1

dbus-glib 0.110-2

dconf 0.36.0-1

desktop-file-utils 0.26-1

device-mapper 2.02.187-3

dhcpcd 9.1.4-2

dialog 1:1.3_20200327-1

diffutils 3.7-3

dmenu 4.9-2

dmraid 1.0.0.rc16.3-12

dnssec-anchors 20190629-2

docbook-xml 4.5-9

docbook-xsl 1.79.2-7

dosfstools 4.1-3

double-conversion 3.1.5-2

e2fsprogs 1.45.6-2

egl-wayland 1.1.5-1

eglexternalplatform 1.1-2

electron7 7.1.14-7

elfutils 0.180-1

enchant 2.2.8-3

exo 0.12.11-5

expat 2.2.9-3

fakeroot 1.24-2

feh 3.4.1-1

ffmpeg 2:4.3.1-2

fftw 3.3.8-3

file 5.39-1

filesystem 2020.08.21-1

findutils 4.7.0-2

firefox 80.0-1

flac 1.3.3-2

flex 2.6.4-3

fontconfig 2:2.13.91+48+gfcb0420-2

freetype2 2.10.2-1

fribidi 1.0.10-1

fuse-common 3.9.3-1

fuse2 2.9.9-4

fuse3 3.9.3-1

garcon 0.6.4-2

gawk 5.1.0-1

gc 8.0.4-4

gcab 1.4-1

gcc 10.2.0-1

gcc-libs 10.2.0-1

gcr 3.36-1

gdbm 1.18.1-3

gdk-pixbuf2 2.40.0+6+g5432316df-1

gdmap 0.8.1-6

gettext 0.21-1

giblib 1.2.4-8

giflib 5.2.1-2

git 2.28.0-1

glib-networking 2.64.3-2

glib2 2.64.5-1

glib2-docs 2.64.5-1

glibc 2.32-3

glibmm 2.64.2-1

glslang 8.13.3743-1

glu 9.0.1-2

gmp 6.2.0-1

gnome-themes-extra 3.28-2

gnupg 2.2.21-1

gnutls 3.6.14-2

gobject-introspection-runtime 1.64.1-2

google-glog 0.4.0-2

gperftools 2.7-2

gpgme 1.14.0-1

gpm 1.20.7.r27.g1fd1941-2

gptfdisk 1.0.5-1

graphene 1.10.2-1

graphite 1:1.3.14-1

grep 3.4-1

groff 1.22.4-3

gsettings-desktop-schemas 3.36.1-1

gsm 1.0.19-1

gsound 1.0.2-5

gst-plugins-base 1.16.2-2

gst-plugins-base-libs 1.16.2-2

gst-plugins-good 1.16.2-3

gstreamer 1.16.2-2

gtk-doc 1.32+37+gefc3644-1

gtk-update-icon-cache 1:3.24.22-1

gtk2 2.24.32-2

gtk3 1:3.24.22-1

gtkmm3 3.24.2-2

gtksourceview3 3.24.11+28+g73e57b57-1

guile 2.2.6-2

gvfs 1.44.1-4

gzip 1.10-3

harfbuzz 2.7.2-1

haveged 1.9.13-1

hicolor-icon-theme 0.17-2

hidapi 0.9.0-2

http-parser 2.9.4-1

hwids 20200813.1-1

hwloc 2.2.0-1

i3-gaps 4.18.2-2

i3blocks 1.5-3

i3lock 2.12-2

i3status 2.13-3

iana-etc 20200812-1

ibus 1.5.22+8+gf591381e-1

ibus-rime 1.4.0-2

ibus-table 1.12.0-1

icu 67.1-1

imlib2 1.7.0-1

inetutils 1.9.4-8

iproute2 5.8.0-1

iptables 1:1.8.5-2

iputils 20190709-3

iso-codes 4.5.0-1

iw 5.8-1

iwd 1.8-1

jack 0.125.0-9

jansson 2.13.1-1

js68 68.11.0-1

json-c 0.15-1

json-glib 1.4.4-2

kbd 2.3.0-2

keyutils 1.6.3-1

kmod 27-1

kmscon 8-6

krb5 1.18.2-1

l-smash 2.14.5-2

lame 3.100-3

lcms2 2.11-2

ldb 1:2.1.4-1

ldns 1.7.1-2

less 551-3

leveldb 1.22-2

libaio 0.3.112-2

libarchive 3.4.3-1

libass 0.14.0-2

libassuan 2.5.3-2

libasyncns 0.8+3+g68cd5af-3

libatasmart 0.19-5

libavc1394 0.5.4-4

libblockdev 2.24-1

libbluray 1.2.0-3

libbsd 0.10.0-2

libburn 1.5.2-2

libbytesize 2.4-1

libcaca 0.99.beta19-3

libcanberra 0.30+2+gc0620e4-3

libcanberra-pulse 0.30+2+gc0620e4-3

libcap 2.42-1

libcap-ng 0.7.10-1

libcddb 1.3.2-6

libcdio 2.1.0-2

libcdio-paranoia 10.2+2.0.1-2

libcroco 0.6.13-2

libcups 2.3.3-3

libdaemon 0.14-5

libdatrie 0.2.12-2

libdrm 2.4.102-1

libdv 1.0.0-9

libdvdnav 6.1.0-2

libdvdread 6.1.1-1

libedit 20191231_3.1-1

libelf 0.180-1

libepoxy 1.5.4-2

libev 4.33-1

libevdev 1.9.1-1

libevent 2.1.12-1

libexif 0.6.22-1

libffi 3.3-3

libfontenc 1.1.4-3

libgcrypt 1.8.6-1

libgit2 1:1.0.1-1

libgit2-glib 0.99.0.1-2

libglvnd 1.3.2-1

libgpg-error 1.39-1

libgudev 233-2

libgusb 0.3.5-1

libibus 1.5.22+8+gf591381e-1

libical 3.0.8-2

libice 1.0.10-3

libid3tag 0.15.1b-11

libidn2 2.3.0-1

libiec61883 1.2.0-6

libimobiledevice 1.3.0-1

libinput 1.16.1-1

libisofs 1.5.2-2

libjpeg-turbo 2.0.5-1

libkeybinder3 0.3.2-3

libksba 1.4.0-1

libldap 2.4.50-2

libmanette 0.2.4-1

libmfx 20.2.1-1

libmicrohttpd 0.9.71-1

libmnl 1.0.4-3

libmodplug 0.8.9.0-3

libmpc 1.1.0-2

libmpd 11.8.17-5

libnetfilter_conntrack 1.0.8-1

libnfnetlink 1.0.1-4

libnftnl 1.1.7-1

libnghttp2 1.41.0-1

libnl 3.5.0-2

libnotify 0.7.9-1

libnsl 1.3.0-1

libogg 1.3.4-2

libomxil-bellagio 0.9.3-3

libp11-kit 0.23.21-1

libpcap 1.9.1-2

libpciaccess 0.16-2

libpipeline 1.5.3-1

libplacebo 1.29.1-3

libplist 2.2.0-1

libpng 1.6.37-3

libproxy 0.4.15+33+g454a499-2

libpsl 0.21.0-2

libpulse 13.0-3

libraw1394 2.1.2-3

librime 1:1.5.3-12

librime-data 0.0.0.20190122-2

librsvg 2:2.48.8-1

libsamplerate 0.1.9-3

libsasl 2.1.27-3

libseccomp 2.4.2-1

libsecret 0.20.3-1

libshout 1:2.4.3-3

libsigc++ 2.10.3-1

libsm 1.2.3-2

libsndfile 1.0.28-3

libsoup 2.70.0-1

libsoxr 0.1.3-2

libssh 0.9.4-2

libssh2 1.9.0-2

libstemmer 0+713-2

libtasn1 4.16.0-1

libthai 0.1.28-2

libtheora 1.1.1-5

libtiff 4.1.0-2

libtirpc 1.2.6-1

libtool 2.4.6+42+gb88cebd5-14

libtsm 3-5

libunique 1.1.6-8

libunistring 0.9.10-2

libunwind 1.3.1-2

libusb 1.0.23-2

libusbmuxd 2.0.2-1

libutil-linux 2.36-2

libva 2.8.0-1

libvdpau 1.4-1

libvisual 0.4.0-8

libvorbis 1.3.7-2

libvpx 1.9.0-1

libwacom 1.4.1-1

libwebp 1.1.0-1

libwnck3 3.36.0-1

libx11 1.6.12-1

libxau 1.0.9-3

libxaw 1.0.13-3

libxcb 1.14-1

libxcomposite 0.4.5-3

libxcrypt 4.4.17-1

libxcursor 1.2.0-2

libxdamage 1.1.5-3

libxdg-basedir 1.2.0-5

libxdmcp 1.1.3-3

libxext 1.3.4-3

libxfce4ui 4.14.1-3

libxfce4util 4.14.0-2

libxfixes 5.0.3-4

libxfont2 2.0.4-3

libxft 2.3.3-2

libxi 1.7.10-3

libxinerama 1.1.4-3

libxkbcommon 0.10.0-1

libxkbcommon-x11 0.10.0-1

libxkbfile 1.1.0-2

libxklavier 5.4-3

libxml2 2.9.10-2

libxmu 1.1.3-2

libxnvctrl 450.66-1

libxpm 3.5.13-2

libxpresent 1.0.0-2

libxrandr 1.5.2-3

libxrender 0.9.10-4

libxres 1.2.0-2

libxshmfence 1.3-2

libxslt 1.1.34-5

libxss 1.2.3-3

libxt 1.2.0-2

libxtst 1.2.3-4

libxv 1.0.11-4

libxxf86vm 1.1.4-4

libyaml 0.2.5-1

licenses 20200427-1

lightdm 1:1.30.0-4

lightdm-gtk-greeter 1:2.0.8-1

lightdm-gtk-greeter-settings 1.2.2-4

linux 5.8.5.arch1-1

linux-api-headers 5.7-1

linux-firmware 20200817.7a30af1-1

llvm-libs 10.0.1-2

lm_sensors 3.6.0-2

lmdb 0.9.26-1

lshw B.02.19.2-1

lua 5.4.0-2

lua52 5.2.4-5

lvm2 2.02.187-3

lz4 1:1.9.2-2

lzo 2.10-3

m4 1.4.18-3

mailcap 2.1.49-1

make 4.3-3

man-db 2.9.3-1

man-pages-zh_cn 1.6.3.4-2

marisa 0.2.6-2

md4c 0.4.5-1

mdadm 4.1-2

mesa 20.1.6-1

meson 0.55.1-1

minizip 1:1.2.11-4

mkinitcpio 28-1

mkinitcpio-busybox 1.31.1-1

mousepad 0.4.2-3

mpfr 4.1.0-1

mpg123 1.26.3-2

mpv 1:0.32.0-4

mtdev 1.1.6-1

mujs 1.0.8-1

nano 5.2-1

ncurses 6.2-1

ndctl 69-1

neofetch 7.1.0-1

net-tools 1.60.20181103git-2

nettle 3.6-1

ninja 1.10.1-1

noto-fonts 20190926-4

noto-fonts-cjk 20190409-2

noto-fonts-emoji 20200720-1

npth 1.6-2

nspr 4.28-1

nss 3.56-1

ntfs-3g 2017.3.23-4

nvidia 450.66-16

nvidia-settings 450.66-1

nvidia-utils 450.66-1

ocl-icd 2.2.12-4

octopi 0.10.0-2

opencc 1.1.1-3

opencl-nvidia 450.66-1

opencore-amr 0.1.5-4

openjpeg2 2.3.1-2

openmpi 4.0.4-1

openssh 8.3p1-3

openssl 1.1.1.g-2

opus 1.3.1-2

orage 4.12.1-5

orc 0.4.31-2

ostree 2020.3-2

p11-kit 0.23.21-1

package-query 1.10-1

pacman 5.2.2-1

pacman-contrib 1.4.0-1

pacman-mirrorlist 20200801-1

pam 1.4.0-3

pamac-aur 9.5.8-1

pambase 20200721.1-2

pango 1:1.46.1-1

pangomm 2.42.1-2

parole 1.0.5-1

parted 3.3-2

patch 2.7.6-8

pavucontrol 1:4.0-2

pciutils 3.7.0-1

pcre 8.44-1

pcre2 10.35-1

pcsclite 1.9.0-1

perl 5.32.0-1

perl-error 0.17029-2

perl-mailtools 2.21-4

perl-timedate 2.33-2

perl-uri 1.76-4

pikaur 1.6.11-1

pinentry 1.1.0-5

pixman 0.40.0-1

pkgconf 1.7.3-1

pkgfile 21-2

polkit 0.117-1

polkit-gnome 0.105-5

popt 1.18-1

procps-ng 3.3.16-2

psmisc 23.3-2

pulseaudio 13.0-3

pulseaudio-alsa 1:1.2.2-2

pyalpm 0.9.1-2

pygobject-devel 3.36.1-1

python 3.8.5-1

python-anytree 2.8.0-1

python-appdirs 1.4.4-1

python-dbus 1.2.16-1

python-dbus-common 1.2.16-1

python-gobject 3.36.1-1

python-imagesize 1.2.0-1

python-lxml 4.5.2-1

python-markupsafe 1.1.1-4

python-ordered-set 4.0.2-1

python-packaging 20.4-1

python-pyenchant 3.1.1-2

python-pygments 2.6.1-3

python-pyparsing 2.4.7-1

python-setuptools 1:49.6.0-1

python-six 1.15.0-1

python-snowballstemmer 2.0.0-3

python2 2.7.18-1

python2-dbus 1.2.16-1

python2-gobject 3.36.1-1

python2-gobject2 2.28.7-5

qrencode 4.0.2-2

qt5-base 5.15.0-5

qt5-x11extras 5.15.0-1

qtermwidget 0.15.0-1

ranger 1.9.3-2

rav1e 0.3.3-1

re2 1:20200801-1

readline 8.0.004-1

rest 0.8.1-3

rime-bopomofo 0.0.0.20190120-2

rime-cangjie 0.0.0.20190120-2

rime-essay 0.0.0.20200724-1

rime-luna-pinyin 0.0.0.20200824-1

rime-pinyin-simp 0.0.0.20200812-1

rime-prelude 0.0.0.20190122-2

rime-stroke 0.0.0.20191221-2

rime-terra-pinyin 0.0.0.20200207-2

rime-wubi 0.0.0.20190120-1

ripgrep 12.1.1-1

ristretto 0.10.0-3

rofi 1.5.4-2

rpmextract 1.0-9

rtkit 0.13-1

rubberband 1.8.2-4

rxvt-unicode 9.22-10

rxvt-unicode-terminfo 9.22-10

scrot 1.4-1

sdl2 2.0.12-2

sed 4.8-1

shaderc 2020.0-1

shadow 4.8.1-3

shared-mime-info 2.0+1+g6bf9e4f-2

simplescreenrecorder 0.4.2-1

sl 5.02-6

smbclient 4.12.6-1

snappy 1.1.8-1

sound-theme-freedesktop 0.8-4

speex 1.2.0-3

speexdsp 1.2.0-2

spirv-tools 2020.4-1

sqlite 3.33.0-2

srt 1.4.1-2

startup-notification 0.12-7

sudo 1.9.2-1

sysfsutils 2.1.0-11

systemd 246.3-1

systemd-libs 246.3-1

systemd-sysvcompat 246.3-1

taglib 1.11.1-4

talloc 2.3.1-3

tar 1.32-3

tdb 1.4.3-2

template-glib 3.34.0-2

terminus-font 4.48-3

tevent 1:0.10.2-1

texinfo 6.7-3

thin-provisioning-tools 0.9.0-1

thunar 1.8.15-1

thunar-archive-plugin 0.4.0-3

thunar-media-tags-plugin 0.3.0-2

thunar-volman 0.9.5-3

tree 1.8.0-2

tslib 1.22-1

ttf-dejavu 2.37+18+g9b5d1b2f-2

tumbler 0.2.9-2

twolame 0.4.0-2

typora 0.9.92-1

tzdata 2020a-1

uchardet 0.0.7-1

udisks2 2.9.1-1

unzip 6.0-14

upower 0.99.11-3

usbmuxd 1.1.1-1

util-linux 2.36-2

v4l-utils 1.20.0-1

vamp-plugin-sdk 2.10.0-1

vi 1:070224-4

vid.stab 1.1-3

vim 8.2.1523-1

vim-runtime 8.2.1523-1

virtualgl 2.6.4-1

vmaf 1.5.3-1

volume_key 0.3.12-3

vte-common 0.60.3-1

vte3 0.60.3-1

vulkan-icd-loader 1.2.151-1

w3m 0.5.3.git20200507-1

wavpack 5.3.0-1

wayland 1.18.0-2

wayland-protocols 1.20-1

webrtc-audio-processing 0.3.1-2

which 2.21-5

wireless-regdb 2020.04.29-1

wireless_tools 30.pre9-3

wpa_supplicant 2:2.9-7

wqy-bitmapfont 1.0.0RC1-4

wqy-microhei 0.2.0_beta-10

wqy-zenhei 0.9.45-8

x264 3:0.160.r3011.cde9a93-1

x265 3.4-1

xcb-proto 1.14-1

xcb-util 0.4.0-3

xcb-util-cursor 0.1.3-3

xcb-util-image 0.4.0-3

xcb-util-keysyms 0.4.0-3

xcb-util-renderutil 0.3.9-3

xcb-util-wm 0.4.1-3

xcb-util-xrm 1.3-2

xdg-utils 1.1.3+19+g9816ebb-1

xf86-input-libinput 0.30.0-1

xf86-input-synaptics 1.9.1-2

xf86-video-amdgpu 19.1.0-2

xf86-video-ati 1:19.1.0-2

xf86-video-vesa 2.4.0-3

xfburn 0.6.2-1

xfce4-appfinder 4.14.0-2

xfce4-artwork 0.1.1a_git20110420-6

xfce4-battery-plugin 1.1.3-2

xfce4-clipman-plugin 1.6.1-1

xfce4-cpufreq-plugin 1.2.1-2

xfce4-cpugraph-plugin 1.1.0-2

xfce4-datetime-plugin 0.8.0-2

xfce4-dict 0.8.3-2

xfce4-diskperf-plugin 2.6.2-2

xfce4-eyes-plugin 4.5.1-1

xfce4-fsguard-plugin 1.1.1-2

xfce4-genmon-plugin 4.0.2-2

xfce4-mailwatch-plugin 1.2.0-9

xfce4-mount-plugin 1.1.3-2

xfce4-mpc-plugin 0.5.2-2

xfce4-netload-plugin 1.3.2-2

xfce4-notes-plugin 1.8.1-5

xfce4-notifyd 0.6.1-1

xfce4-panel 4.14.4-1

xfce4-power-manager 1.6.6-1

xfce4-pulseaudio-plugin 0.4.3-1

xfce4-screensaver 0.1.10-1

xfce4-screenshooter 1.9.7-2

xfce4-sensors-plugin 1.3.92-2

xfce4-session 4.14.2-2

xfce4-settings 4.14.3-1

xfce4-smartbookmark-plugin 0.5.1-2

xfce4-systemload-plugin 1.2.3-2

xfce4-taskmanager 1.2.3-1

xfce4-terminal 0.8.9.2-1

xfce4-time-out-plugin 1.1.1-1

xfce4-timer-plugin 1.7.1-1

xfce4-verve-plugin 2.0.0-2

xfce4-wavelan-plugin 0.6.1-2

xfce4-weather-plugin 0.10.1-2

xfce4-whiskermenu-plugin 2.4.6-1

xfce4-xkb-plugin 0.8.1-3

xfconf 4.14.3-1

xfdesktop 4.14.2-2

xfsprogs 5.7.0-3

xfwm4 4.14.5-1

xfwm4-themes 4.10.0-4

xkeyboard-config 2.30-2

xorg-bdftopcf 1.1-2

xorg-docs 1.7.1-3

xorg-font-util 1.3.2-2

xorg-fonts-100dpi 1.0.3-7

xorg-fonts-75dpi 1.0.3-7

xorg-fonts-alias-100dpi 1.0.4-1

xorg-fonts-alias-75dpi 1.0.4-1

xorg-fonts-encodings 1.0.5-2

xorg-iceauth 1.0.8-2

xorg-luit 1.1.1-4

xorg-mkfontscale 1.2.1-2

xorg-server 1.20.9-1

xorg-server-common 1.20.9-1

xorg-server-devel 1.20.9-1

xorg-server-xephyr 1.20.9-1

xorg-server-xnest 1.20.9-1

xorg-server-xvfb 1.20.9-1

xorg-server-xwayland 1.20.9-1

xorg-sessreg 1.1.2-2

xorg-setxkbmap 1.3.2-2

xorg-smproxy 1.0.6-3

xorg-util-macros 1.19.2-2

xorg-x11perf 1.6.1-2

xorg-xauth 1.1-2

xorg-xbacklight 1.2.3-2

xorg-xcmsdb 1.0.5-3

xorg-xcursorgen 1.0.7-2

xorg-xdpyinfo 1.3.2-4

xorg-xdriinfo 1.0.6-2

xorg-xev 1.2.4-1

xorg-xgamma 1.0.6-3

xorg-xhost 1.0.8-2

xorg-xinit 1.4.1-2

xorg-xinput 1.6.3-2

xorg-xkbcomp 1.4.3-1

xorg-xkbevd 1.1.4-3

xorg-xkbutils 1.0.4-4

xorg-xkill 1.0.5-2

xorg-xlsatoms 1.1.3-2

xorg-xlsclients 1.1.4-2

xorg-xmodmap 1.0.10-2

xorg-xpr 1.0.5-2

xorg-xprop 1.2.4-2

xorg-xrandr 1.5.1-2

xorg-xrdb 1.2.0-2

xorg-xrefresh 1.0.6-2

xorg-xset 1.2.4-2

xorg-xsetroot 1.1.2-2

xorg-xvinfo 1.1.4-2

xorg-xwd 1.0.7-2

xorg-xwininfo 1.1.5-2

xorg-xwud 1.0.5-2

xorgproto 2020.1-1

xvidcore 1.3.7-2

xz 5.2.5-1

yajl 2.1.0-3

yaml-cpp 0.6.3-2

yaourt 1.9-1

yay 10.0.4-1

zip 3.0-9

zita-alsa-pcmi 0.3.2-3

zita-resampler 1.6.2-3

zlib 1:1.2.11-4

zsh 5.8-1

zstd 1.4.5-1

配置方法:

1.安装Xvfb和pyvirtualdisplay

yum install xorg-x11-server-Xvfb

pip install pyvirtualdisplay

2.安装firefox和芹芹毕selenium

yum install firefox

pip install selenium

到这里。环境就配置好了。嫌芹首烂接下来就可以上代码了。

3.示例代码

from pyvirtualdisplay import Display

from selenium import webdriver

display = Display(visible=0, size=(900, 800))

display.start()

driver = webdriver.Firefox()

driver.get('http://www.haosou.com')

print driver.title

driver.quit()

display.stop()


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/tougao/8282998.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-15
下一篇 2023-04-15

发表评论

登录后才能评论

评论列表(0条)

保存