0.1.21 • Published 1 year ago

@fromeroc9/wdio-locators v0.1.21

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

0.1.20

1 year ago

0.1.18

1 year ago

0.1.17

1 year ago

0.1.16

1 year ago

0.1.13

1 year ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.0

1 year ago