Test Code
@Test (priority=6)
public void Testcase6() throws InterruptedException {
driver.get("https://test.ninjafocus.com/");
driver.manage().deleteAllCookies();
Thread.sleep(1000);
driver.manage().window().maximize();
WebDriverWait wait = new WebDriverWait(driver,30);
WebElement element= wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//a[contains(@href, 'https://test.ninjafocus.com/login/')]")));
((JavascriptExecutor)driver).executeScript("arguments[0].click();", element);
driver.findElement(By.xpath("//a[contains(text(),'Sign Up here')]")).click();
Thread.sleep(1000);
driver.findElement(By.xpath("//input[@id='txtEmail']")).sendKeys("[email protected]");
Thread.sleep(1000);
driver.findElement(By.xpath("//input[@id='txtPassword']")).sendKeys("Gate6@123");
Thread.sleep(1000);
driver.findElement(By.xpath("//input[@id='influencerCode']")).sendKeys("XSW60X");
Thread.sleep(1000);
driver.findElement(By.xpath("//input[@name='signUpSubmit']")).click();
Thread.sleep(10000);
driver.get("https://accounts.google.com/signin/v2/identifier?continue=https%3A%2F%2Fmail.google.com%2Fmail%2F&service=mail&sacu=1&rip=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin");
Thread.sleep(2000);
driver.findElement(By.xpath("//input[@id='identifierId']")).sendKeys("[email protected]");
Thread.sleep(2000);
driver.findElement(By.xpath("//div[@id='identifierNext']/div/button/div[2]")).click();
Thread.sleep(3000);
driver.get("https://accounts.google.com/signin/v2/challenge/pwd?");
Thread.sleep(10000);
WebElement element1 = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//input[@type='password']")));
((JavascriptExecutor)driver).executeScript("arguments[0].click();", element1);
driver.findElement(By.xpath("//input[@type='password']")).sendKeys(""); /for now removed this you can consider as use.
Thread.sleep(5000);
driver.findElement(By.xpath("//div[@id='passwordNext']/div/button/div[2]")).click();
Thread.sleep(1000);
}
@AfterTest
public void quit() {
//driver.close();
}
}
I'm getting the following error:
(Session info: chrome=88.0.4324.190)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'DESKTOP-P5H3V2F', ip: '10.1.0.154', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '15.0.1'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 88.0.4324.190, chrome: {chromedriverVersion: 88.0.4324.96 (68dba2d8a0b14..., userDataDir: C:\Users\Gatesix\AppData\Lo...}, goog:chromeOptions: {debuggerAddress: localhost:56315}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
Session ID: 65ca95e47d2ddad8f18f78ba6806833c