npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

trueautomation

v0.3.10

Published

TrueAutomation.IO Client

Downloads

2

Readme

TrueAutomation.IO Client

The purpose of this application is wrap Chrome Driver and proxy all JSONWire protocol requests. Application intercepts /element and /elements requests and use advanced location algorithm if specified.

How it works

Object is found by initial locator during the first run. We use advanced html tree and attributes analyzing algorithm which can find the object even if locator has been changed (id/classes are regenerated or HTML slightly changed).

ChromeDriver Wrapper

The node application that runs ChromeDriver and wraps it to intercept required requests.

Prerequisites

The basic requirement is node 9+ with npm installed. The best way to get proper environment is install node via nvm. To install nvm for your platform please follow instructions here. When you have nvm installed run nvm install stable to install the latest version of node.

TrueAutomation.IO Clent installation

  1. Checkout project from git
  2. From the source folder run npm install to download and install dependecies. ChromeDriver will be installed automatically

Run ChromeDriver wrapper

Just run from the source folder node index.js.

Webdriver.IO Tests

Example tests based on webdriver.io. Located in examples/webdriverio

Getting ready

  1. cd examples/webdriverio
  2. npm install

Running tests

npm run test

Adding new test

We are using mocha framework to create tests. All specs are located at specs directory. You can use exampleTest.js as the reference for your tests.

Using smart locators

In order to use TrueAutomation Smart Locators replace your locator with the following object: { locator: 'initialLocator', name: 'true:automation:name' }

We suggest you to use namespaced names for your object. Like projectName:pageName:moduleName:objectName

Initial locator is used to locate object for the first time. If you change initial locator value object will be rewritten.

Example

Original: The following code would be broken if id of the element is changed.

browser.setValue(
  'mauticform_input_trialformemailonly_email', 
  '[email protected]'
);

TrueAutomation version: The following code would be fine even if id is eliminated or changed after the first run.

browser.setValue({ 
    locator: "mauticform_input_trialformemailonly_email", 
    name: 'educatorio:trial:email'
}, '[email protected]');

Capybara Tests

Example tests based on capybara. Located in examples/capybara

Getting ready

Capybara requires ruby 2.3+. You can use rvm to install required ruby version.

  1. cd examples/capybara
  2. bundle install

Running tests

bundle exec rake

Adding new test

We are using rspec framework to create tests. All specs are located at specs. You can use example_spec.rb as the reference for your tests. All test files should match *_spec.rb pattern.

Using smart locators

There is a special helper ta(name, locator) defined in spec/support/true_automation_helpers.rb.

In order to use TrueAutomation Smart Locators copy this helper into your project and use ta(ta_name, locator) instead of your locators. Example find(:xpath, ta('true:automation:name', '//initialLocator')).

We suggest you to use namespaced names for your object. Like projectName:pageName:moduleName:objectName

Initial locator is used to locate object for the first time. If you change initial locator value object will be rewritten.

Example

Original: The following code would be broken if id of the element is changed.

find('#mauticform_input_trialformemailonly_email').set('[email protected]')

TrueAutomation version: The following code would be fine even if id is eliminated or changed after the first run.

find(ta('educatorio:trial:email', '#mauticform_input_trialformemailonly_email')).set('[email protected]')