Appium - RemoteWebDriver 与 AppiumDriver 启动 [英] Appium - RemoteWebDriver vs AppiumDriver initiation

查看:36
本文介绍了Appium - RemoteWebDriver 与 AppiumDriver 启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用这个启动appium驱动有什么区别

What is the difference between initiating appium driver by using this

driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

driver = new AppiumDriver(url, desiredCapabilities); 

在启动的先决条件和他们可以处理的自动化或任何其他差异方面?

in terms of pre-requisites for initiating and the automation that they can handle or any other difference?

推荐答案

我在 这篇 帖子.

另外,我遇​​到了一个帖子,看看this.这是一篇关于 selenium/webdriver 架构及其历史的优秀文章,它可能会为一些在该领域寻找知识的人清除很多疑虑.特别是理解webdriver内部是如何端到端的工作的,从语言绑定命令到元素的返回.

Also , I came across a post , have a look at this . Its an excellent post about the selenium/webdriver architecture and its history which may clear a lot of doubts for some one looking for knowledge in this area. Specially in understanding how webdriver works internally end to end, from language binding command to return of the element.

从上面的链接复制粘贴

RemoteWebDriver:这个驱动类直接来自上游 Selenium 项目.这是一个非常通用的驱动程序,其中初始化驱动程序意味着向 Selenium 集线器发出网络请求以启动驱动程序会话.由于 Appium 在客户端-服务器模型上运行,因此 Appium 使用它来初始化驱动程序会话.但是,不建议直接使用 RemoteWebDriver,因为还有其他可用的驱动程序可以提供附加功能或便利功能.

RemoteWebDriver: This driver class comes directly from the upstream Selenium project. This is a pretty generic driver where initializing the driver means making network requests to a Selenium hub to start a driver session. Since Appium operates on the client-server model, Appium uses this to initialize a driver session. However, directly using the RemoteWebDriver is not recommended since there are other drivers available that offer additional features or convenience functions.

AppiumDriver:该驱动程序类继承自 RemoteWebDriver 类,但它添加了在通过 Appium 服务器进行的移动自动化测试上下文中有用的附加功能.

AppiumDriver: This driver class inherits from the RemoteWebDriver class, but it adds in additional functions that are useful in the context of a mobile automation test through the Appium server.

AndroidDriver:该驱动程序类继承自 AppiumDriver,但它添加了在通过 Appium 在 Android 设备上进行移动自动化测试的上下文中有用的附加功能.如果您想在 Android 设备或 Android 模拟器上开始测试,请仅使用此驱动程序类.

AndroidDriver: This driver class inherits from AppiumDriver, but it adds in additional functions that are useful in the context of a mobile automation test on Android devices through Appium. Only use this driver class if you want to start a test on an Android device or Android emulator.

IOSDriver:该驱动程序类继承自 AppiumDriver,但它添加了在通过 Appium 在 iOS 设备上进行移动自动化测试上下文中有用的附加功能.如果您想在 iOS 设备或 iOS 模拟器上开始测试,请仅使用此驱动程序类.

IOSDriver: This driver class inherits from AppiumDriver, but it adds in additional functions that are useful in the context of a mobile automation test on iOS devices through Appium. Only use this driver class if you want to start a test on an iOS device or iOS emulator.

如您所见,司机及其姓名与他们的工作密切相关.初始化驱动程序时,只能使用Android或IOS驱动程序.

As you can see, the drivers and their names tie in closely with what they do. When it comes to initializing a driver, only use the Android or IOS drivers.

这篇关于Appium - RemoteWebDriver 与 AppiumDriver 启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆