Created
July 31, 2017 12:36
-
-
Save erajanraja24/626831fc054a8ad90c74ad55236a487b to your computer and use it in GitHub Desktop.
Sgroom Automation Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.test.on; | |
import java.io.IOException; | |
import come.ExcelReadWrite.ExcelRead; | |
public class Sgroom extends Wrapper { | |
public static void sgroomScript() throws IOException | |
{ | |
launchBrowser("Chrome"); | |
navigateTo("https://www.sgroom.com/"); | |
maximizeTheBrowserWindow(); | |
sleep(2000); | |
click("id","login_link"); | |
enterTextInTextbox("id","login_email",ExcelRead.username()); | |
enterTextInTextbox("id","login_password",ExcelRead.password()); | |
click("name","submit"); | |
sleep(3000); | |
click("id","new_post_btn"); | |
sleep(2000); | |
click("id","unit"); | |
click("id","month"); | |
enterTextInTextbox("id","ad-rental",ExcelRead.getvalue(6, 1, "Sheet1", "Upload_Sequence.xlsx")); | |
enterTextInTextbox("id","ad-phone","92223226"); | |
enterTextInTextbox("id","ad-email",ExcelRead.username()); | |
enterTextInTextbox("id","ad-title",ExcelRead.getvalue(12, 1, "Sheet1", "Upload_Sequence.xlsx")); | |
enterTextInTextbox("id","ad-description",ExcelRead.getvalue(11, 1, "Sheet1", "Upload_Sequence.xlsx")); | |
//pageDown(); | |
//sleep(2000); | |
uploadFile("xpath","//*[@id='img-block']",ExcelRead.getvalue(17, 1, "Sheet1", "Upload_Sequence.xlsx")); | |
//sleep(2000); | |
enterTextInTextbox("id","address_input",ExcelRead.getvalue(1, 1, "Sheet1", "Upload_Sequence.xlsx")+" "+ExcelRead.getvalue(2, 1, "Sheet1", "Upload_Sequence.xlsx")); | |
sleep(2000); | |
pressDown(); | |
pressEnter(); | |
sleep(2000); | |
click("id","postbutton"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment