Automate clicking a button using JavaScript in Selenium
Preconditions (2)
Step 1: Open the browser and navigate to the web page URL 'https://example.com/form'
Step 2: Locate the button element with id 'submit-btn'
Step 3: Use JavaScript to click the button instead of the standard click method
Step 4: Verify that clicking the button triggers the expected action, such as navigation or a message
✅ Expected Result: The button is clicked successfully using JavaScript, and the expected action occurs (e.g., page navigates to 'https://example.com/success')