0.1.21 • Published 11 months ago

@fromeroc9/wdio-locators v0.1.21

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@fromeroc9/wdio-locators

A WebdriverIO plugin for custom locators using decorators.

Installation

To install the package, use npm or yarn:

npm install @fromeroc9/wdio-locators
# or
yarn add @fromeroc9/wdio-locators

## Usage

This package provides two global decorators, android and ios, which can be used to define custom locators for Android and iOS elements in your WebdriverIO tests

import { element } from '@fromeroc9/wdio-locators';

class MyPage {
    @platform()
    btnEnviar = '//XCUIElementTypeButton[@name="SEND_MAIL"]';
  
    @element("//android.view.View[@name='btn-doc-tipo']")
    btnTipoDoc: any;
  
    @element({
      android: "//android.view.View[@content-desc='celular]",
      ios: '//XCUIElementTypeButton[@name="celular"]'
    })
    btnCelular: any;
  
  
    @element()
    btnSiguiente= {
      android: "//android.view.View[@content-desc='NEXT_STEPS']",
      ios: '//XCUIElementTypeButton[@name="NEXT_STEPS"]'
    };
  
    @element()
    btnAceptar = '//XCUIElementTypeButton[@name="ACEPTAR_TERMINOS"]';
}

API

element(locator?: selector): PropertyDecorator Defines a custom locator for an all element.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes.

0.1.21

11 months ago

0.1.20

11 months ago

0.1.18

11 months ago

0.1.17

11 months ago

0.1.16

11 months ago

0.1.13

11 months ago

0.1.12

11 months ago

0.1.11

11 months ago

0.1.10

11 months ago

0.1.9

11 months ago

0.1.8

11 months ago

0.1.7

11 months ago

0.1.6

11 months ago

0.1.5

11 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.2

11 months ago

0.1.0

11 months ago