🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@dlenroc/appium-html-driver

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dlenroc/appium-html-driver

WebDriver for testing HTML applications

0.2.0
latest
Source
npm
Version published
Weekly downloads
3
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

Appium HTML Driver · NPM Version Node.js Version Chrome 32 Firefox 29 Safari 8

Appium HTML Driver is a WebDriver that allows controlling applications written using web technologies, regardless of the device they are running on.

Installation

appium driver install --source npm @dlenroc/appium-html-driver

Usage

  • Instrumentation

    Inject the following code in every HTML file that belongs to your application.

    <script src="{origin}/appium-html-driver/js?udid={udid}&handle={handle}"></script>
    

    Where:

    • origin - address of the Appium server, for example: http://192.168.0.2:4723.
    • udid (optional) - identifier that represent your device, default to client's IP address.
    • handle (optional) - identifier that will represent the window handle.
  • Attach and run test

    await driver = await remote({
      'capabilities': {
        'platformName': 'html',
        'appium:automationName': 'html',
        'appium:udid': udid
      },
    });
    
    /**
     * Load instrumented page manually, via cli or in any other way
     *
     * NOTE: that is not driver's responsibility
     */
    
    // Attach to target
    const handles = await driver.getWindowHandles();
    await driver.switchToWindow(handles[0]);
    
    // Conduct testing
    await driver.getUrl()
      .should.eventually.be.fulfilled;
    

Capabilities

CapabilityRequiredTypeDescription
platformName+stringMust be html
appium:automationName+stringMust be html
appium:udid+stringSee Connection
appium:handle-stringThe window handle to switch to during session creation

Commands

CommandDescription
activeGet active element
backBack
clearElement clear
clickElement click
closeWindowClose window
createNewWindowNew window
deleteCookieDelete cookie
deleteCookiesDelete all cookies
elementDisplayedIs element displayed
elementEnabledIs element enabled
elementSelectedIs element selected
executeExecute script
executeAsyncExecute async script
findElementFind element
findElementFromElementFind element form element
findElementsFind elements
findElementsFromElementFind elements from element
forwardForward
getAttributeGet element attribute
getCookieGet named cookie
getCookiesGet all cookies
getCssPropertyGet element CSS value
getElementRectGet element rect
getNameGet element tag name
getPageSourceGet page source
getPropertyGet element property
getTextGet element text
getTimeoutsGet timeouts
getUrlGet current URL
getWindowHandleGet window handle
getWindowHandlesGet window handles
getWindowRectGet window rect
maximizeWindowMaximize window
refreshRefresh
setCookieAdd cookie
setFrameSwitch to frame
setUrlNavigate to URL
setValueElement send keys
setWindowSwitch to window
setWindowRectSet window rect
switchToParentFrameSwitch to parent frame
timeoutsSet timeouts
titleGet title

Keywords

html

FAQs

Package last updated on 26 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts