Webdriverio 8: Unable to perform CTRL + multiple clicks
P粉763748806
P粉763748806 2024-04-05 09:57:11
0
1
1462

I have several columns and I need to press the ctrl button and then select multiple columns. I tried many ways but ctrl doesn't execute.

await browser.keys(Key.Control);
    await campaignNameColumn.click();
    await browser.keys(Key.Control);
    await monthColumn.click();

Also tried perfromaactions, but no success yet. I'm using WDIO - 8 and node 16

P粉763748806
P粉763748806

reply all(1)
P粉386318086

Finally this worked for me.

await browser.performActions([
        {
          type: "key",
          id: "keyboard",
          actions: [{ type: "keyDown", value: "" }],
        },
      ]);
    await campaignNameColumn.click();
    await monthColumn.click();
    await browser.performActions([
      {
        type: "key",
        id: "keyboard",
        actions: [{ type: "keyUp", value: "" }],
      },
    ]);
  });
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!