@ceki/sdk 1.11.2 → 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.cjs CHANGED
@@ -794,18 +794,11 @@ var Browser = class _Browser {
794
794
  params: { type: "mouseReleased", x: px, y: py, button: "left", clickCount: 1 }
795
795
  });
796
796
  }
797
- for (const char of text) {
798
- await this._sendKeystroke(char);
799
- const delay = this._humanizer.typeDelay();
800
- if (delay > 0) {
801
- await new Promise((r) => setTimeout(r, delay));
802
- }
803
- }
797
+ }
798
+ const human = this._humanizer ? ["natural", "careful"].includes(this._humanizer.profile.name) ? this._humanizer.profile.name : "natural" : null;
799
+ await this.send({ method: "Ceki.typeText", params: { text, human } });
800
+ if (this._humanizer) {
804
801
  await this._humanizer.after("type");
805
- } else {
806
- for (const char of text) {
807
- await this._sendKeystroke(char);
808
- }
809
802
  }
810
803
  }
811
804
  async scroll(opts) {