multipleDropdowns.js 1.0 KB

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