强圆nice 2016-04-24 10:05 采纳率: 55.2%
浏览 1309
已采纳

DefaultSelenium过期了,那用什么代替呢?如图

图片说明

  • 写回答

1条回答 默认 最新

  • _1_1_7_ 2016-06-14 12:22
    关注

    The Selenium Interface and DefaultSelenium Class both belong to Selenium 1 and are deprecated. Selenium has advanced to Selenium 2 (WebDriver) and for this reason these warning messages are displayed to encourage users to stop using old Selenium 1 code and start using Selenium 2 (WebDriver) code.

    To add: This has got nothing to do with your IDE (Eclipse) or your Java version.

    You will want to use the following classes as these are part of Selenium 2 (WebDriver). WebDriver is an interface used by various Selenium 2 drivers.

    import org.openqa.selenium.By;
    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.WebElement;
    Then you have various drivers that you can use. RemoteWebDriver / HtmlUnitDriver / FireFoxDriver / ChromeDriver / IEDriverServer etc. You will want to import the driver in your Java class.

    Selenium selenium = new DefaultSelenium();
    Becomes

    WebDriver driver = new TheSpecificDriver();

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器