Functional Automation Testing Tools Selenium individual browsers and Android device driver methods

Source: Internet
Author: User
Tags appium

Seleniumtest

Https://github.com/WeikiForNtt/SeleniumTest.git

These days in doing selenium test, each browser has done a survey, share the resulting

(1), selenium is a specific what things, their own to Baidu, official website http://docs.seleniumhq.org/, if not open, to open a VPN access.

(2), selenium to web browser driver

(2-1), the root directory has a selenium summary. xlsx file, for reference, there are some points to note when configuring

(2-2), under the drivers directory for the selenium driver under the window System, configure the JUnit test to load the driver to drive the browser,

Firefox browser driver as long as Sdriver = new Firefoxdriver (),      Safari browser driver as long as Sdriver = new Safaridriver (),      Chrome Browser:           system.setproperty ("Webdriver.chrome.driver", "D:\\xx\\xxxx\\chromedriver.exe");           Sdriver = new Chromedriver ();

  

IE浏览器:

  

(3), Android device Browser test method

(3-1),http://appium.io/ 下载Appium ,下载完成直接打开即可,当前前提要配置Node.js Android ClassPath等,网上教程很多。(3-2),同样的配置(BaseAndroidTest参照),我这里是驱动Android设备上的chrome浏览器进行测试        如果设备没有安装chrome浏览器,直接安装或者adb安装都可以。          
Desiredcapabilities capabilities = Desiredcapabilities.android ();          Capabilities.setcapability (Mobilecapabilitytype.browser_name, browsertype.chrome);          Capabilities.setcapability (mobilecapabilitytype.platform,platform.android);          Capabilities.setcapability (Mobilecapabilitytype.platform_name, "Android");//This is Android          Capabilities.setcapability (Mobilecapabilitytype.device_name, "WQ");//Device name          capabilities.setcapability ( Mobilecapabilitytype.version, "6.0.1");//device version          URL url = new URL ("Http://127.0.0.1:4723/wd/hub");// This is the path after the Appium is connected to the Android device, provided the appium is the boot state          sdriver = new Androiddriver (URL, capabilities);

  

(4), Android native app drive method (Basenativetest reference) basic with Android browser, also need Appium connection device.

Desiredcapabilities capabilities = Desiredcapabilities.android ();      Capabilities.setcapability (mobilecapabilitytype.platform,platform.android);      Capabilities.setcapability (Mobilecapabilitytype.platform_name, "Android");      Capabilities.setcapability (Mobilecapabilitytype.device_name, "WQ");      Capabilities.setcapability (mobilecapabilitytype.version, "6.0.1");      Capabilities.setcapability ("Apppackage", "along.nttdata.com");//This is the native app's package name      capabilities.setcapability (" Appactivity "," along.nttdata.com.ui.LoginActivity ");//start activity      URL url = new URL (" http://127.0.0.1:4723/wd/ Hub ");      Sdriver = new Androiddriver (URL, capabilities);

  

Above.

Functional Automation Testing Tools Selenium individual browsers and Android device driver methods

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.