multipleDropdowns.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. import { expect } from 'chai'
  2. import { By, until } from 'selenium-webdriver'
  3. import fs from 'node:fs'
  4. describe('config: multipleDropdowns', function () {
  5. before(async function () {
  6. await runner.start('multipleDropdowns')
  7. })
  8. after(async () => {
  9. await runner.stop()
  10. })
  11. it('Multiple dropdowns are possible', async function() {
  12. await webdriver.get('http://localhost:1337')
  13. await webdriver.manage().setTimeouts({ implicit: 2000 });
  14. const button = await webdriver.findElement(By.id('actionButton_bdc45101bbd12c1397557790d9f3e059')).findElement(By.tagName('button'));
  15. expect(button).to.not.be.undefined;
  16. await button.click()
  17. const dialog = await webdriver.findElement(By.id('argument-popup'));
  18. await webdriver.wait(until.elementIsVisible(dialog), 2000)
  19. const selects = await dialog.findElements(By.tagName('select'))
  20. expect(selects).to.have.length(2)
  21. expect(await selects[0].findElements(By.tagName('option'))).to.have.length(2)
  22. expect(await selects[1].findElements(By.tagName('option'))).to.have.length(3)
  23. })
  24. })