Verify button click using XPath with text()
Preconditions (1)
Step 1: Open the web page at 'https://example.com/sample-form'
Step 2: Locate the button element using XPath with text() matching 'Submit'
Step 3: Click the 'Submit' button
Step 4: Verify that the page URL changes to 'https://example.com/form-submitted'
✅ Expected Result: The 'Submit' button is found and clicked successfully, and the page navigates to the expected URL.