我用带边的硒。
from selenium import webdriver
driver = webdriver.Edge()
driver.get("xxxxx")
当我打开边缘窗口时,当我运行这段代码时,它将显示selenium.common.exceptions.NoSuchWindowException: Message: The specified window could not be found.。
换句话说,如果我在没有边缘窗口的情况下运行这段代码,它将毫无例外地运行良好。
如果打开了edge窗口,如何使用edge运行selenium?
关于边缘版本:
Mi
有一些困难,使我们的自动化运行微软边缘。安装了正确的浏览器版本驱动程序,并尝试了一些其他的“修复”,但都没有效果。这是在Python3上在PyCharm上使用Selenium。
回到开始,这是我的代码..。
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.edge.options import Option
我已经从微软网站下载并安装了edge网站驱动程序。我在"C:\Python27\Lib\site-packages\selenium-2.48.0-py2.7.egg\selenium\webdriver\edge".中看到边缘驱动程序文件夹
每当我尝试执行以下机器人测试用例时:
*** Settings ***
Documentation Test Edge Browser
*** Test Case ***
Test Edge browser
open browser http://www.google.in Edge
虽然我已经为"
我使用的是最新的selenium-webdriver (2.47.1)和watir-webdriver (0.8.0),并且像其他webdriver.exe文件一样将Edge WebDriver安装在Ruby/bin文件夹中;比如chromedriver或iedriver。它似乎会启动Edge浏览器,但在关闭浏览器并使我的所有测试失败之前,它不会尝试转到URL。我在Windows内的防火墙允许它,当我运行我的rspec测试时,它显示:
Selenium::WebDriver::Error::NoSuchWindowError: no such window
有没有人让MSWebdriver和w
该项目的目标是使用selenium-python使用Microsoft边缘浏览器自动检查站点,我从下载了way驱动程序,然后进行了最新版本17134的提取,没有出现任何问题,比如我希望使用geckodriver自动访问facebook。
带selenium的firefox代码示例
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.firefox.options import Options
# setting up headless o
我正在运行一个角度应用程序的E2E测试。为了使用protractor.conf.js,我确实编辑了SeleniumStandalone。它看起来很好,我可以使用:ng e2e运行测试。
protractor.conf.js
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
// location of the Selenium JAR file and chromedriver, use these if you installed protractor loca
我想自动化一个网站在边缘,这是需要IE模式被启用。如何在selenium中以IE模式启动Edge?
下面的代码,我目前使用的启动边缘在非IE模式,这将无法正确显示网站。
Dim edgeDriverService = Microsoft.Edge.SeleniumTools.EdgeDriverService.CreateChromiumService()
Dim edgeOptions = New Microsoft.Edge.SeleniumTools.EdgeOptions()
edgeOptions.PageLoadStrategy = PageLoadStra
我试图在PyCharm上使用Python/Selenium从Edge获取信息级别的浏览器控制台日志事件,但是当前的配置只从浏览器返回警告级别的日志。我是有意使用msedge.selenium_tools库的,因为边缘上的webdriver似乎被废弃了。
import time
from msedge.selenium_tools import EdgeOptions
from msedge.selenium_tools import Edge
from selenium.webdriver.support.select import Select
from selenium.webdriver
我编写了以下代码在Microsoft浏览器中使用SeleniumWebDriverV2.53.0:启动网页
System.setProperty("webdriver.edge.driver","C:\\Eclipse\\Drivers\\MicrosoftWebDriver.exe");
WebDriver ed = new EdgeDriver();
ed.get("hhtp://www.google.com");
,我收到以下错误,请帮助:
[00:27:40.776] - Listening on http://localhost:177
每次运行python代码时,边缘浏览器都会打开,但不会加载URL。然后Windows系统会显示一个对话框,上面写着:
Microsoft Web驱动程序已停止工作。
一个问题导致程序停止正常工作。如果有可用的解决方案,Windows将关闭程序并通知您。
我的Python代码:(运行在PyCharm上):
# Locate the web driver for Edge browser
driver = webdriver.Edge(executable_path = 'C:/Users/username/webdrivers/MicrosoftWebDriver.exe'
我试图在Windows上运行behave测试,但即使是简单的测试也无法将会话初始化为
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\circleci\AppData\Roaming\Python\Python36\site-packages\selenium\webdriver\edge\webdriver.py", line 66, in __init__
desired_capabilitie
我在使用selenium-ruby来自动化浏览器应用程序。我想模拟文件下载场景。当我想执行chrome时,我有一个名为"download_path“的方法,它的值可以在运行时更改,当下载文件时,它将保存在我的目标路径上。
但是,当我对edge执行相同的代码时,edge中没有对"download_path“的方法支持。
有没有办法在运行时设置我的默认下载位置?
Chrome代码:
@browser = Selenium::WebDriver.for :chrome
# code for navigating to downloads page and clicking on d
我正在尝试使用相同的WebDriver实例连续运行几个测试。在我执行的每一个测试之后:第一个测试通过了driver.close();,但第二个在尝试调用driver.get(URL)时收到了一个错误:
org.openqa.selenium.remote.SessionNotFoundException: no such session
(Driver info: chromedriver=2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961),platform=Windows NT 6.1 SP1 x86_64) (WARNING:
我试图在Windows上使用Selenium::WebDriver::Edge::Driver打开一个浏览器。我能够打开浏览器,但是我的会话立即崩溃,出现以下错误:
unknown command: Cannot call non W3C standard command while in W3C mode
(Selenium::WebDriver::Error::UnknownCommandError)
我将如何关闭硒红宝石中的W3C模式?我试图通过以下操作来跟踪docs :
webdriver_options = Selenium::WebDriver::Edge::Options.ne