Code Monkey home page Code Monkey logo

taiko-selenoid's Introduction


TaikoSelenoidy


Codacy Badge Node.js CI

A plugin to run taiko tests in Selenoid cluster

Installation

npm install taiko-selenoid --save-dev

A plugin to run taiko tests in Selenoid cluster

Usage

Add TAIKO_PLUGIN=taiko-selenoid to your env

const { openBrowser, closeBrowser } = require('taiko');

const assert = require('assert');

describe('Selenoid Tests', async () => {
  beforeEach('Before Launch', async () => {
    await openBrowser(); // return Selenoid Session Id
  });

  afterEach('Close Browser', async () => {
    await closeBrowser(); // Will close the browser and Selenoid Session
  });

  it('Taiko Selenoid Test', async () => {
    await goto('google.com');
    await write('Taiko.js');
  });
});

taiko-selenoid's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar saikrishna321 avatar srideviabhirami avatar swetashegde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

taiko-selenoid's Issues

Not able to use CLI

Starting Selenoid on port: undefined
Error: invalid argument "undefined" for "-p, --port" flag: strconv.ParseUint: parsing "undefined": invalid syntax

How to set user agent when using Taiko-Selenoid

When using Taiko-Selenoid, the user agent being set is,

X.X.X.X - - [20/Oct/2021:12:05:41 +0000] "GET /test.html HTTP/1.1" 200 35 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36"

We need to set an additional string, so that all requests coming from automation scripts can be tracked on the server end. Some thing like

X.X.X.X - - [20/Oct/2021:12:05:41 +0000] "GET /test.html HTTP/1.1" 200 35 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36 Taiko"

When using Taiko-Gauge combination, I am able to achieve this by adding it in the step_implementation.js

beforeSuite(async () => {
await openBrowser({
headless: headless,
args:['--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4314.0 Safari/537.36 Taiko']
})
});

With Taiko-Selenoid, I am not able to do this. Please let me know what modification should be done to add a string in the User Agent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.