Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package basics;
- import org.openqa.selenium.WebDriver;
- public class Forms {
- static WebDriver myDriver;//don't actually need this anymore, doesn't hurt though.
- static String page = "Forms";//Making this so we can say what page on the page, instead of putting it as a parameter
- public Forms(){
- }
- public static void run(WebDriver driver) throws InterruptedException{
- //System.out.println("Running test for Forms");
- driver.get("http://www.disasterassistance.gov/get-assistance/forms");//There wasn't any direction to the forms page
- //Header.run(driver, page);
- assistanceForms(driver,page);
- driver.get("http://www.disasterassistance.gov/");//Reset it to the homepage for each test for consistency
- }
- public static void assistanceForms(WebDriver driver, String page) throws InterruptedException{
- String section = "Forms";
- String[] instructionsField = {
- "xpath",
- "//*[@id=\"block-views-static-view-pages-block-6\"]/div/div/div",
- "Form Instruction Field"};
- String[] buttonApplyOnline = {
- "xpath",
- "//*[@id=\"block-views-static-view-pages-block-6\"]/div/div/div/ul/li/div/div/div/div[1]/p/b/a",
- "Apply Online Button"};
- String[] buttonDownloadPDF = {
- "xpath",
- "//*[@id=\"block-views-static-view-pages-block-6\"]/div/div/div/ul/li/div/div/div/div[2]/p[1]/b/a",
- "Download Form Button"};
- String[][] myArray = {
- instructionsField,buttonApplyOnline,buttonDownloadPDF};
- //System.out.println("---Running test for forms---");//Had this before I changed the output. Don't actually need it
- //but no harm done
- RunTest.runTest(myArray,driver,page, section);//added page to this, Look at homepage and I have it. So we can add //what page to the report.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement