简体   繁体   English

通过Linux服务器运行Selenium测试

[英]Running Selenium Tests through Linux Server

This is a general question, but I want to run my Selenium tests on a cloud Linux Server. 这是一个普遍的问题,但是我想在云Linux服务器上运行Selenium测试。 I am accessing this server using PuTTY, which is just a terminal. 我正在使用PuTTY访问这台服务器,这只是一个终端。

I was wondering how I could get my Selenium scripts to run on this VM. 我想知道如何使我的Selenium脚本在此VM上运行。

Currently I have a Selenium Grid set up with physical machines, I just do not know how to set one up through a server where the only communication I have with it is through PuTTY and a terminal. 目前,我已经在Selenium Grid上设置了物理机器,我只是不知道如何通过服务器建立一个Selenium Grid,而我与之唯一的通信是通过PuTTY和一个终端。

To run Selenium from a Linux server that is "terminal only", as you put it, is to install a GUI inside of the server. 如您所说,要从“仅终端”的Linux服务器运行Selenium,就是在服务器内部安装GUI。

The most common GUI to use, is Xvfb. 最常用的GUI是Xvfb。 There are plenty of tutorials out there on how to run GUI programs like Google Chrome and Mozilla Firefox through Xvfb. 关于如何通过Xvfb运行GUI程序(如Google Chrome和Mozilla Firefox)的教程很多。

您还可以使用PhantomJS进行无头自动化,而无需在Server上安装任何GUI。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Linux上使用Nightwatch运行硒测试 - Running selenium tests using nightwatch on linux 将测试从Windows移动到Linux服务器-Selenium - Moving tests from windows to Linux server - Selenium JAVA:使用 GeckoDriver 在 Linux 上运行 Selenium 测试:驱动程序不可执行 - JAVA: Running Selenium Tests on Linux using GeckoDriver: driver is not executable 如何在Linux服务器上运行Selenium(C#)和NUnit? - How to run Selenium (C#) and NUnit running with linux server? 在Linux服务器上运行selenium时,Chrome无法启动 - Chrome failed to start when running selenium on Linux server 通过Windows env中运行的Java程序读取Linux服务器上的文件 - Read a file on Linux server through java program running in Windows env 通过VPN从Linux上运行的nodejs访问Windows服务器上的数据库 - Access database on Windows server through VPN from nodejs running on Linux 在Linux中使用Selenium运行无头Firefox - Running headless firefox with selenium in Linux Selenium RSpec功能无法在Linux上运行 - selenium rspec features not running on linux 在 Linux 中通过 Selenium 使用 Chrome 运行而不会出现沙箱错误的 NaCl 辅助进程 - NaCl helper process running without a sandbox error using Chrome through Selenium in Linux
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM