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

查看:157
本文介绍了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?

推荐答案

我在

I have got the answer in this post.

另外,我遇​​到了一个帖子,请查看.这是一篇有关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天全站免登陆