草庐IT

selenium4

全部标签

node.js - 使用 Firefox 从 Nightwatch.js 自动运行 Selenium 时出错

我想在运行nightwatch.js测试用例时自动启动Selenium服务器。我将nightwatch.json上的selenium设置更改为:"selenium":{"start_process":true,"server_path":"./selenium/selenium391.jar","log_path":"C:/Projects/reports","host":"127.0.0.1","port":4444,"cli_args":{"webdriver.chrome.driver":"./selenium/chromedriver.exe","webdriver.ie.dr

带有Chrome的Python Selenium,如何下载到具有指定文件名的指定文件夹

该网站有一个下载按钮,我可以用python做button.click()以网站指定的文件名将文件下载到Chrome下载文件夹。有没有办法在Windows上更改目标文件夹和文件名? 最佳答案 尝试:download_dir="/yourDownloadPath/"chrome_options=webdriver.ChromeOptions()preferences={"download.default_directory":download_dir,"directory_upgrade":True,"safebrowsing.enab

windows - 让 selenium、ghostdriver、phantomJS 在 Windows 7 上工作

我正在使用selenium-2.34和phantomJS-1.9.1-windows但是当我尝试使用时:importorg.openqa.selenium.phantomjs.PhantomJSDriver;importorg.openqa.selenium.phantomjs.PhantomJSDriverService;我可以看到它没有检测到org.openqa.selenium.phantomjs遇到这个错误Theimportorg.openqa.selenium.phantomjscannotberesolved我的印象是GhostDriver嵌入了PhantomJS-http

Python:使用Selenium和requests爬取文章

01需求描述在微信公众号上面,其实有很多很不错的文章,但是微信官方给我提供的方式只有几种:点赞、收藏、在看。或者有时候,有人通过转发到自己的朋友圈的方式,做文章的留存。因此,爬取与存储微信公众号的文章的需求便产生了。02用Python实现的爬取工作通过Python的【Selenium】与【】,我实现了一个简易的爬虫;并且通过ruamel.yaml,将不同的爬取需求需要更改的设置统一到了一个配置文件中,便于工具化的使用。该脚本工具对应的代码在这里,需要的朋友可以自行下载:https://download.csdn.net/download/huangbangqing12/8740092503脚本

java - Selenium : Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code

我通过本地机器连接到VPN并尝试在chrome浏览器上执行selenium脚本然后我收到以下错误:Onlylocalconnectionsareallowed.PleaseprotectportsusedbyChromeDriverandrelatedtestframeworkstopreventaccessbymaliciouscode.[1553947986.711][WARNING]:TimedoutconnectingtoChrome,retrying...[1553947990.713][WARNING]:TimedoutconnectingtoChrome,retrying

windows - 寻找用于 Web 测试的 Windows GUI 测试工具,如 Selenium

关闭。这个问题不符合StackOverflowguidelines.它目前不接受答案。要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于StackOverflow来说是偏离主题的,因为它们往往会吸引自以为是的答案和垃圾邮件。相反,describetheproblem以及迄今为止为解决该问题所做的工作。关闭8年前。Improvethisquestion我们使用并喜欢Selenium测试我们的网络用户界面。现在我们需要测试一个原生的Windows程序,正在寻找一个类似的工具。可以将session记录到可重播以执行测试的可编辑脚本的东西。我看到过对Spy++和UIAutomationVe

python - Selenium 导致Windows错误

我是selenium的新手,我正在使用它的python包。因此,当我复制并运行在其文档页面上找到的代码时:http://selenium.googlecode.com/svn/trunk/docs/api/py/index.html,我收到以下错误:fromseleniumimportwebdriverfromselenium.common.exceptionsimportNoSuchElementExceptionfromselenium.webdriver.common.keysimportKeysbrowser=webdriver.Firefox()Traceback(mostr

node.js - 使用 Selenium 服务器运行 Protractor 测试时遇到问题

尝试运行Protractor/Jasmine/Seleniume2e测试尝试使用Protractor使用独立的Selenium服务器和chrome驱动程序运行端到端测试。当我尝试使用Protractor运行我的测试时,我收到以下Selenium服务器错误:14:08:24.188警告-异常:C:\Users\ARM678\AppData\Local\Temp\jna--1409357381\jna1939368593138214681.dll:%1不是有效的Win32应用程序这里有一些细节...我通过在命令行中执行以下命令来启动Selenium独立服务器(传入chrome网络驱动程序位

java - 独立 Selenium 2.45.0;脚本使 Firefox 38.0.1 崩溃

我在早期版本的Firefox中使用了2.44-它运行良好。FirefoxDriverffd=newFirefoxDriver();ffd.get("www.google.com");现在,即使是这个简单的调用也会抛出异常:Exceptioninthread"main"org.openqa.selenium.WebDriverException:f.QueryInterfaceisnotafunctionCommanddurationortimeout:190millisecondsBuildinfo:version:'2.45.0',revision:'5017cb8',time:'2

java - 在后台从 java 启动 selenium 服务器

我想进行易于使用的selenium测试-只需运行一个文件,它就会启动服务器、连接到它、运行测试,然后关闭服务器并退出(在Windows上)。我不想让用户看到selenium控制台,所以如果可能我想隐藏它(在后台运行它,也许还有日志输出)。如何直接从Java启动selenium服务器? 最佳答案 好吧,这并不难(至少在Windows上)。我曾经像这样启动selenium服务器:java-jarselenium-server-xxx.jar要在没有控制台的情况下启动它,我只使用javaw:javaw-jarselenium-server