Skip to content

Instantly share code, notes, and snippets.

@erajanraja24
Last active August 23, 2017 12:48
Show Gist options
  • Save erajanraja24/ea2bfc212dbf96af49ebbb9052062947 to your computer and use it in GitHub Desktop.
Save erajanraja24/ea2bfc212dbf96af49ebbb9052062947 to your computer and use it in GitHub Desktop.
Nestia
public class Nestia extends Wrapper{
public static void NestiaScript() throws IOException
{
initialSetUp();
login();
execute();
}
public static void login() throws IOException
{
clickByLinkText("Log In");
sleep(1500);
enterTextInTextbox("id","t_login_email",ExcelRead.username());
enterTextInTextbox("id","t_login_password",ExcelRead.password());
click("id","b_em_login");
sleep(2000);
}
public static void initialSetUp()
{
launchBrowser("Chrome");
navigateTo("https://www.nestia.com/");
maximizeTheBrowserWindow();
sleep(1500);
//
}
public static void execute() throws IOException
{
//Click the List your property
String parentWindow=driver.getWindowHandle();
clickByLinkText("List Your Property");
sleep(2500);
switchToChildWindow(parentWindow);
sleep(1500);
clickByLinkText("I'd like to Rent out");
sleep(2500);
click("xpath","//div[@class='btn-group']/label/input[@name='property_type' and @value='1']");
enterTextInTextbox("id","name",ExcelRead.getvalue(12, 1, "Sheet1", "Upload_Sequence.xlsx"));
enterTextInTextbox("id","block",ExcelRead.getvalue(1, 1, "Sheet1", "Upload_Sequence.xlsx"));
enterTextInTextbox("id","street",ExcelRead.getvalue(2, 1, "Sheet1", "Upload_Sequence.xlsx"));
enterTextInTextbox("id","street",ExcelRead.getvalue(3, 1, "Sheet1", "Upload_Sequence.xlsx"));
click("xpath","//div[@class='btn-group']/label/input[@name='bedroom' and @value='Studio']");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment