
I am trying to login to Zoho using automation test in java (selenium) below is the code
WebDriver driver = new ChromeDriver();
/* Access the URL to write auto login test */
driver.get("https://www.zoho.com/");
driver.findElement(By.linkText("Sign in")).click();
driver.findElement(By.id("login_id")).sendKeys("email");
driver.findElement(By.xpath("//span[normalize-space()='Next']")).click();
driver.findElement(By.xpath("//input[@id='password']")).sendKeys("password");
driver.findElement(By.id("nextbtn")).click();
- above code successfully passes the test for Sign in and accepts the email id.
- Then the page gets redirected to another page and here password needs to be given.
- Above code gets stuck at password input. What needs to be done to pass through the password and getting into the Zoho Home Page.
Error Stack:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" org.openqa.selenium.ElementNotInteractableException: element not interactable
(Session info: chrome=115.0.5790.171)
Build info: version: '4.11.0', revision: '040bc5406b'
System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '19.0.2'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [72e70cf8cb751141dce9053c2c87e0bf, sendKeysToElement {id=3451A97A48F2087285C0D569311DB6CC_element_39, value=[Ljava.lang.CharSequence;@2015b2cd}]
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 115.0.5790.171, chrome: {chromedriverVersion: 115.0.5790.170 (cc0d30c2ca5..., userDataDir: C:\Users\VARSHA~1\AppData\L...}, goog:chromeOptions: {debuggerAddress: localhost:64501}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: windows, proxy: Proxy(), se:cdp: ws://localhost:64501/devtoo..., se:cdpVersion: 115.0.5790.171, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
Element: [[ChromeDriver: chrome on windows (72e70cf8cb751141dce9053c2c87e0bf)] -> xpath: //input[@id='password']]
Session ID: 72e70cf8cb751141dce9053c2c87e0bf
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:484)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:200)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:133)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:52)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:191)
at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:196)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:171)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:224)
at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:111)
at testcase.MyFirstTest.main(MyFirstTest.java:26)