我想在不打开浏览器的情况下运行python selenium脚本。我已经在rhel上安装了xvfbwrapper-0.1.3,并编辑了我的代码:
from selenium import webdriver,selenium
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
import unittest, time
from xvfbwrapper import Xvfb
class SeleTry(unittest.TestCase):
def setUp(self):
try:
vdisplay = Xvfb(width=1280, height=720)
vdisplay.start()
self.driver = webdriver.Firefox()
self.driver.implicitly_wait(10)
.....//rest of the code//
当我试图执行它的时候,它总是抛出一个EER:
^{pr2}$因为我是新来的,我不明白我错了什么?在
目前没有回答
相关问题 更多 >
编程相关推荐