@stubber/virtual-worker 1.0.6 → 1.1.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.
@@ -40,14 +40,6 @@ export const browser_click = async (params, stubber_context) => {
40
40
  target = page.locator(locator);
41
41
  }
42
42
 
43
- // const target = page.locator(locator);
44
-
45
- try {
46
- await target.waitFor({ state: "attached", timeout: 5000 });
47
- } catch {
48
- return create_error_conceptual({ message: "No element found for locator", details: { locator, frame } });
49
- }
50
-
51
43
  if (download) {
52
44
  // not all downloads are made equal. Some of them actually trigger the "download" event, in which case playwright handles it
53
45
  // however, some files, like PDFs, are opened inline in the browser, so no download event is triggered
@@ -43,10 +43,6 @@ export const browser_press_key = async ({ entries }, stubber_context) => {
43
43
  target = page.locator(locator);
44
44
  }
45
45
 
46
- if (!(await target.count())) {
47
- return create_error_conceptual({ message: "No element found for locator", details: { locator, key, keys } });
48
- }
49
-
50
46
  if (key) {
51
47
  await target.press(key);
52
48
  } else if (keys) {
@@ -40,10 +40,6 @@ export const browser_write_text = async ({ entries }, stubber_context) => {
40
40
  target = page.locator(locator);
41
41
  }
42
42
 
43
- if (!(await target.count())) {
44
- return create_error_conceptual({ message: "No element found for locator", details: { locator, text } });
45
- }
46
-
47
43
  await target.fill(text);
48
44
  }
49
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stubber/virtual-worker",
3
- "version": "1.0.6",
3
+ "version": "1.1.0",
4
4
  "description": "Template to easily create a node app and keep development standards",
5
5
  "main": "app.js",
6
6
  "directories": {