GVKun编程网logo

Selenium Web驱动程序moveToElement(Actions)用木偶驱动程序引发错误?

16

在本文中,我们将给您介绍关于SeleniumWeb驱动程序moveToElement的详细内容,并且为您解答Actions用木偶驱动程序引发错误?的相关问题,此外,我们还将为您提供关于asp.net–

在本文中,我们将给您介绍关于Selenium Web驱动程序moveToElement的详细内容,并且为您解答Actions用木偶驱动程序引发错误?的相关问题,此外,我们还将为您提供关于asp.net – 在.net中使用selenium 2.0 web驱动程序的示例/教程?、Firefox升级到47后,c#Selenium 2.53迁移到木偶驱动程序、Python Selenium Web驱动程序:send_keys在无头模式下不起作用、selenium 2 web驱动程序另存为对话框的知识。

本文目录一览:

Selenium Web驱动程序moveToElement(Actions)用木偶驱动程序引发错误?

Selenium Web驱动程序moveToElement(Actions)用木偶驱动程序引发错误?

在硒测试中出现以下错误

POST /session/ee1b9201-dadc-7446-b753-0a418a230d30/moveto did not match a known command

我所做的是

Actions resetView = new Actions(driver);resetView.moveToElement(el).perform();

环境:

Firefox v47.0

Webdriver 3.0.0-beta2

答案1

小编典典

这是完全可以预期的。没有GeckoDriver(木偶)的发行版支持Actions该类。这是Mozilla团队开发Marionette的首要任务之一。

asp.net – 在.net中使用selenium 2.0 web驱动程序的示例/教程?

asp.net – 在.net中使用selenium 2.0 web驱动程序的示例/教程?

有没有使用.net的selenium 2.0网络驱动程序的教程/示例?

我试过搜索,但只能找到java,没有关于.net和selenium 2.0 web驱动程序

解决方法

这里的文档在C#中有一个例子:
http://seleniumhq.org/docs/03_webdriver.html

using OpenQA.Selenium.Firefox;
using OpenQA.Selenium;

class GoogleSuggest
{

    static void Main(string[] args)
    {
        IWebDriver driver = new FirefoxDriver();

        //Notice navigation is slightly different than the Java version
        //This is because 'get' is a keyword in C#
        driver.Navigate().GoToUrl("http://www.google.com/");
        IWebElement query = driver.FindElement(By.Name("q"));
        query.SendKeys("Cheese");
        System.Console.WriteLine("Page title is: " + driver.Title);
        driver.Quit();
    }

}

Firefox升级到47后,c#Selenium 2.53迁移到木偶驱动程序

Firefox升级到47后,c#Selenium 2.53迁移到木偶驱动程序

我正在尝试使用selenium升级到升级后的firefox Web浏览器自动化。selenium似乎需要木偶驱动程序才能继续工作。我按照开发人员的指示进行操作,

  1. 下载了驱动程序
  2. 重命名为wires.exe

以下代码无法正确地将PATH设置为自定义路径。

System.Environment.SetEnvironmentVariable(“ webdriver.gecko.driver”,“ @C:\
DOWNLOADS \ wires.exe”)

所以我将wires.exe添加到debug \ bin文件夹,然后wires.exe正常工作,但是出现以下错误

捕获了System.InvalidOperationException消息=找不到实体Source = WebDriver

这是我用来启动webdriver的代码

FirefoxOptions option1 = new FirefoxOptions();
option1.IsMarionette = true;
option1.AddAdditionalCapability("marionette",true);
driver = new FirefoxDriver(option1);

Python Selenium Web驱动程序:send_keys在无头模式下不起作用

Python Selenium Web驱动程序:send_keys在无头模式下不起作用

在选项中尝试添加此参数

chrome_options.add_argument("user-agent = my-user-agent")

my-user-agent对于每个系统都是不同的,请检查您的代理商Google my user agent并将其插入选项中。

与此同时,我觉得在您的代码中,while是不必要的,您可以删除它。 由于您尝试访问的文本框需要花费一些时间才能加载,因此请在提取文本框时尝试在此处使用显式等待

WebDriverWait(driver,20).until(EC.presence_of_element_located((By.CSS_SELECTOR,"#identifierId")))

当您必须输入文本并按Enter时,请使用以下代码段更新代码:

username = WebDriverWait(driver,"#identifierId")))
username.send_keys("Emailuser",Keys.ENTER)

selenium 2 web驱动程序另存为对话框

selenium 2 web驱动程序另存为对话框

使用selenium 2和webdriver我的一个脚本需要以pdf或csv保存报告,只需调出另存为对话框.我不知道如何与它互动.我现在尝试在Firefox中,但希望它能在所有浏览器中运行.

我读了2009年的一些帖子,webDriver和selenium无法访问另存为对话框但是想知道现在是否有一个解决方法.

我只需要单击保存单选按钮,这样就不会尝试打开它,然后单击保存按钮

解决方法

“SaveAs”和“File Open”对话框的问题在于它们依赖于运行测试的OS,并且selenium rc无法与之交互.唯一的解决方案是使用一些外部Desktop Automation脚本(如AutoIt)来处理对话框. Here’s一个关于如何做到这一点的好教程.

谢谢,Vamyip

今天的关于Selenium Web驱动程序moveToElementActions用木偶驱动程序引发错误?的分享已经结束,谢谢您的关注,如果想了解更多关于asp.net – 在.net中使用selenium 2.0 web驱动程序的示例/教程?、Firefox升级到47后,c#Selenium 2.53迁移到木偶驱动程序、Python Selenium Web驱动程序:send_keys在无头模式下不起作用、selenium 2 web驱动程序另存为对话框的相关知识,请在本站进行查询。

本文标签: