marmelab / gremlins.js

Monkey testing library for web apps and Node.js

Home Page:https://marmelab.com/blog/2020/06/02/gremlins-2.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How randomizer works ?

FlorentD opened this issue · comments

Hi all !
I cannot figure out how use a custom randomizer.
I want my typer gremlins just use keyCode 39 when they type, so i write something like

let myHorde = gremlins.createHorde();

let myGremlins = gremlins.species.typer();
myGremlins.eventTypes(['keydown']);
myGremlins.randomizer({
  natural: function() {
    return 39;
  }
});

myHorde.gremlin(myGremlins);
myHorde.unleash();

But it doesn't work and I don't find any doc to help me.

Where I'm wrong ?
Thanks !

Hey folks. The Marmelab team is attempting to clean up the Issues backlog. With that, we're closing issues that have been open for an one or more years.

We really appreciate the folks have taken the time to open and comment on this issue. Please don't confuse this closure with us not caring or dismissing your issue, feature request, discussion, or report. If the issue pertains to a bug, please re-test for the bug on the latest version of gremlins.js.

The best way to report problems with gremlins.js 2.0 is to file new issues.