Unit 2: Selenium IDE and WebDriver - Practice Quiz

CSE377 — Web Automation Testing 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is Selenium IDE primarily used for?

Introduction to Selenium IDE Easy
A. Recording and playing back browser tests
B. Managing and querying databases
C. Monitoring and configuring networks
D. Designing and styling web pages

2 How is Selenium IDE commonly installed?

Introduction to Selenium IDE Easy
A. As a browser extension
B. As a server service
C. As a database plugin
D. As a compiler package

3 Which Selenium IDE feature allows a saved test to be executed again?

Features of Selenium IDE Easy
A. Compilation
B. Deployment
C. Encryption
D. Playback

4 Which Selenium IDE feature helps control how quickly test steps are executed?

Features of Selenium IDE Easy
A. Network priority
B. Playback speed
C. Screen brightness
D. File compression

5 What does Selenium IDE store inside a test project?

Features of Selenium IDE Easy
A. Network routes and ports
B. Image layers and filters
C. Test cases and suites
D. Database tables and views

6 What should a tester do first to capture browser actions in Selenium IDE?

Creating a script by recording Easy
A. Export results
B. Delete commands
C. Pause playback
D. Start recording

7 What happens when a tester clicks a button while Selenium IDE is recording?

Creating a script by recording Easy
A. The browser history is cleared
B. The page source is compiled
C. A command is added to the test
D. A database record is created

8 After recording a Selenium IDE test, what can be used to check whether it works?

Creating a script by recording Easy
A. Rename the browser
B. Clear the cache
C. Restart the computer
D. Run the test

9 Which Selenium IDE command is commonly used to click a web element?

Introduction to Selenium IDE Commands Easy
A. select
B. open
C. type
D. click

10 Which Selenium IDE command enters text into an input field?

Introduction to Selenium IDE Commands Easy
A. close
B. click
C. refresh
D. type

11 Which Selenium IDE command opens a specified URL?

Introduction to Selenium IDE Commands Easy
A. open
B. select
C. store
D. verify

12 What is the purpose of a breakpoint in Selenium IDE?

Debugging in Selenium IDE using Breakpoint and Start Point Methods Easy
A. Begin recording at a selected page
B. Pause execution at a selected command
C. Remove errors from all commands
D. Save results at a selected location

13 What does a start point specify in Selenium IDE?

Debugging in Selenium IDE using Breakpoint and Start Point Methods Easy
A. The command where execution should begin
B. The page where results should appear
C. The command where recording should stop
D. The browser where tests should run

14 Which method is most useful for inspecting a test immediately before a particular command runs?

Debugging in Selenium IDE using Breakpoint and Start Point Methods Easy
A. Changing playback speed
B. Creating a test suite
C. Exporting the project
D. Setting a breakpoint

15 What does Selenium WebDriver control during browser automation?

Selenium Browser Automation using WebDriver Easy
A. A source compiler
B. A web browser
C. A database server
D. A network router

16 Which WebDriver method is commonly used to open a web page?

Selenium Browser Automation using WebDriver Easy
A. get()
B. findElement()
C. close()
D. quit()

17 Which WebDriver method is used to locate one element on a web page?

Selenium Browser Automation using WebDriver Easy
A. manage()
B. navigate()
C. findElement()
D. getTitle()

18 Which browser is automated through ChromeDriver?

Types of Browser Support for Selenium WebDriver Easy
A. Apple Safari
B. Microsoft Edge
C. Google Chrome
D. Mozilla Firefox

19 Which driver is commonly associated with Mozilla Firefox?

Types of Browser Support for Selenium WebDriver Easy
A. GeckoDriver
B. ChromeDriver
C. EdgeDriver
D. SafariDriver

20 Which Selenium WebDriver navigation command reloads the current page?

Browser Navigation Commands in Selenium Easy
A. navigate().refresh()
B. navigate().to()
C. navigate().back()
D. navigate().forward()

21 A tester needs to create a quick regression test for a web form without writing WebDriver code. Why is Selenium IDE suitable for this task?

Introduction to Selenium IDE Medium
A. It executes tests directly against the application's database
B. It records browser interactions and converts them into editable test steps
C. It generates production-ready unit tests for server-side components
D. It automatically repairs every locator when the application changes

22 A recorded Selenium IDE test passes when run alone but fails when run after another test because the browser remains on the wrong page. What is the best improvement?

Introduction to Selenium IDE Medium
A. Add a breakpoint to the final command of the test
B. Remove the base URL so each test inherits the previous page
C. Add an open command at the beginning of the test
D. Replace all click commands with clickAt commands

23 A login button has both an automatically generated CSS locator and an XPath locator. Which Selenium IDE feature helps the tester recover if the preferred locator stops matching?

Features of Selenium IDE Medium
A. Alternative locator support
B. Network packet modification
C. Server-side code coverage
D. Automatic database rollback

24 A team wants to reuse the same sequence of test steps in several Selenium IDE test cases. Which feature is most appropriate?

Features of Selenium IDE Medium
A. Record the sequence again in every test case to preserve independent playback history
B. Export each repeated step as a separate browser driver
C. Create a reusable test and invoke it with run
D. Place a breakpoint on every repeated command

25 While recording a purchase flow, Selenium IDE captures an accidental click on an advertisement. What should the tester do before replaying the script?

Creating a script by recording Medium
A. Delete the command corresponding to the accidental click
B. Install another browser driver and record the entire flow again
C. Convert the accidental click into an assertion command
D. Set the accidental click as the test's start point

26 A recorded test selects a product using an absolute XPath. After a layout change, the test fails even though the product is still present. What is the best correction?

Creating a script by recording Medium
A. Replace it with a stable ID, name, or relative CSS locator
B. Replace the XPath with the full text of the rendered HTML document
C. Set a breakpoint after the failed selection command
D. Increase playback speed so the XPath is evaluated earlier

27 During recording, a tester enters a username and password and submits the form. Which command sequence would most likely be produced?

Creating a script by recording Medium
A. type, type, click
B. assertTitle, goBack, executeScript, deleteAllCookies
C. store, verifyText, close
D. open, select, refresh

28 A test should report that a confirmation message is missing but continue executing the remaining commands. Which command type should be used?

Introduction to Selenium IDE Commands Medium
A. assert
B. verify
C. store
D. execute

29 A test must wait until an asynchronously loaded status message becomes visible before checking its text. Which approach is most reliable?

Introduction to Selenium IDE Commands Medium
A. Use store text before the request is submitted
B. Use pause with the shortest observed loading time
C. Use a wait for command targeting the message
D. Repeat the preceding click command until the message is rendered and then disable any extra clicks

30 A tester stores the text of an order number in a variable named orderId. How should that variable normally be referenced in a later Selenium IDE command?

Introduction to Selenium IDE Commands Medium
A. {orderId}
B. [orderId]
C. ${orderId}
D. $orderId

31 A test must stop immediately when the page title is incorrect because all later steps depend on that page. Which command is most appropriate?

Introduction to Selenium IDE Commands Medium
A. store title
B. assert title
C. verify title
D. echo title

32 A command that submits a form produces an unexpected result. Where should a breakpoint be placed to inspect the page state immediately before submission?

Debugging in Selenium IDE using Breakpoint and Start Point Methods Medium
A. On every command after the form submission has completed
B. On the form submission command
C. On the command after the result assertion
D. On the first command in the test

33 A tester sets a start point halfway through a checkout test, but playback fails because no item is in the cart. What is the most likely cause?

Debugging in Selenium IDE using Breakpoint and Start Point Methods Medium
A. The skipped commands created state required by the later steps
B. Breakpoints cannot be combined with recorded test cases
C. A start point automatically clears all element locators
D. Selenium IDE requires every start point to be placed on an assertion

34 A tester wants to repeatedly debug only the final validation section of a long test. Which setup is most appropriate?

Debugging in Selenium IDE using Breakpoint and Start Point Methods Medium
A. Place a breakpoint on the first command and rerun the complete test each time
B. Delete all setup commands and rely on Selenium IDE to recreate their effects automatically
C. Set the final validation command as both the base URL and the default timeout
D. Prepare the required browser state, then set a start point at the validation section

35 A WebDriver test can find a button, but clicking it immediately after page load sometimes fails because an overlay is still visible. What is the best solution?

Selenium Browser Automation using WebDriver Medium
A. Add a long fixed sleep before each interaction in the complete test suite
B. Call navigate().refresh() before every click
C. Catch every exception and mark the test as passed
D. Use an explicit wait for the button to become clickable

36 A test creates a new WebDriver instance for each test case. Which cleanup action best prevents browser processes from remaining after execution?

Selenium Browser Automation using WebDriver Medium
A. Call driver.getTitle() in teardown
B. Call driver.close() only before the test begins
C. Call driver.quit() in teardown
D. Call driver.navigate().back() in teardown

37 A page contains multiple elements with the class result, and the test must examine all of them. Which WebDriver method is appropriate?

Selenium Browser Automation using WebDriver Medium
A. findElement
B. getWindowHandle
C. switchTo().alert()
D. findElements

38 A test suite must run on both Chrome and Firefox. What change is normally required when switching between these local browsers?

Types of Browser Support for Selenium WebDriver Medium
A. Instantiate the browser-specific WebDriver implementation
B. Convert all test methods into browser extension scripts
C. Replace WebDriver commands with direct operating-system mouse and keyboard events
D. Rewrite every CSS selector as an absolute XPath

39 Chrome tests start successfully, but Edge tests fail before opening a browser because the driver and browser are incompatible. What should be checked first?

Types of Browser Support for Selenium WebDriver Medium
A. The ordering of CSS properties on the tested pages
B. The compatibility of EdgeDriver with the installed Edge version
C. The availability of a Selenium IDE start point in every WebDriver test
D. The number of assertions used in each Edge test

40 After opening a product page, a WebDriver test navigates to the cart and then needs to return to the product page using browser history. Which command should it use?

Browser Navigation Commands in Selenium Medium
A. driver.navigate().back()
B. driver.manage().deleteAllCookies()
C. driver.navigate().refresh()
D. driver.navigate().forward()

41 A tester records a login flow in Selenium IDE and later runs it against a staging environment whose login form uses dynamically generated element IDs. Which design decision best preserves the test's maintainability?

Introduction to Selenium IDE Hard
A. Record the test again after every deployment
B. Replace all locators with absolute XPath expressions
C. Use stable attributes and relative locator strategies
D. Increase the command timeout for every step

42 A Selenium IDE test passes when executed manually but fails in continuous execution because a page transition sometimes takes longer than expected. Which interpretation is most accurate?

Introduction to Selenium IDE Hard
A. The recorder cannot test asynchronous applications
B. The test depends on timing rather than state
C. The browser is incompatible with Selenium IDE
D. The locator must always be converted to XPath

43 A team wants to reuse the same Selenium IDE login flow across tests while supplying different user credentials. Which feature combination is most appropriate?

Features of Selenium IDE Hard
A. Stored variables and reusable test cases
B. Breakpoints and absolute XPath locators
C. Screenshots and browser history commands
D. Playback speed and browser launch settings

44 A test must verify that a failed payment displays an error message without stopping execution of later cleanup steps. Which Selenium IDE capability is most relevant?

Features of Selenium IDE Hard
A. Command recording without verification steps
B. Assertions with controlled verification flow
C. Browser resizing through playback settings
D. Locator recording with absolute paths

45 During recording, a tester selects a product row whose position changes after sorting. The generated locator identifies the third row by position. What is the strongest correction?

Creating a script by recording Hard
A. Record a click on the table header before selecting
B. Add a second positional locator as a fallback
C. Use a locator based on the product's stable identity
D. Keep the positional locator and add a longer timeout

46 A recorded script enters text into a search field, clicks Search, and immediately asserts a result. The application sends the request asynchronously. What should be added to make the script robust?

Creating a script by recording Hard
A. A second click on the Search button
B. A new browser session after submitting
C. A wait for the result state or response condition
D. A fixed delay before every recorded command

47 What is the key behavioral difference between an assertion command and a verification command in Selenium IDE?

Introduction to Selenium IDE Commands Hard
A. Assertions require XPath; verifications require CSS selectors
B. Assertions stop execution on failure; verifications generally continue
C. Assertions run only during recording; verifications run during playback
D. Assertions locate elements; verifications change browser windows

48 A test must click a control only when it is present, then continue regardless of whether it was found. Which command pattern best matches this requirement?

Introduction to Selenium IDE Commands Hard
A. Use an optional conditional command with a presence check
B. Use a mandatory click followed by an assertion
C. Use a select command followed by a visibility assertion
D. Use a submit command followed by a page refresh

49 A Selenium IDE test stores a generated order number and must use it in a later URL and assertion. Which approach correctly models the data dependency?

Introduction to Selenium IDE Commands Hard
A. Use the browser title as an implicit order variable
B. Hard-code the order number in both later commands
C. Capture the value into a variable and reference it later
D. Replay the recording until the same order number appears

50 A failure occurs after ten successful commands, but rerunning the entire test requires an expensive data-import setup. Which debugging strategy is most efficient?

Debugging in Selenium IDE using Breakpoint and Start Point Methods Hard
A. Place a breakpoint at the first command and step forward
B. Place a start point immediately before the failing workflow
C. Increase every timeout before attempting another run
D. Delete the setup commands from the test permanently

51 A test intermittently clicks the wrong control after a modal appears. Where does a breakpoint provide the most useful diagnostic value?

Debugging in Selenium IDE using Breakpoint and Start Point Methods Hard
A. Immediately before the suspicious click, to inspect current state
B. After the final assertion, to inspect the completed test
C. Before the modal-triggering action, to inspect the initial page
D. At the browser launch command, to inspect default settings

52 A tester places a start point on a command that depends on authentication established earlier in the test. The command then fails when executed alone. What is the most likely cause?

Debugging in Selenium IDE using Breakpoint and Start Point Methods Hard
A. The skipped setup normally establishes required session state
B. The start point disables all Selenium IDE assertions
C. The browser cannot execute commands after a start point
D. The locator becomes invalid whenever playback is resumed

53 A WebDriver test intermittently fails because a button is present in the DOM but covered by an animation overlay. Which synchronization condition best addresses the failure?

Selenium Browser Automation using WebDriver Hard
A. Wait until the browser title remains unchanged
B. Wait only until the button exists in the DOM
C. Wait until the page source stops changing
D. Wait until the button is visible and interactable

54 A WebDriver script stores a reference to an element, triggers a framework re-render, and then uses that reference. A stale element exception occurs. What is the most reliable remedy?

Selenium Browser Automation using WebDriver Hard
A. Locate the element again after the re-render completes
B. Refresh the browser after every element interaction
C. Increase the implicit wait for the stored reference
D. Convert the element reference into a browser title

55 A test passes in Chrome and Firefox but fails only in a browser where a feature uses a nonstandard implementation. What conclusion is most defensible?

Types of Browser Support for Selenium WebDriver Hard
A. The test must use Internet Explorer for comparison
B. The failure proves that the locator is invalid
C. WebDriver guarantees identical behavior across all browsers
D. Browser-specific behavior requires compatibility validation

56 A team needs parallel tests across Chrome, Firefox, and Edge in a remote grid. Which architecture best supports this requirement?

Types of Browser Support for Selenium WebDriver Hard
A. A single driver configured only for the default browser
B. One browser session with multiple active tabs
C. One local driver instance reused by all test threads
D. Independent sessions configured with browser capabilities

57 A WebDriver test uses a browser capability that was removed in a newer browser version. What is the most appropriate corrective action?

Types of Browser Support for Selenium WebDriver Hard
A. Replace the capability with a supported option or remove it
B. Add the same obsolete capability to every test
C. Disable all browser security features permanently
D. Switch every locator from CSS to absolute XPath

58 A test opens a detail page, changes a filter, uses browser back, and expects the previous filtered list state. Which distinction is most important?

Browser Navigation Commands in Selenium Hard
A. Back clears cookies but preserves local storage
B. Back is equivalent to opening a new driver session
C. Back always reloads the original URL without state
D. Back may restore history state depending on browser behavior

59 A script navigates to a URL, calls refresh, and then asserts that a newly generated server-side value changed. Why might the assertion be unreliable?

Browser Navigation Commands in Selenium Hard
A. Navigation commands cannot be followed by assertions
B. Refresh never sends another request to the server
C. Caching or application logic may preserve the previous value
D. Refresh always opens the URL in a separate tab

60 A test uses a direct URL navigation to reach a protected page and then verifies that unauthenticated users are redirected. What should the test validate besides the final visible page?

Browser Navigation Commands in Selenium Hard
A. Only the number of elements in the page source
B. The final URL, redirect chain outcome, and access message
C. Only the browser window dimensions
D. The browser history length and playback speed