--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/selenium-users/18a2b2ac-f3d0-437c-b13a-0ca017c3eca3n%40googlegroups.com.
The code is not able to click on the button when I navigate to the excel online page
To help troubleshoot your code for automating Excel Online with Selenium, here are some tips and suggestions based on your code snippet:
Review Element Locators: Ensure that all your locators are up-to-date and correctly correspond to elements on the page. For example, the Btn_excel locator is likely causing issues because it's incomplete (//*[@id="file"]/li[2]/div/div/ should have a complete path to the element or an alternative locator strategy like a unique ID or class).
Check Element Availability: Sometimes, elements can be hidden in iframes or require specific focus. You might need to switch to an iframe if the target elements are inside one. To check, inspect the page structure and use driver.switchTo().frame(frameElement); before locating elements within the iframe
Debugging with Browser Developer Tools: Test each locator individually in the browser’s console to ensure they match the intended elements.