Selenium / Quiz

Node Selenium Field Kit: Windows, Actions, Scripts

New tabs and window handles, the actions() chain, executeAsyncScript's callback contract, file uploads, and screenshots, the JS bindings past page one.

Difficulty
Hard
Format
Quiz
Points
200
Estimate
12 min

// MISSION BRIEF

Your Mission

Past the login-form basics, real suites juggle popups, drag-and-drop, injected scripts, and evidence collection. The JS bindings cover all of it, with signatures that differ just enough from Java to burn the unwary.

Seven hard questions on the advanced surface of selenium-webdriver for Node. Speed bonus active.

// FIRST CONTACT

Battle teaser

Selenium 4's JS bindings can open a fresh tab and switch to it in one call:

  1. Aawait driver.switchTo().newWindow('tab'), after which driver commands target the new tab and the original handle should be saved beforehand for switching back
  2. BTabs are indistinguishable from windows and cannot be targeted
  3. Cawait driver.executeScript('window.open()') is the only mechanism
  4. Dawait driver.openTab(), which returns a new driver instance
Answers, scoring, hints, and the full battle stay sealed.

// SKILL TAGS

seleniumjavascriptactions-apiwindow-handlese2e-testing