Created
April 20, 2011 17:13
Page frontend for insert stock webpage.
This file contains 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
public class InsertStockPage { | |
private static final String STOCK_FORM_ID = "name"; | |
private static final String THRESHOLD_FORM_ID = "threshold"; | |
private static final String TRADEAT_FORM_ID = "tradeAt"; | |
private static final String SUBMIT_FORM_ID = "submit"; | |
private String stockUrl; | |
@Autowired | |
private PageUtils pageUtils; | |
public void open() { | |
pageUtils.open(this.stockUrl); | |
} | |
public void fillForm(String stockName, String threshold, String tradeAt) { | |
pageUtils.fillFormField(STOCK_FORM_ID, stockName); | |
pageUtils.fillFormField(THRESHOLD_FORM_ID, threshold); | |
pageUtils.fillFormField(TRADEAT_FORM_ID, tradeAt); | |
} | |
public void submitForm() { | |
pageUtils.submitForm(SUBMIT_FORM_ID); | |
} | |
public void setStockUrl(String url) { | |
this.stockUrl = url; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment