Selenium Webdriver Issues Share Screen Issue From Desktop Application

78 views
Skip to first unread message

Kashif Zaki

unread,
Oct 10, 2023, 8:24:53 AM10/10/23
to Selenium Users
Hello,
i am using selenium web driver in my desktop application that is combination on Team Meet and Zoom for creating and managing meetings from this single application.
so i have use selenium webdriver for performing action on zoom app while sharing screen form it gave me error that element is not founds even it's opening zoom sharing screen window and shows all the available windows but when want to any screen it produce error that element is not found.
as my application already build earlier so in app i am using selenium webdriver  version is "selenium-webdriver": "^2.44.0"
this is my node application.
please help me in this.

Here is the code of driver 
driver = await new Builder().usingServer(WINIUM_DRIVER_URL)
          .withCapabilities({
            'app': path.join(vendorsPath, 'rundll32.exe'),
          })
          .forBrowser('windows')
          .build();


ipcMain.on('zoom-entire_screen_2_share', async (event, args)=>{
      win.setAlwaysOnTop(false, 'floating');
      await fireSendkeys(args.shortcut);
      try {
        /* await driver.findElement(By.name('Basic')).click();
        await driver.findElement(By.name('Second screen, share your second screen')).click(); */
        const waitingTRime = await driver.wait(
          until.elementLocated(By.name('Share Screen 2')), 10000);
        console.log('waitingTRime Screen 2',waitingTRime);
        await driver.findElement(By.name('Share Screen 2')).click();
        win.setAlwaysOnTop(true, 'floating');
      } catch (e) {
        console.error(e);
        win.setAlwaysOnTop(true, 'floating');
        win.webContents.send('open-button', { button: 'share' });
        throwError({errMsg: 'We are not able to detect this element, Please try again.'});
      }
      hideLoader();
    });
Reply all
Reply to author
Forward
0 new messages