Module18- Registration on Quikr App | Selenium Forum
M
Posted on 22/07/2016
Hi,
I wrote a code to register on Quikr application. Its working fine means after enter all mandatory information my code click on "CREATE ACCOUNT" button. Problem is that after click on "CREATE ACCOUNT" button application navigate me to next page but on that page a pop up for "OTP" is present in which i have to enter the OTP number which is come on my Phone. so How can i handle it.

How i put the OTP into that page and click on "Verify" button..

Plz suggest..

[b:15oj67q9]SCREEN SHOT ATTACHED[/b:15oj67q9]


Code:-

import java.util.concurrent.TimeUnit;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.BeforeTest;

public class Quikr {

WebDriver driver=null;
@Test
public void Register()
{

WebDriver driver = new FirefoxDriver();
driver.get("http://quikr.com");
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);

driver.findElement(By.xpath("//*[@id='responsiveHeader']/div[1]/div[1]/ul/li[4]/a/span[2]")).click();
driver.findElement(By.xpath("//*[@id='fullname']")).sendKeys("sumit");
driver.findElement(By.xpath("//*[@id='phone']")).sendKeys("9560249399");
driver.findElement(By.xpath("//*[@id='phone']")).sendKeys("sambhasin4@gmail.com");
driver.findElement(By.xpath("//*[@id='passWord']")).sendKeys("310489");
driver.findElement(By.xpath("//*[@id='confirmPassword']")).sendKeys("310489");
driver.findElement(By.xpath("//*[@id='fromRegisterPopUP']/div[6]/label")).click();
driver.findElement(By.xpath("//*[@id='fromRegisterPopUP']/div[7]/button")).click();
}
}

M
Replied on 22/07/2016

OTP cannot be handled.


M
Replied on 22/07/2016

So how can i solve that. How can i write the code to registerr in Quikr?? Any alternate for it?


M
Replied on 22/07/2016

can't do it.

Captcha and OTP are used so that nobody can use the bots.