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. Managing and querying databases
B. Monitoring and configuring networks
C. Designing and styling web pages
D. Recording and playing back browser tests

2 How is Selenium IDE commonly installed?

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

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

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

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

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

5 What does Selenium IDE store inside a test project?

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

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

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

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

Creating a script by recording Easy
A. A command is added to the test
B. The browser history is cleared
C. The page source is compiled
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. Run the test
C. Clear the cache
D. Restart the computer

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

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

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

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

11 Which Selenium IDE command opens a specified URL?

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

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

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

13 What does a start point specify in Selenium IDE?

Debugging in Selenium IDE using Breakpoint and Start Point Methods Easy
A. The page where results should appear
B. The command where execution should begin
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. Setting a breakpoint
B. Changing playback speed
C. Creating a test suite
D. Exporting the project

15 What does Selenium WebDriver control during browser automation?

Selenium Browser Automation using WebDriver Easy
A. A web browser
B. A database server
C. A source compiler
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. close()
C. quit()
D. findElement()

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

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

18 Which browser is automated through ChromeDriver?

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

19 Which driver is commonly associated with Mozilla Firefox?

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

20 Which Selenium WebDriver navigation command reloads the current page?

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

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 records browser interactions and converts them into editable test steps
B. It automatically repairs every locator when the application changes
C. It executes tests directly against the application's database
D. It generates production-ready unit tests for server-side components

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 an open command at the beginning of the test
B. Add a breakpoint to the final command of the test
C. Replace all click commands with clickAt commands
D. Remove the base URL so each test inherits the previous page

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. Automatic database rollback
B. Server-side code coverage
C. Network packet modification
D. Alternative locator support

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. Export each repeated step as a separate browser driver
B. Create a reusable test and invoke it with run
C. Place a breakpoint on every repeated command
D. Record the sequence again in every test case to preserve independent playback history

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. Set the accidental click as the test's start point
B. Install another browser driver and record the entire flow again
C. Delete the command corresponding to the accidental click
D. Convert the accidental click into an assertion command

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. Set a breakpoint after the failed selection command
C. Replace the XPath with the full text of the rendered HTML document
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. open, select, refresh
B. assertTitle, goBack, executeScript, deleteAllCookies
C. store, verifyText, close
D. type, type, click

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. verify
B. execute
C. assert
D. store

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. Repeat the preceding click command until the message is rendered and then disable any extra clicks
B. Use pause with the shortest observed loading time
C. Use store text before the request is submitted
D. Use a wait for command targeting the message

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. verify title
B. echo title
C. store title
D. assert 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 the command after the result assertion
B. On the form submission command
C. On the first command in the test
D. On every command after the form submission has completed

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. Selenium IDE requires every start point to be placed on an assertion
B. Breakpoints cannot be combined with recorded test cases
C. A start point automatically clears all element locators
D. The skipped commands created state required by the later steps

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. Delete all setup commands and rely on Selenium IDE to recreate their effects automatically
B. Prepare the required browser state, then set a start point at the validation section
C. Place a breakpoint on the first command and rerun the complete test each time
D. Set the final validation command as both the base URL and the default timeout

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. Catch every exception and mark the test as passed
B. Use an explicit wait for the button to become clickable
C. Call navigate().refresh() before every click
D. Add a long fixed sleep before each interaction in the complete test suite

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.quit() in teardown
B. Call driver.getTitle() in teardown
C. Call driver.close() only before the test begins
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. getWindowHandle
B. switchTo().alert()
C. findElements
D. findElement

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. Convert all test methods into browser extension scripts
B. Rewrite every CSS selector as an absolute XPath
C. Instantiate the browser-specific WebDriver implementation
D. Replace WebDriver commands with direct operating-system mouse and keyboard events

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 number of assertions used in each Edge test
B. The ordering of CSS properties on the tested pages
C. The compatibility of EdgeDriver with the installed Edge version
D. The availability of a Selenium IDE start point in every WebDriver 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.navigate().refresh()
C. driver.navigate().forward()
D. driver.manage().deleteAllCookies()

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. Use stable attributes and relative locator strategies
B. Replace all locators with absolute XPath expressions
C. Record the test again after every deployment
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. Assertions with controlled verification flow
B. Locator recording with absolute paths
C. Command recording without verification steps
D. Browser resizing through playback settings

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. Keep the positional locator and add a longer timeout
C. Add a second positional locator as a fallback
D. Use a locator based on the product's stable identity

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 new browser session after submitting
B. A second click on the Search button
C. A fixed delay before every recorded command
D. A wait for the result state or response condition

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 run only during recording; verifications run during playback
B. Assertions stop execution on failure; verifications generally continue
C. Assertions locate elements; verifications change browser windows
D. Assertions require XPath; verifications require CSS selectors

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 a select command followed by a visibility assertion
B. Use a mandatory click followed by an assertion
C. Use an optional conditional command with a presence check
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. Replay the recording until the same order number appears
B. Use the browser title as an implicit order variable
C. Hard-code the order number in both later commands
D. Capture the value into a variable and reference it later

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 start point immediately before the failing workflow
B. Delete the setup commands from the test permanently
C. Increase every timeout before attempting another run
D. Place a breakpoint at the first command and step forward

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. After the final assertion, to inspect the completed test
B. At the browser launch command, to inspect default settings
C. Before the modal-triggering action, to inspect the initial page
D. Immediately before the suspicious click, to inspect current state

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 browser cannot execute commands after a start point
B. The skipped setup normally establishes required session state
C. The locator becomes invalid whenever playback is resumed
D. The start point disables all Selenium IDE assertions

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 only until the button exists in the DOM
B. Wait until the browser title remains unchanged
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. Increase the implicit wait for the stored reference
B. Convert the element reference into a browser title
C. Locate the element again after the re-render completes
D. Refresh the browser after every element interaction

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 failure proves that the locator is invalid
B. Browser-specific behavior requires compatibility validation
C. The test must use Internet Explorer for comparison
D. WebDriver guarantees identical behavior across all browsers

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 local driver instance reused by all test threads
C. Independent sessions configured with browser capabilities
D. One browser session with multiple active tabs

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. Disable all browser security features permanently
B. Replace the capability with a supported option or remove it
C. Add the same obsolete capability to every test
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 is equivalent to opening a new driver session
B. Back may restore history state depending on browser behavior
C. Back always reloads the original URL without state
D. Back clears cookies but preserves local storage

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. Refresh never sends another request to the server
B. Navigation commands cannot be followed by assertions
C. Refresh always opens the URL in a separate tab
D. Caching or application logic may preserve the previous value

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 browser window dimensions
B. The final URL, redirect chain outcome, and access message
C. Only the number of elements in the page source
D. The browser history length and playback speed