@ceki/sdk 1.11.1 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -735,18 +735,11 @@ var Browser = class _Browser {
735
735
  params: { type: "mouseReleased", x: px, y: py, button: "left", clickCount: 1 }
736
736
  });
737
737
  }
738
- for (const char of text) {
739
- await this._sendKeystroke(char);
740
- const delay = this._humanizer.typeDelay();
741
- if (delay > 0) {
742
- await new Promise((r) => setTimeout(r, delay));
743
- }
744
- }
738
+ }
739
+ const human = this._humanizer ? ["natural", "careful"].includes(this._humanizer.profile.name) ? this._humanizer.profile.name : "natural" : null;
740
+ await this.send({ method: "Ceki.typeText", params: { text, human } });
741
+ if (this._humanizer) {
745
742
  await this._humanizer.after("type");
746
- } else {
747
- for (const char of text) {
748
- await this._sendKeystroke(char);
749
- }
750
743
  }
751
744
  }
752
745
  async scroll(opts) {