();
+ prefs.put("download.default_directory", path);
+
+ capabilities = DesiredCapabilities.chrome();
+
+ capabilities.setCapability("platform", "Windows 7");
+ capabilities.setCapability("version", "45.0");
+
+ ChromeOptions options = new ChromeOptions();
+ options.setExperimentalOption("prefs", prefs);
+ capabilities.setCapability(ChromeOptions.CAPABILITY, options);
+ driver = new RemoteWebDriver(
+ seleniumHub,
+ capabilities
+ );
+
+ //JavascriptExecutor je = (JavascriptExecutor)driver;
+
+ //je.executeScript("window.resizeTo(1024, 1024)");
+
+// driver.manage().window().setPosition(new Point(0, 0));
+//// driver.manage().window().setSize(new Dimension(1024, 768));
+// driver.manage().window().setSize(new Dimension(1024, 1024));
+//// driver.manage().window().setSize(new Dimension(1500, 800));
+// Dimension d = new Dimension(1500, 800);
+// driver.manage().window().setSize(d);
+ driver.manage().window().setPosition(new Point(0, 0));
+ driver.manage().window().setSize(new Dimension(1500, 800));
+// driver.manage().window().maximize();
+
+ /*
+ try {
+ driver = new RemoteWebDriver(
+ new URL("http://127.0.0.1:9515"), // use of chromedriver without Selenium GRID
+ capabilities
+ );
+ } catch (MalformedURLException e) {
+ return null; // not going to happen
+ }
+ */
+
+ System.out.format("Created REMOTE_CHROME browser, windows size: %s\n", driver.manage().window().getSize());
+ break;
+ //return driver;
+ case REMOTE_IE:
+ seleniumHub = CucumberContext.getSeleniumHub();
+
+ assertNotNull(String.format("Property [%s] is not defined!", CucumberContext.SELENIUM_HUB), seleniumHub);
+
+ capabilities = DesiredCapabilities.internetExplorer();
+
+ // The following is using the chromedriver directly without the selenium server.
+ driver = new RemoteWebDriver(
+ seleniumHub,
+ capabilities
+ );
+
+ System.out.format("Created REMOTE_CHROME browser, windows size: %s\n", driver.manage().window().getSize());
+ //return driver;
+ case CHROME:
+ driver = createChromeDriver();
+ System.out.println("Created CHROME browser driver.");
+ break;
+ case IE:
+ driver = createInternetExplorerDriver();
+ System.out.println("Created IE browser driver.");
+ break;
+ case HTML_UNIT:
+ driver = createHtmlUnitDriver();
+ System.out.println("Created HTML_UNIT browser driver.");
+ break;
+ case FIREFOX:
+ default:
+ profile = new FirefoxProfile();
+ profile.setPreference("browser.download.folderList", 2);
+ profile.setPreference("browser.download.dir", path);
+
+ profile.setPreference("browser.download.alertOnEXEOpen", false);
+ profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "text/html;" +
+ "text/xml; application/xml; " +
+ "application/excel; application/vnd.ms-excel; application/x-excel; application/x-msexcel;" +
+ "application/pdf;" +
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
+ profile.setPreference("browser.download.manager.showWhenStarting", false);
+ profile.setPreference("browser.download.manager.focusWhenStarting", false);
+ profile.setPreference("browser.helperApps.alwaysAsk.force", false);
+ profile.setPreference("browser.download.manager.alertOnEXEOpen", false);
+ profile.setPreference("browser.download.manager.closeWhenDone", false);
+ profile.setPreference("browser.download.manager.showAlertOnComplete", false);
+ profile.setPreference("browser.download.manager.useWindow", false);
+ profile.setPreference("browser.download.manager.showWhenStarting", false);
+ profile.setPreference("services.sync.prefs.sync.browser.download.manager.showWhenStarting", false);
+
+ driver = createFirefoxDriver(profile);
+ System.out.println("Created FIREFOX browser driver.");
+ driver.manage().window().setPosition(new Point(0, 0));
+ driver.manage().window().setSize(new Dimension(1500, 800));
+ driver.manage().window().maximize();
+ break;
+ }
+
+ addAllBrowserSetup(driver);
+
+ return driver;
+ }
+
+ /**
+ * Create a selenium WebDriver that is appropriate for use with the specified
+ * type of browser. The JVM property 'browser' may be used to specify the
+ * desired browser type with a default of 'firefox'. Supported browser types
+ * include: [firefox,chrome,ie].
+ *
+ * Example of specifying browser type 'ie':
+ *
+ * -Dbrowser=ie
+ *
+ * @return WebDriver
+ */
+ public static WebDriver createBrowser() {
+
+ BrowserType bt = CucumberContext.getBrowserType();
+
+// assertNotNull("Required property 'iwms.browser' not defined!", bt);
+
+ return createBrowser(bt);
+ }
+}
+ /*
+ @Before
+ public static void setUp(Scenario scenario) {
+ //this.Scenario = scenario;
+ }
+
+ @After("@browser")
+ public void after(Scenario scenario) {
+ if (scenario.isFailed()) {
+ final byte[] screenshot = ((TakesScreenshot) driver)
+ .getScreenshotAs(OutputType.BYTES);
+ scenario.embed(screenshot, "//target//image/png"); //stick it in the report
+
+
+ }
+ driver.close();
+ }
+
+ } */
+
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/browsers/BrowserType.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/browsers/BrowserType.java
new file mode 100755
index 000000000..9dae68e80
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/browsers/BrowserType.java
@@ -0,0 +1,31 @@
+package com.rl.qa.browsers;
+
+import static com.google.common.base.Strings.isNullOrEmpty;
+
+/**
+ * Types of support web browsers.
+ */
+public enum BrowserType {
+ XVFB_FIREFOX,
+ REMOTE_FIREFOX,
+ REMOTE_CHROME,
+ REMOTE_IE,
+ FIREFOX,
+ CHROME,
+ IE,
+ HTML_UNIT;
+
+ public static BrowserType fromString(String name) {
+ if (isNullOrEmpty(name)) {
+ throw new IllegalArgumentException("Required argument 'name' is null/empty!");
+ }
+
+ for (BrowserType bt : BrowserType.values()) {
+ if (name.equalsIgnoreCase(bt.name())) {
+ return bt;
+ }
+ }
+
+ throw new IllegalArgumentException(String.format("Specified name [%s] is unknown!", name));
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CFTSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CFTSteps.java
new file mode 100755
index 000000000..da1f36f07
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CFTSteps.java
@@ -0,0 +1,265 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.CFTViews;
+import cucumber.api.PendingException;
+import cucumber.api.java.en.And;
+import org.openqa.selenium.By;
+import org.openqa.selenium.support.PageFactory;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.WebDriverWait;
+
+import java.util.logging.Logger;
+
+import static junit.framework.Assert.assertTrue;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0097 on 21-06-2016.
+ */
+public class CFTSteps {
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ @And("^I navigate to the \"([^\"]*)\"$")
+ public void I_navigate_to_the(String strLink) throws Throwable {
+ CFTViews.clickOnWorkZoneLink();
+ }
+
+ @And("^I click on the \"([^\"]*)\" link$")
+ public void I_click_on_the_link(String strLink) throws Throwable {
+ CFTViews.clickOntheLink(strLink);
+ }
+
+ @And("^I select the \"([^\"]*)\" blueprint$")
+ public void I_select_the_blueprint(String strBlueprint) throws Throwable {
+ CFTViews.clickOntheCssselectorField("li[title='"+strBlueprint+"']");
+ }
+
+ @And("^I select the \"([^\"]*)\" blueprint and click on the Launch button$")
+ public void I_select_the_blueprint_and_click_on_the_Launch_button(String strBlueprint) throws Throwable {
+ CFTViews.selectBlueprintAndClickOnLaunchButton(strBlueprint);
+ }
+
+ @And("^I click on the \"([^\"]*)\" button on confirmation popup window$")
+ public void I_click_on_the_button_on_confirmation_popup_window(String strButton) throws Throwable {
+ CFTViews.clickOnOKButton(strButton);
+ }
+
+ @And("^I enter \"([^\"]*)\" unique stack name$")
+ public void I_enter_unique_stack_name(String strStackName) throws Throwable {
+ CFTViews.enterStackName(strStackName);
+ }
+
+ @And("^I click on the submit button$")
+ public void I_click_on_the_submit_button() throws Throwable {
+ CFTViews.clickOnButtonButton();
+ }
+
+ @And("^I verify the following message \"([^\"]*)\"$")
+ public void I_verify_the_following_message(String strSearchText) {
+ try {
+ Thread.sleep(130000);
+ SeleniumUtil.waitUntilElementContainsText("id","instanceLogModalContainer",strSearchText,8,SeleniumUtilities.OBJWAITTIMEOUT);
+// WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), 560);
+// assertTrue(wait.until(ExpectedConditions.textToBePresentInElement(By.tagName("*"), strSearchText)));
+ logger.info("Verified : " + strSearchText);
+ } catch (Exception e) {
+ try {
+ SeleniumUtil.getWebElementObject("xpath", "//*[contains(text(),\"" + strSearchText + "\")]");
+ } catch (Exception ex) {
+ BaseView.takeScreenshot(strSearchText + ".png");
+ logger.info("Error :" + e.getMessage());
+ fail(e.getMessage());
+ }
+ }
+ }
+
+ @And("^I verify the \"([^\"]*)\" stack name and status \"([^\"]*)\" in cloudformation$")
+ public void I_verify_the_stack_name_and_status_in_cloudformation(String strStackName, String strStatus) throws Throwable {
+ CFTViews.verifyStackName(strStackName,strStatus);
+ }
+
+ @And("^I click on more Info icon of \"([^\"]*)\" instance card$")
+ public void I_click_on_more_Info_icon_of_instance_card(String strCardName) throws Throwable {
+ CFTViews.clickOnMoreInfoofInstanceCard(strCardName);
+ }
+
+ @And("^I extract IP address of \"([^\"]*)\" instance card$")
+ public void I_extract_IP_address_of_instance_card(String strCardName) throws Throwable {
+ CFTViews.getIPAddress(strCardName);
+ }
+
+ @And("^I click on the \"([^\"]*)\" button on confirmation popup$")
+ public void I_click_on_the_button_on_confirmation_popup(String arg1) throws Throwable {
+ CFTViews.clickOnConfirmatinButton();
+ }
+
+ @And("^I collapse the first section \"([^\"]*)\"$")
+ public void I_collapse_the_first_section(String strSoftwareStack) throws Throwable {
+ CFTViews.clickOntheLink(strSoftwareStack);
+ }
+
+ @And("^I expand the \"([^\"]*)\" section$")
+ public void I_expand_the_section(String Cloudformation) throws Throwable {
+ CFTViews.clickOntheLink(Cloudformation);
+ }
+
+ @And("^I see the catalyst dashboard$")
+ public void I_see_the_catalyst_dashboard() throws Throwable {
+ CFTViews.seeDashboard();
+ }
+
+ @And("^I click on the \"([^\"]*)\" link to expend the tree$")
+ public void I_click_on_the_link_to_expend_the_tree(String strTreeHead) throws Throwable {
+ CFTViews.expendTheTree(strTreeHead);
+ }
+
+ @And("^I verify the following message \"([^\"]*)\" on \"([^\"]*)\" popup window$")
+ public void I_verify_the_following_message_on_popup_window(String strPopWindowText,String strSearchText) {
+ try {
+ Thread.sleep(10000);
+ SeleniumUtil.waitUntilElementContainsText("xpath",".//*[contains(./text(),'"+strPopWindowText+"')]",strPopWindowText,SeleniumUtilities.OBJWAITTIMEOUT);
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), 160);
+ assertTrue(wait.until(ExpectedConditions.textToBePresentInElement(By.tagName("*"), strSearchText)));
+ logger.info("Verified : " + strSearchText);
+ } catch (Exception e) {
+ try {
+ SeleniumUtil.getWebElementObject("xpath", "//*[contains(text(),\"" + strSearchText + "\")]");
+ } catch (Exception ex) {
+ BaseView.takeScreenshot(strSearchText + ".png");
+ logger.info("Error :" + e.getMessage());
+ fail(e.getMessage());
+ }
+ }
+ }
+
+ @And("^I navigate to the trackNew$")
+ public void I_navigate_to_the_trackNew() throws Throwable {
+ CFTViews.clickOnTrack();
+ }
+
+ @And("^I click on the line chart \"([^\"]*)\"$")
+ public void I_click_on_the_line_chart(String strLabel) throws Throwable {
+ CFTViews.clickOnLineChartNotifications(strLabel);
+ }
+
+ @And("^I click on the file \"([^\"]*)\"$")
+ public void I_click_on_the_file(String strLabel) throws Throwable {
+ CFTViews.clickOnFileNotifications(strLabel);
+ }
+
+ @And("^I click on the desktop \"([^\"]*)\"$")
+ public void I_click_on_the_desktop(String strLabel) throws Throwable {
+ CFTViews.clickOnDesktopNotifications(strLabel);
+ }
+
+ @And("^I click on the \"([^\"]*)\" tab$")
+ public void I_click_on_the_tab(String strLink) throws Throwable {
+ CFTViews.clickOnLink(strLink);
+ }
+
+ @And("^I verify the Public IP address exist in \"([^\"]*)\" instance$")
+ public void I_verify_the_Public_IP_address_exist_in_instance(String strCardName) throws Throwable {
+// span[class='ip-cell-public']
+// span[class='ip-cell-private']
+ CFTViews.verifyPublicIPAddress(strCardName);
+ }
+
+ @And("^I extract Private IP address of \"([^\"]*)\" instance card$")
+ public void I_extract_Private_IP_address_of_instance_card(String strCardName) throws Throwable {
+ CFTViews.getPrivateIPAddress(strCardName);
+ }
+
+ @And("^I switch to visible frame$")
+ public void I_switch_to_visible_frame() throws Throwable {
+ CFTViews.switchToFrame();
+ }
+
+ @And("^I switch to default frame$")
+ public void I_switch_to_default_frame() throws Throwable {
+ SeleniumUtil.switchTodefaultContent();
+ }
+
+
+ @And("^I select the \"([^\"]*)\" from drop down$")
+ public void iSelectTheFromDropDown(String orgName) throws Throwable {
+ CFTViews.selectOrg(orgName);
+ }
+
+ @And("^I click on \"([^\"]*)\" to expand it$")
+ public void iClickOnToExpandIt(String configStackPara) throws Throwable {
+ CFTViews.clickOnConfigStackParaLink(configStackPara);
+ }
+
+ @And("^I enter \"([^\"]*)\" in the \"([^\"]*)\" edit box$")
+ public void iEnterInTheEditBox(String stackPara, String webEleAttribute) throws Throwable {
+ CFTViews.enterStackPara(stackPara,webEleAttribute);
+
+ }
+
+ @And("^I enter \"([^\"]*)\" in Username Input edit box$")
+ public void iEnterInUsernameInputEditBox(String instanceUserName) throws Throwable {
+ CFTViews.enterInstanceUserName(instanceUserName);
+ }
+
+ @And("^I expand \"([^\"]*)\"$")
+ public void iExpand(String blueprintType) throws Throwable {
+ CFTViews.clickOnBlueprintType(blueprintType);
+ }
+
+ @And("^I enter \"([^\"]*)\" on popup window$")
+ public void iEnterOnPopupWindow(String uniqueStackName) throws Throwable {
+ CFTViews.enterUniqueStackName(uniqueStackName);
+ }
+
+ @And("^I click on Refresh button$")
+ public void iClickOnRefreshButton() throws Throwable {
+ CFTViews.refreshCFTStackPage();
+ }
+ @And("^I verify the \"([^\"]*)\" stack name and status CREATE_IN_PROGRESS in CFT Stacks$")
+ public void iVerifyTheStackNameAndStatusCREATE_IN_PROGRESSInCFTStacks(String cftName) throws Throwable {
+ CFTViews.verifyStatusCreateInProgress(cftName);
+ }
+
+ @And("^I verify the \"([^\"]*)\" stack name and status CREATE_COMPLETE in CFT Stacks$")
+ public void iVerifyTheStackNameAndStatusCREATE_COMPLETEInCFTStacks(String cftName) throws Throwable {
+ CFTViews.verifyStatusCreateComplete();
+
+ }
+
+ @And("^I Click on \"([^\"]*)\" link$")
+ public void iClickOnLink(String strLinkSaid) throws Throwable {
+ CFTViews.clickonTheLinkSaid(strLinkSaid);
+
+ }
+
+ @And("^I Click on \"([^\"]*)\" Tab provided$")
+ public void iClickOnTabProvided(String strCloudFormationTab) throws Throwable {
+ CFTViews.clickonCloudformationTab(strCloudFormationTab);
+ }
+
+
+ @And("^I Verify the Cloudformation Blueprint is created \"([^\"]*)\"$")
+ public void iVerifyTheCloudformationBlueprintIsCreated(String strVerifyBlueprint) throws Throwable {
+ CFTViews.VerifyCloudFormationBlueprint(strVerifyBlueprint);
+ }
+
+ @And("^I click on the link workzone$")
+ public void iClickOnTheLinkWorkzone() throws Throwable {
+ CFTViews.clickOnWorkZoneLink();
+ }
+
+ @And("^I Click on \"([^\"]*)\" link provided$")
+ public void iClickOnLinkProvided(String arg0) throws Throwable {
+ CFTViews.clickOnBlueprints();
+
+ }
+
+ @And("^I Verify the SoftwareStack Blueprint is created \"([^\"]*)\"$")
+ public void iVerifyTheSoftwareStackBlueprintIsCreated(String strSoftwareStack) throws Throwable {
+ CFTViews.VerifySoftwareStackBlueprint(strSoftwareStack);
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ChefServerSetupSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ChefServerSetupSteps.java
new file mode 100755
index 000000000..12507df3f
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ChefServerSetupSteps.java
@@ -0,0 +1,156 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.ChefServerSetupViews;
+import cucumber.api.PendingException;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.Iterator;
+import java.util.logging.Logger;
+
+import static junit.framework.Assert.assertTrue;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0372 on 20-07-2016.
+ */
+public class ChefServerSetupSteps {
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ @And("^I Enter the \"([^\"]*)\" in name edit box$")
+ public void iEnterTheInNameEditBox(String chefServerName) throws Throwable {
+ ChefServerSetupViews.enterServerName(chefServerName);
+ }
+
+ @And("^I Enter \"([^\"]*)\" in User Name edit box$")
+ public void iEnterInUserNameEditBox(String userName) throws Throwable {
+ ChefServerSetupViews.enterUserName(userName);
+ }
+
+ @And("^I Enter \"([^\"]*)\" in URL edit box$")
+ public void iEnterInURLEditBox(String url) throws Throwable {
+ ChefServerSetupViews.enterURL(url);
+ }
+
+ @And("^I browse pem file for chef server$")
+ public void iBrowsePemFileForChefServer() throws Throwable {
+ ChefServerSetupViews.BrowsePemFileForChefServer();
+ }
+
+ @And("^I browse knife file for chef server$")
+ public void iBrowseKnifeFileForChefServer() throws Throwable {
+ ChefServerSetupViews.BrowseKnifeFileForChefServer();
+ }
+
+ @And("^I select the \"([^\"]*)\" and click on corresponding \"([^\"]*)\" Button$")
+ public void iSelectTheAndClickOnCorrespondingButton(String cherServerName ,String Import_Node) throws Throwable {
+ ChefServerSetupViews.chefServerEditButton(cherServerName,Import_Node);
+ }
+
+ @And("^I clear the \"([^\"]*)\" already present in name edit box$")
+ public void iClearTheAlreadyPresentInNameEditBox(String arg0) throws Throwable {
+ ChefServerSetupViews.clearNameField();
+ }
+
+
+ @Then("^I verify \"([^\"]*)\" Link is displayed or not$")
+ public void iVerifyLinkIsDisplayedOrNot(String Nodes) throws Throwable {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath","//a[text()='Nodes']",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.waitUntilElementContainsText("xpath","//a[text()='Nodes']",Nodes,8,SeleniumUtilities.OBJWAITTIMEOUT));{
+ logger.info("Verified : " +Nodes);
+// }else{
+// logger.info("Verified : " +Nodes);
+ }
+ } catch (Exception e) {
+ try {
+ SeleniumUtil.getWebElementObject("xpath", "//a[text()='Nodes']");
+ } catch (Exception ex) {
+ BaseView.takeScreenshot(Nodes + ".png");
+ logger.info("Error :" + e.getMessage());
+ fail(e.getMessage());
+ }
+ }
+
+ }
+
+ @Then("^I verify that message \"([^\"]*)\" is displayed$")
+ public void iVerifyThatMessageIsDisplayed(String expectedMsg) throws Throwable {
+ try {
+ WebDriver driver=SeleniumUtil.getWebDriver();
+ Iterator i = driver.getWindowHandles().iterator();
+ while (i.hasNext()) {
+ String parentBrowser=i.next();
+ String childBrowser =i.next();
+ driver.switchTo().window(childBrowser);
+ assertTrue(SeleniumUtil.isElementExist("id","chefAccountMsg"));
+ logger.info("Verified : Chef Account is Displayed");
+ driver.close();
+ driver.switchTo().window(parentBrowser);
+ }
+ } catch (Exception e) {
+ BaseView.takeScreenshot(expectedMsg + ".png");
+ logger.info("Error :" + e.getMessage());
+ fail(e.getMessage());
+ }
+ }
+ @Then("^I verify that message \"([^\"]*)\" on data bag page is displayed$")
+ public void iVerifyThatMessageOnDataBagPageIsDisplayed(String expectedMsg) throws Throwable {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath","//h4[contains(text(),'Data Bags & Items')]",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("xpath","//h4[contains(text(),'Data Bags & Items')]",expectedMsg,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Verified : " + expectedMsg);
+ }
+ } catch (Exception e) {
+ BaseView.takeScreenshot(expectedMsg + ".png");
+ logger.info("Error :" + e.getMessage());
+ fail(e.getMessage());
+ }
+ }
+
+ @Then("^I verify created \"([^\"]*)\" in chef server table$")
+ public void iVerifyCreatedInChefServerTable(String chefServerName) throws Throwable {
+ ChefServerSetupViews.verifyChefServerName(chefServerName);
+
+ }
+
+
+ @And("^I verify select organization is disabled$")
+ public void iVerifySelectOrganizationIsDisabled() throws Throwable {
+ ChefServerSetupViews.verifySelectOrgISDisabled();
+ }
+
+ @Then("^I verify created \"([^\"]*)\" is deleted$")
+ public void iVerifyCreatedChefServerIsDeleted(String chefServerName) throws Throwable {
+ ChefServerSetupViews.verifyChefServerIsDeleted(chefServerName);
+ }
+
+
+ @Then("^I verify \"([^\"]*)\" with \"([^\"]*)\" in the Chef Server table$")
+ public void iVerifyWithInTheChefServerTable(String chefServerName, String chefUserName) throws Throwable {
+ ChefServerSetupViews.verifyServerDetails(chefServerName,chefUserName);
+ }
+
+ @And("^I upload pem file \"([^\"]*)\"$")
+ public void iUploadPemFile(String fileName) throws Throwable {
+ ChefServerSetupViews.uploadPemFile(fileName);
+ }
+
+ @And("^I upload knife file \"([^\"]*)\"$")
+ public void iUploadKnifeFile(String fileName) throws Throwable {
+ ChefServerSetupViews.uploadKnifeFile(fileName);
+ }
+
+ @And("^I select \"([^\"]*)\" from the Drop Down available$")
+ public void iSelectFromTheDropDownAvailable(String strOrgname) throws Throwable {
+ ChefServerSetupViews.selectTheOrg(strOrgname);
+
+ }
+}
+
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ConfigBlueprintForOSImageUsingProAWSSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ConfigBlueprintForOSImageUsingProAWSSteps.java
new file mode 100755
index 000000000..adc866fb5
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ConfigBlueprintForOSImageUsingProAWSSteps.java
@@ -0,0 +1,43 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.ConfigBlueprintForOSImageUsingProAWSViews;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+/**
+ * Created by RLE0372 on 23-09-2016.
+ */
+public class ConfigBlueprintForOSImageUsingProAWSSteps {
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ @And("^I see Choose Operating System is disabled$")
+ public void iSeeChooseOperatingSystemIsDisabled() throws Throwable {
+ ConfigBlueprintForOSImageUsingProAWSViews.verifyChooseOSIsDisabled();
+ }
+
+ @And("^I see Choose Provider is disabled$")
+ public void iSeeChooseProviderIsDisabled() throws Throwable {
+ ConfigBlueprintForOSImageUsingProAWSViews.verifyChooseProviderIsDisabled();
+ }
+
+ @And("^I see Choose Available Images is disabled$")
+ public void iSeeChooseAvailableImagesIsDisabled() throws Throwable {
+ ConfigBlueprintForOSImageUsingProAWSViews.verifyChooseAvailableImages();
+ }
+
+ @And("^I see Choose Organization is disabled$")
+ public void iSeeChooseOrganizationIsDisabled() throws Throwable {
+ ConfigBlueprintForOSImageUsingProAWSViews.verifyChooseOrgIsDisabled();
+ }
+
+ @Then("^I verify launch blueprint button is dispalyed$")
+ public void iVerifyLaunchBlueprintButtonIsDispalyed() throws Throwable {
+ ConfigBlueprintForOSImageUsingProAWSViews.verifyLaunchButtonISDisplayed();
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ConfigBlueprintForSSTempUsingProAWSSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ConfigBlueprintForSSTempUsingProAWSSteps.java
new file mode 100755
index 000000000..2e0f65707
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ConfigBlueprintForSSTempUsingProAWSSteps.java
@@ -0,0 +1,89 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.ConfigBlueprintForSSTempUsingProAWSViews;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+/**
+ * Created by RLE0372 on 10-09-2016.
+ */
+public class ConfigBlueprintForSSTempUsingProAWSSteps {
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ @Then("^I verify \"([^\"]*)\" present in \"([^\"]*)\" page$")
+ public void iVerifyPresentInPage(String blueprintName, String pageName) throws Throwable {
+ ConfigBlueprintForSSTempUsingProAWSViews.verifyBlueprintInWorkZone(blueprintName,pageName);
+ }
+
+ @And("^I click on \"([^\"]*)\" of the \"([^\"]*)\"$")
+ public void iClickOnOfThe(String moreInfo, String blueprintName) throws Throwable {
+ ConfigBlueprintForSSTempUsingProAWSViews.clickOnMoreInfo(moreInfo,blueprintName);
+ }
+
+ @And("^I click on the \"([^\"]*)\" button on instance log popup$")
+ public void iClickOnTheButtonOnInstanceLogPopup(String arg0) throws Throwable {
+ ConfigBlueprintForSSTempUsingProAWSViews.clickOnClose();
+ }
+
+ @And("^I select the desired \"([^\"]*)\"$")
+ public void iSelectTheDesired(String blueprintName) throws Throwable {
+ ConfigBlueprintForSSTempUsingProAWSViews.selectBlueprint(blueprintName);
+ }
+
+ @And("^I click on copy Blueprint$")
+ public void iClickOnCopyBlueprint() throws Throwable {
+ ConfigBlueprintForSSTempUsingProAWSViews.clickOnCopyBlueprint();
+ }
+
+ @And("^I select \"([^\"]*)\" from \"([^\"]*)\" drop down on select target popup$")
+ public void iSelectFromDropDownOnSelectTargetPopup(String name, String idOfElement) throws Throwable {
+ ConfigBlueprintForSSTempUsingProAWSViews.selectParametersOnPopupWindow(name,idOfElement);
+ }
+
+ @And("^I click on \"([^\"]*)\" button on the select target popup$")
+ public void iClickOnButtonOnTheSelectTargetPopup(String buttonText) throws Throwable {
+ ConfigBlueprintForSSTempUsingProAWSViews.clickOnSave(buttonText);
+ }
+
+ @And("^I select the \"([^\"]*)\" and click on assigned \"([^\"]*)\"$")
+ public void iSelectTheAndClickOnAssigned(String proName, String envName) throws Throwable {
+ ConfigBlueprintForSSTempUsingProAWSViews.clickOnEnv(proName,envName);
+ }
+
+ @And("^I click on \"([^\"]*)\" button to delete the blueprint$")
+ public void iClickOnButtonToDeleteTheBlueprint(String buttonTitle) throws Throwable {
+ ConfigBlueprintForSSTempUsingProAWSViews.clickOnDeleteBlueprint(buttonTitle);
+ }
+
+ @Then("^I verify \"([^\"]*)\" is deleted$")
+ public void iVerifyIsDeleted(String blueprintName) throws Throwable {
+ ConfigBlueprintForSSTempUsingProAWSViews.verifyBlueprintDeleted(blueprintName);
+ }
+
+ @And("^I click on \"([^\"]*)\" button of \"([^\"]*)\"$")
+ public void iClickOnButtonOf(String buttonTitle, String blueprintName) throws Throwable {
+ ConfigBlueprintForSSTempUsingProAWSViews.clickOnEditBlueprintButton(buttonTitle,blueprintName);
+ }
+
+ @And("^I click on the Settings$")
+ public void iClickOnTheSettings() throws Throwable {
+ ConfigBlueprintForSSTempUsingProAWSViews.clickOnSettings();
+ }
+
+ @And("^I click on \"([^\"]*)\" on blueprint page$")
+ public void iClickOnOnBlueprintPage(String title) throws Throwable {
+ ConfigBlueprintForSSTempUsingProAWSViews.deleteBlueprint(title);
+ }
+
+ @And("^I click on the \"([^\"]*)\" button on \"([^\"]*)\" popup window$")
+ public void iClickOnTheButtonOnPopupWindow(String arg0, String arg1) throws Throwable {
+ ConfigBlueprintForSSTempUsingProAWSViews.clickOnDeleteOnConfirmationPopup();
+ }
+
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ConfigureNexusServerSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ConfigureNexusServerSteps.java
new file mode 100755
index 000000000..3430a4b91
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ConfigureNexusServerSteps.java
@@ -0,0 +1,33 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.ConfigureNexusServerViews;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+/**
+ * Created by RLE0372 on 09-08-2016.
+ */
+public class ConfigureNexusServerSteps {
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ @Then("^I verify \"([^\"]*)\" in the nexus server management table$")
+ public void iVerifyInTheNexusServerManagementTable(String nexusServerName) throws Throwable {
+ ConfigureNexusServerViews.verifyNexusServerName(nexusServerName);
+ }
+
+ @Then("^I verify \"([^\"]*)\" with \"([^\"]*)\" in the nexus server management table$")
+ public void iVerifyWithInTheNexusServerManagementTable(String nexusServerName, String nexusServerDetails) throws Throwable {
+ ConfigureNexusServerViews.verifyNexusServerInfo(nexusServerName,nexusServerDetails);
+ }
+
+ @And("^I select \"([^\"]*)\" from the select box Nexus Configuration Management page$")
+ public void iSelectFromTheSelectBoxNexusConfigurationManagementPage(String orgName) throws Throwable {
+ ConfigureNexusServerViews.selectOrgInNexusConfigPage(orgName);
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ConfigureProviderSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ConfigureProviderSteps.java
new file mode 100755
index 000000000..8b5f99b08
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ConfigureProviderSteps.java
@@ -0,0 +1,123 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.ConfigureProviderViews;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+/**
+ * Created by RLE0372 on 02-08-2016.
+ */
+public class ConfigureProviderSteps {
+
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ @And("^I select provider type \"([^\"]*)\"$")
+ public void iSelectProviderType(String providerType) throws Throwable {
+ ConfigureProviderViews.selectProviderType(providerType);
+
+ }
+
+ @And("^I click on \"([^\"]*)\" User Access Key$")
+ public void iClickOnUserAccessKey(String buttonID) throws Throwable {
+ ConfigureProviderViews.clickCredentialSelButton(buttonID);
+ }
+
+ @And("^I select \"([^\"]*)\" from the drop down$")
+ public void iSelectFromTheDropDown(String orgName) throws Throwable {
+ ConfigureProviderViews.selectOrg(orgName);
+ }
+
+ @And("^I select \"([^\"]*)\" from the region select box$")
+ public void iSelectFromTheRegionSelectBox(String region) throws Throwable {
+ ConfigureProviderViews.selectRegion(region);
+ }
+
+ @And("^I select \"([^\"]*)\" from the key pair select box$")
+ public void iSelectFromTheKeyPairSelectBox(String keyPair) throws Throwable {
+ ConfigureProviderViews.selectKeyPair(keyPair);
+ }
+
+ @And("^I browse pem file for provider$")
+ public void iBrowsePemFileForProvider() throws Throwable {
+ ConfigureProviderViews.browsePemFileForProvider();
+ }
+
+ @And("^I verify the created provider \"([^\"]*)\" in Providers list$")
+ public void iVerifyTheCreatedProviderInProvidersList(String providerName) throws Throwable {
+ ConfigureProviderViews.verifyProvidersName(providerName);
+ }
+
+ @Then("^I verify the following message \"([^\"]*)\" on popup window$")
+ public void iVerifyTheFollowingMessageOnPopupWindow(String actMsg) throws Throwable {
+ ConfigureProviderViews.verifyMessage(actMsg);
+ }
+
+ @And("^I browse \"([^\"]*)\" file for open stack provider$")
+ public void iBrowseFileForOpenStackProvider(String openStackpemFile) throws Throwable {
+ ConfigureProviderViews.browseOpenStackPemFile(openStackpemFile);
+ }
+
+ @Then("^I verify \"([^\"]*)\" in the provider table$")
+ public void iVerifyInTheProviderTable(String providerName) throws Throwable {
+ ConfigureProviderViews.verifyProviderName(providerName);
+ }
+
+ @And("^I verify select provider type is disabled$")
+ public void iVerifySelectProviderTypeIsDisabled() throws Throwable {
+ ConfigureProviderViews.verifySelProviderTypeisDisabled();
+ }
+
+ @And("^I verify \"([^\"]*)\" is disabled$")
+ public void iVerifyIsDisabled(String credentialsAccessKeys) throws Throwable {
+ ConfigureProviderViews.verifyCredentialsAccessKeyIsDisabled(credentialsAccessKeys);
+ }
+
+ @And("^I verify select organization is disabled in edit provider page$")
+ public void iVerifySelectOrganizationIsDisabledInEditProviderPage() throws Throwable {
+ ConfigureProviderViews.verifySelectOrgIsDisabled();
+ }
+
+ @And("^I verify select region is disabled in edit provider page$")
+ public void iVerifySelectRegionIsDisabledInEditProviderPage() throws Throwable {
+ ConfigureProviderViews.verifySelectRegionIsDisabled();
+ }
+
+ @And("^I verify select key pair is disabled in edit provider page$")
+ public void iVerifySelectKeyPairIsDisabledInEditProviderPage() throws Throwable {
+ ConfigureProviderViews.verifySelKeyPairIsDisabled();
+ }
+
+
+ @Then("^I verify \"([^\"]*)\" with \"([^\"]*)\" in the provider table$")
+ public void iVerifyWithInTheProviderTable(String providerName, String providerInfo) throws Throwable {
+ ConfigureProviderViews.verifyProviderInfo(providerName,providerInfo);
+ }
+
+
+ @And("^I select \"([^\"]*)\" from the dropdown$")
+ public void iSelectFromTheDropdown(String orgName) throws Throwable {
+ ConfigureProviderViews.OrgSelct(orgName);
+ }
+
+ @And("^I select \"([^\"]*)\" from the select box in new provider page$")
+ public void iSelectFromTheSelectBoxInNewProviderPage(String orgName) throws Throwable {
+ ConfigureProviderViews.selectOrgInNewAWSPage(orgName);
+ }
+
+ @And("^I browse pem file for azure provider$")
+ public void iBrowsePemFileForAzureProvider() throws Throwable {
+ ConfigureProviderViews.browseAzurePemFile();
+
+ }
+
+ @And("^I browse private key file for azure provider$")
+ public void iBrowsePrivateKeyFileForAzureProvider() throws Throwable {
+ ConfigureProviderViews.browseAzurePrivateKeyFile();
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ConfigurePuppetServerSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ConfigurePuppetServerSteps.java
new file mode 100755
index 000000000..a333b97fd
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ConfigurePuppetServerSteps.java
@@ -0,0 +1,44 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.ConfigurePuppetServerViews;
+import cucumber.api.java.en.And;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+/**
+ * Created by RLE0372 on 01-08-2016.
+ */
+public class ConfigurePuppetServerSteps {
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+
+ @And("^I click on puppet server link$")
+ public void iClickOnPuppetServerLink() throws Throwable {
+ ConfigurePuppetServerViews.clickOnPuppetServerLink();
+ }
+
+
+ @And("^I enter the \"([^\"]*)\" in edit box$")
+ public void iEnterTheInEditBox(String puppetServerName) throws Throwable {
+ ConfigurePuppetServerViews.enterPuppetServerName(puppetServerName);
+ }
+
+
+ @And("^I Enter puppet server \"([^\"]*)\" in User Name edit box$")
+ public void iEnterPuppetServerInUserNameEditBox(String userName) throws Throwable {
+ ConfigurePuppetServerViews.enterUserName(userName);
+ }
+
+ @And("^I enter \"([^\"]*)\" in edit box$")
+ public void iEnterInEditBox(String hostName) throws Throwable {
+ ConfigurePuppetServerViews.enterHostName(hostName);
+ }
+
+ @And("^I enter \"([^\"]*)\" in password edit box$")
+ public void iEnterInPasswordEditBox(String password) throws Throwable {
+ ConfigurePuppetServerViews.enterPuppetPassword(password);
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelBGroupSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelBGroupSteps.java
new file mode 100755
index 000000000..5dffc18c0
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelBGroupSteps.java
@@ -0,0 +1,95 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.CreateEditDelBGroupViews;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+/**
+ * Created by RLE0372 on 20-07-2016.
+ */
+public class CreateEditDelBGroupSteps {
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ @And("^I click on Business Groups Link$")
+ public void iClickOnBusinessGroupsLink() throws Throwable {
+ CreateEditDelBGroupViews.clickBGroupLink();
+ }
+
+ @And("^I click on New BGroup button$")
+ public void iClickOnNewBGroupButton() throws Throwable {
+ CreateEditDelBGroupViews.clickOnNewBGroup();
+
+ }
+ @And("^I enter the \"([^\"]*)\" name in Business Group name$")
+ public void iEnterTheNameInBusinessGroupName(String bGroupName) throws Throwable {
+ CreateEditDelBGroupViews.enterBGroupName(bGroupName);
+ }
+
+// @And("^I click on Organization select button$")
+// public void iClickOnOrganizationSelectButton() throws Throwable {
+// CreateEditDelBGroupViews.clickOnOrgSelectButton();
+// }
+
+ @And("^I enter \"([^\"]*)\" in the search box$")
+ public void iEnterInTheSearchBox(String org_Name) throws Throwable {
+ CreateEditDelBGroupViews.enterOrgName(org_Name);
+ }
+
+
+ @And("^I click on \"([^\"]*)\" Edit button$")
+ public void iClickOnEditButton(String bGroup) throws Throwable {
+ CreateEditDelBGroupViews.clickOnEditBGroup(bGroup);
+ }
+
+ @And("^I clear the product group name field$")
+ public void iClearTheProductGroupNameField() throws Throwable {
+ CreateEditDelBGroupViews.clearField();
+ }
+
+ @And("^I enter another \"([^\"]*)\" in edit box$")
+ public void iEnterAnotherBGrpInEditBox(String newBGrpName) throws Throwable {
+ CreateEditDelBGroupViews.enterNewBGrpName(newBGrpName);
+ }
+
+ @And("^I click on \"([^\"]*)\" delete bGroup button$")
+ public void iClickOnDeleteBGroupButton(String editedBGrp) throws Throwable {
+ CreateEditDelBGroupViews.delEditedBGroup(editedBGrp);
+ }
+
+ @And("^I click on Organizations link in the settings tree$")
+ public void iClickOnOrganizationsLinkInTheSettingsTree() throws Throwable {
+ CreateEditDelBGroupViews.clickOnOrgLinkInSettTree();
+ }
+
+
+ @Then("^I verify the created \"([^\"]*)\" in Business group table$")
+ public void iVerifyTheCreatedInBusinessGroupTable(String businessGroup) throws Throwable {
+ CreateEditDelBGroupViews.verifyCreatedBGroup(businessGroup);
+
+ }
+
+ @Then("^I verify the edited \"([^\"]*)\" in Business group table$")
+ public void iVerifyTheEditedInBusinessGroupTable(String editedBGroup) throws Throwable {
+ CreateEditDelBGroupViews.verifyEditedBGroup(editedBGroup);
+ }
+
+ @Then("^I verify the \"([^\"]*)\" is deleted from the Business Group table$")
+ public void iVerifyTheIsDeletedFromTheBusinessGroupTable(String bGroup) throws Throwable {
+ CreateEditDelBGroupViews.verifyDeletedBGroup(bGroup);
+ }
+
+ @Then("^I verify \"([^\"]*)\" with assigned \"([^\"]*)\" in the Business group table$")
+ public void iVerifyWithAssignedInTheBusinessGroupTable(String bGroup, String org) throws Throwable {
+ CreateEditDelBGroupViews.verifyAssignedOrg(bGroup,org);
+ }
+
+ @And("^I select \"([^\"]*)\" from the Drop Down$")
+ public void iSelectFromTheDropDown(String orgName) throws Throwable {
+ CreateEditDelBGroupViews.selectBusinessGroup(orgName);
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelDesignerSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelDesignerSteps.java
new file mode 100755
index 000000000..fe103ab3a
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelDesignerSteps.java
@@ -0,0 +1,156 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.CreateEditDelDesignerViews;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+/**
+ * Created by rle0346 on 3/8/16.
+ */
+public class CreateEditDelDesignerSteps {
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ @And("^I Click on \"([^\"]*)\" Link$")
+ public void iClickOnLink(String StrDesignerlink) throws Throwable {
+ CreateEditDelDesignerViews.clickOnUsersSetupLink(StrDesignerlink);
+ }
+
+ @And("^I Click on \"([^\"]*)\" Link in the link$")
+ public void iClickOnLinkInTheLink(String strUserLink) throws Throwable {
+ CreateEditDelDesignerViews.clickOnUsersLink(strUserLink);
+
+ }
+
+ @And("^I Click on New Button of Users page$")
+ public void iClickOnNewButtonOfUsersPage() throws Throwable {
+ CreateEditDelDesignerViews.clickOnNewButton();
+ }
+
+ @And("^I Enter the \"([^\"]*)\" User Login Name$")
+ public void iEnterTheUserLoginName(String strDesignerName) throws Throwable {
+ CreateEditDelDesignerViews.enterLoginName(strDesignerName);
+ }
+
+ @And("^I Enter the \"([^\"]*)\" of the User$")
+ public void iEnterTheOfTheUser(String strEmailAddress) throws Throwable {
+ CreateEditDelDesignerViews.enterEmailAddress(strEmailAddress);
+
+ }
+
+
+ @And("^I Enter the \"([^\"]*)\" of the User field$")
+ public void iEnterTheOfTheUserField(String strPassword) throws Throwable {
+ CreateEditDelDesignerViews.enterPassword(strPassword);
+ }
+
+
+ @And("^I Enter the \"([^\"]*)\" of User field$")
+ public void iEnterTheOfUserField(String strConfPassword) throws Throwable {
+ CreateEditDelDesignerViews.enterConfirmPassword(strConfPassword);
+ }
+
+ @And("^I Click on Org Dropdown and select \"([^\"]*)\"$")
+ public void iClickOnOrgDropdownAndSelect(String strOrganization) throws Throwable {
+ CreateEditDelDesignerViews.selectOrganization(strOrganization);
+
+ }
+
+ @And("^I Select the Role as \"([^\"]*)\"$")
+ public void iSelectTheRoleAs(String strRole) throws Throwable {
+ CreateEditDelDesignerViews.selectRole(strRole);
+
+ }
+
+ @And("^I Assign the Teams for the User with respect to \"([^\"]*)\"$")
+ public void iAssignTheTeamsForTheUserWithRespectTo(String strOrganization) throws Throwable {
+ CreateEditDelDesignerViews.selectTeam(strOrganization);
+
+ }
+
+
+ @And("^I Click on Save Button of User creation page$")
+ public void iClickOnSaveButtonOfUserCreationPage() throws Throwable {
+ CreateEditDelDesignerViews.clickSaveButton();
+ }
+
+
+ @And("^I Click on Edit Button the \"([^\"]*)\" user created$")
+ public void iClickOnEditButtonTheUserCreated(String strDesigner) throws Throwable {
+ CreateEditDelDesignerViews.clickEditDesignerButton(strDesigner);
+
+ }
+
+
+ @Then("^I Verify the \"([^\"]*)\" User is created$")
+ public void iVerifyTheUserIsCreated(String strDesigner) throws Throwable {
+ CreateEditDelDesignerViews.verifyDesignerUserCreation(strDesigner);
+
+ }
+
+ @And("^I Verify the Login name is disabled$")
+ public void iVerifyTheLoginNameIsDisabled() throws Throwable {
+ CreateEditDelDesignerViews.VerifyLoginNameDisabled();
+
+ }
+
+ @And("^I Click on Update Password tick$")
+ public void iClickOnUpdatePasswordTick() throws Throwable {
+ CreateEditDelDesignerViews.clickOnUpdatePasswordCheckbox();
+ }
+
+
+ @And("^I Click on Delete button of the \"([^\"]*)\" user created$")
+ public void iClickOnDeleteButtonOfTheUserCreated(String strDesigner) throws Throwable {
+ CreateEditDelDesignerViews.clickOnDeleteButton(strDesigner);
+
+ }
+
+ @And("^I Click on \"([^\"]*)\" Button to remove the Designer user$")
+ public void iClickOnButtonToRemoveTheDesignerUser(String strOK) throws Throwable {
+ CreateEditDelDesignerViews.clickOnOkButton(strOK);
+ }
+
+ @And("^I Verify the \"([^\"]*)\" is updated$")
+ public void iVerifyTheIsUpdated(String strEmailAddress) throws Throwable {
+ CreateEditDelDesignerViews.verfiyEmailAddressUpdated(strEmailAddress);
+ }
+
+ @And("^I Assign the Teams for the SuperAdmin User with respect to \"([^\"]*)\"$")
+ public void iAssignTheTeamsForTheSuperAdminUserWithRespectTo(String strDefaultTeam) throws Throwable {
+ CreateEditDelDesignerViews.selectDefaultTeam(strDefaultTeam);
+
+ }
+
+ @Then("^I Verify the \"([^\"]*)\" User with this \"([^\"]*)\" is created$")
+ public void iVerifyTheUserWithThisIsCreated(String strDesigner, String strEmailAddress) throws Throwable {
+ CreateEditDelDesignerViews.VerifyEmailAddress(strDesigner, strEmailAddress);
+
+ }
+
+ @Then("^I Verify the \"([^\"]*)\" User with this \"([^\"]*)\" created$")
+ public void iVerifyTheUserWithThisCreated(String strDesigner, String strDesignerRole) throws Throwable {
+ CreateEditDelDesignerViews.VerifyDesignerRoleInTable(strDesigner, strDesignerRole);
+ }
+
+
+ @Then("^I Verify the \"([^\"]*)\" User with this \"([^\"]*)\" is available$")
+ public void iVerifyTheUserWithThisIsAvailable(String strDesigner, String strOrganization) throws Throwable {
+ CreateEditDelDesignerViews.VerifyOrganizationInTable(strDesigner, strOrganization);
+ }
+
+ @Then("^I select the \"([^\"]*)\" and verify \"([^\"]*)\" Button is enabled$")
+ public void iSelectTheAndVerifyButtonIsEnabled(String strOrganization, String strEdit) throws Throwable {
+ CreateEditDelDesignerViews.verifyButtonIsEnabled(strOrganization, strEdit);
+ }
+
+ @Then("^I Verify the \"([^\"]*)\" user is deleted$")
+ public void iVerifyTheUserIsDeleted(String strDesigner) throws Throwable {
+ CreateEditDelDesignerViews.verifyDeletedUser(strDesigner);
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelDockerSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelDockerSteps.java
new file mode 100755
index 000000000..38f59c3c8
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelDockerSteps.java
@@ -0,0 +1,104 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.CreateEditDelDockerViews;
+import cucumber.api.PendingException;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+import static junit.framework.TestCase.assertTrue;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0372 on 01-08-2016.
+ */
+public class CreateEditDelDockerSteps {
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+
+ @And("^^I click on \"([^\"]*)\" link$")
+ public void iClickOnLink(String linkText) throws Throwable {
+ CreateEditDelDockerViews.clickOnDevopsSetup(linkText);
+ }
+
+ @And("^I enter \"([^\"]*)\" in user id edit box$")
+ public void iEnterInUserIdEditBox(String userId) throws Throwable {
+ CreateEditDelDockerViews.enterUserID(userId);
+ }
+
+ @And("^I Enter \"([^\"]*)\" in docker \"([^\"]*)\"$")
+ public void iEnterInDocker(String dockerName, String dockerreponame) throws Throwable {
+ CreateEditDelDockerViews.enterDockerHubRegistry(dockerName,dockerreponame);
+ }
+
+ @And("^I enter \"([^\"]*)\" in docker hub registry edit box$")
+ public void iEnterInDockerHubRegistryEditBox(String DocerHubRegName) throws Throwable {
+ CreateEditDelDockerViews.enterDockerHubRegistryName(DocerHubRegName);
+ }
+
+ @And("^I verify \"([^\"]*)\" page is displayed$")
+ public void iVerifyPageIsDisplayed(String editDocker) throws Throwable {
+ try {
+// SeleniumUtil.waitForElementIsClickable("xpath","",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.waitUntilElementContainsText("xpath","//*[contains(text(),'Edit Docker')]","Edit Docker",8,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Verified : " + editDocker);
+ }
+ } catch (Exception e) {
+ try {
+ SeleniumUtil.getWebElementObject("xpath", "//a[text()='Nodes']");
+ } catch (Exception ex) {
+ BaseView.takeScreenshot(editDocker + ".png");
+ logger.info("Error :" + e.getMessage());
+ fail(e.getMessage());
+ }
+ }
+
+ }
+
+ @Then("^I verify \"([^\"]*)\" in the docker table$")
+ public void iVerifyInTheDockerTable(String dockerName) throws Throwable {
+ CreateEditDelDockerViews.verifyDocker(dockerName);
+ }
+
+ @And("^I verify select organization is disabled in edit docker page$")
+ public void iVerifySelectOrganizationIsDisabledInEditDockerPage() throws Throwable {
+ CreateEditDelDockerViews.verifySelOrgIsDisabled();
+ }
+
+ @Then("^I verify \"([^\"]*)\" with \"([^\"]*)\" in the docker table$")
+ public void iVerifyWithInTheDockerTable(String dockerName, String dockerDetails) throws Throwable {
+ CreateEditDelDockerViews.verifyDockerInfo(dockerName,dockerDetails);
+ }
+
+ @And("^I click on \"([^\"]*)\" link available$")
+ public void iClickOnLinkAvailable(String strChefServer) throws Throwable {
+ CreateEditDelDockerViews.clickonChefServer(strChefServer);
+
+ }
+
+ @And("^I click on \"([^\"]*)\" linktext$")
+ public void iClickOnLinktext(String strLinkName) throws Throwable {
+ CreateEditDelDockerViews.clickGallerySetuplink(strLinkName);
+
+
+ }
+
+ @And("^I click on \"([^\"]*)\" linked$")
+ public void iClickOnLinked(String strTemplateLink) throws Throwable {
+ CreateEditDelDockerViews.clickTemplateLink(strTemplateLink);
+
+ }
+
+
+ @And("^I add the cookbooks to runlist with \"([^\"]*)\"$")
+ public void iAddTheCookbooksToRunlistWith(String strCookbookValue) throws Throwable {
+ CreateEditDelDockerViews.addCookbooksRunlist(strCookbookValue);
+
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelEnvSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelEnvSteps.java
new file mode 100755
index 000000000..54fcd68d6
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelEnvSteps.java
@@ -0,0 +1,136 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.CreateEditDelEnvViews;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+/**
+ * Created by RLE0372 on 26-07-2016.
+ */
+public class CreateEditDelEnvSteps {
+
+ private static final Logger logger = Logger.getLogger(com.rl.qa.steps.LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ @And("^I click on Environments link$")
+ public void iClickOnEnvironmentsLink() throws Throwable {
+ CreateEditDelEnvViews.clickOnEnvironmentsLink();
+ }
+
+ @And("^I click on \"([^\"]*)\" select Button and select one existing environment$")
+ public void iClickOnSelectButtonAndSelectOneExistingEnvironment(String serverName) throws Throwable {
+ CreateEditDelEnvViews.clickOnChefServerSelButton(serverName);
+ }
+
+ @And("^I enter the \"([^\"]*)\" name in edit box$")
+ public void iEnterTheNameInEditBox(String chefEnvName) throws Throwable {
+ CreateEditDelEnvViews.enterChefEnvName(chefEnvName);
+ }
+
+ @And("^I click on add chef environment button on create environment page$")
+ public void iClickOnAddChefEnvironmentButtonOnCreateEnvironmentPage() throws Throwable {
+ CreateEditDelEnvViews.clickOnAddChefEnvButtonOnEnvPage();
+
+ }
+
+ @And("^I check \"([^\"]*)\" is disabled$")
+ public void iCheckIsDisabled(String idOfElement) throws Throwable {
+ CreateEditDelEnvViews.checkElementIsDisabled(idOfElement);
+
+ }
+
+ @And("^I enter chef environment in \"([^\"]*)\" Edit box$")
+ public void iEnterChefEnvironmentInEditBox(String idOfEditBox) throws Throwable {
+ CreateEditDelEnvViews.enterRandomEnvName(idOfEditBox);
+ }
+
+
+ @Then("^I verify created \"([^\"]*)\" in environments table$")
+ public void iVerifyCreatedEnvInEnvironmentsTable(String environmentName) throws Throwable {
+ CreateEditDelEnvViews.verifySelectedEnvNameFromChef(environmentName);
+ }
+
+
+ @Then("^I select the \"([^\"]*)\" and verify \"([^\"]*)\" Button is enabled in environments table$")
+ public void iSelectTheEnvAndVerifyButtonIsEnabledInEnvironmentsTable(String arg0, String Edit) throws Throwable {
+ CreateEditDelEnvViews.verifyEditIsEnabled(" ",Edit);
+ }
+
+ @And("^I verify select chef server is disabled$")
+ public void iVerifySelectChefServerIsDisabled() throws Throwable {
+ CreateEditDelEnvViews.verifySelectChefServerisDisabled();
+ }
+
+ @Then("^I verify the created environment is deleted$")
+ public void iVerifyTheCreatedEnvironmentIsDeleted() throws Throwable {
+ CreateEditDelEnvViews.verifyEnvIsDeleted();
+ }
+
+
+ @And("^I select existing chef \"([^\"]*)\" from chef server$")
+ public void iSelectExistingChefFromChefServer(String envName) throws Throwable {
+ CreateEditDelEnvViews.selectExistingEnv(envName);
+
+ }
+
+ @Then("^I verify \"([^\"]*)\" with assigned \"([^\"]*)\" in the environments table$")
+ public void iVerifyEnvWithAssignedOrgInTheEnvironmentsTable(String arg0, String org) throws Throwable {
+ CreateEditDelEnvViews.verifyAssignedOrgName(arg0,org);
+ }
+
+ @And("^I verify created \"([^\"]*)\" in workzone$")
+ public void iVerifyCreatedInWorkzone(String arg0) throws Throwable {
+ CreateEditDelEnvViews.verifyEnvInWorkZone();
+ }
+
+ @And("^I click on the environment$")
+ public void iClickOnTheEnvironment() throws Throwable {
+ CreateEditDelEnvViews.clickOnEnv();
+ }
+
+ @And("^I select the \"([^\"]*)\" to be assigned with Env$")
+ public void iSelectTheToBeAssignedWithEnv(String projectname) throws Throwable {
+ CreateEditDelEnvViews.assigntheProject(projectname);
+ }
+
+ @And("^I verify created \"([^\"]*)\" in workzone and click on it$")
+ public void iVerifyCreatedInWorkzoneAndClickOnIt(String arg0) throws Throwable {
+ CreateEditDelEnvViews.verifyAndSelectCreatedEnv();
+ }
+
+ @Then("^I verify \"([^\"]*)\" with \"([^\"]*)\" in the environments table$")
+ public void iVerifyWithInTheEnvironmentsTable(String environmentName, String org) throws Throwable {
+ CreateEditDelEnvViews.verifyAssignedDetailsOfEnv(environmentName,org);
+ }
+
+ @Then("^I verify newly created \"([^\"]*)\" in environments table$")
+ public void iVerifyNewlyCreatedInEnvironmentsTable(String arg0) throws Throwable {
+ CreateEditDelEnvViews.verifyEnvName();
+ }
+
+ @Then("^I Verify \"([^\"]*)\" page is displayed$")
+ public void iVerifyPageIsDisplayed(String pageName) throws Throwable {
+ CreateEditDelEnvViews.verifyEditPageIsDisplayed(pageName);
+ }
+
+ @And("^I click on \"([^\"]*)\" button on the \"([^\"]*)\" popup$")
+ public void iClickOnButtonOnThePopup(String arg0, String arg1) throws Throwable {
+ CreateEditDelEnvViews.clickOnAddButton();
+ }
+
+ @And("^I select environment from drop down$")
+ public void iSelectEnvironmentFromDropDown() throws Throwable {
+ CreateEditDelEnvViews.selectNewlyAddedEnv();
+ }
+
+ @Then("^I verify the created \"([^\"]*)\" is deleted$")
+ public void iVerifyTheCreatedIsDeleted(String envName) throws Throwable {
+ CreateEditDelEnvViews.verifyEnvironmentIsDeleted(envName);
+
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelJenkinsSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelJenkinsSteps.java
new file mode 100755
index 000000000..c83b986b5
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelJenkinsSteps.java
@@ -0,0 +1,36 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.CreateEditDelJenkinsViews;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+/**
+ * Created by RLE0372 on 01-08-2016.
+ */
+public class CreateEditDelJenkinsSteps {
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+
+ @And("^I enter \"([^\"]*)\" in \"([^\"]*)\" Edit box$")
+ public void iEnterOrganizationNameInEditBox(String nameOfJenkins, String idOfEditBox) throws Throwable {
+ CreateEditDelJenkinsViews.enterJenkinsName(nameOfJenkins,idOfEditBox);
+
+ }
+
+ @Then("^I verify \"([^\"]*)\" in the jenkins table$")
+ public void iVerifyInTheJenkinsTable(String jenkinsPara) throws Throwable {
+ CreateEditDelJenkinsViews.verifyJenkins(jenkinsPara);
+ }
+
+
+ @Then("^I verify \"([^\"]*)\" with \"([^\"]*)\" in the jenkins table$")
+ public void iVerifyWithInTheJenkinsTable(String jenkinsRefName, String jenkinsPara) throws Throwable {
+ CreateEditDelJenkinsViews.verifyJenkinsDetails(jenkinsRefName,jenkinsPara);
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelOrgSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelOrgSteps.java
new file mode 100755
index 000000000..e06f8ec04
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelOrgSteps.java
@@ -0,0 +1,137 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.CreateEditDelJenkinsViews;
+import com.rl.qa.views.CreateEditDelOrgViews;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+/**
+ * Created by RLE0372 on 18-07-2016.
+ */
+public class CreateEditDelOrgSteps {
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ @And("^I click on the Settings Link$")
+ public void iClickOnTheSettingsLink() throws Throwable {
+ CreateEditDelOrgViews.clickOnSettings();
+ }
+ @And("^I click on Organizations link in main page$")
+ public void iClickOnOrganizationsLinkInMainPage() throws Throwable {
+ CreateEditDelOrgViews.clickOnOrganizations();
+ }
+
+ @And("^I click on \"([^\"]*)\" button$")
+ public void iClickOnButton(String newButtonId) throws Throwable {
+ CreateEditDelOrgViews.clickOnNewButton(newButtonId);
+ }
+
+ @And("^I click on save button$")
+ public void iClickOnSaveButton() throws Throwable {
+ CreateEditDelOrgViews.saveOrg();
+ }
+
+ @And("^I clear the existing \"([^\"]*)\" in the edit box$")
+ public void iClearTheExistingInTheEditBox(String idOfEditbox) throws Throwable {
+ CreateEditDelOrgViews.clearTheField(idOfEditbox);
+ }
+
+ @And("^I click on \"([^\"]*)\" delete button$")
+ public void iClickOnDeleteButton(String New_Organization) throws Throwable {
+
+ CreateEditDelOrgViews.delOrg(New_Organization);
+ }
+
+ @And("^I click on OK button$")
+ public void iClickOnOKButton() throws Throwable {
+ CreateEditDelOrgViews.clickOnOK();
+ }
+
+
+ @And("^I click on the Settings Link when control is on organization page$")
+ public void iClickOnTheSettingsLinkWhenControlIsOnOrganizationPage() throws Throwable {
+ CreateEditDelOrgViews.clickOnSettingsFromOrgPage();
+ }
+
+ @Then("^I verify the created \"([^\"]*)\" in organization table$")
+ public void iVerifyTheCreatedOrgInOrganizationTable(String organizationName) throws Throwable {
+ CreateEditDelOrgViews.verifyCreatedOrg(organizationName);
+ }
+
+ @And("^I see the catalyst \"([^\"]*)\"$")
+ public void iSeeTheCatalyst(String idOfElement) throws Throwable {
+ CreateEditDelOrgViews.seeWorkzone(idOfElement);
+ }
+
+ @And("^I verify the edited \"([^\"]*)\" in list$")
+ public void iVerifyTheEditedInList(String editedOrg) throws Throwable {
+ CreateEditDelOrgViews.verifyEditedOrg(editedOrg);
+ }
+
+ @Then("^I verify login page is displayed$")
+ public void iVerifyLoginPageIsDisplayed() throws Throwable {
+ CreateEditDelOrgViews.verifyLoginPage();
+ }
+
+ @Then("^I verify the \"([^\"]*)\" is deleted$")
+ public void iVerifyTheOrgIsDeleted(String orgName) throws Throwable {
+ CreateEditDelOrgViews.verifyDeletedOrg(orgName);
+ }
+
+ @Then("^I verify \"([^\"]*)\" with \"([^\"]*)\" in the organization table$")
+ public void iVerifyWithInTheOrganizationTable(String domainName, String orgName) throws Throwable {
+ CreateEditDelOrgViews.verifyDomainName(domainName,orgName);
+ }
+
+ @Then("^I verify \"([^\"]*)\" status with \"([^\"]*)\" in the organization table$")
+ public void iVerifyStatusWithInTheOrganizationTable(String status, String orgName) throws Throwable {
+ CreateEditDelOrgViews.verifyStatusOfOrg(status,orgName);
+ }
+
+ @And("^I click on Current Status Button$")
+ public void iClickOnCurrentStatusButton() throws Throwable {
+ CreateEditDelOrgViews.clickOnStatusButton();
+ }
+
+ @And("^I select \"([^\"]*)\" in the show drop down$")
+ public void iSelectInTheShowDropDown(String expectedValFromDropdown) throws Throwable {
+ CreateEditDelOrgViews.selectAllInShowDropDown(expectedValFromDropdown);
+ }
+
+ @And("^I click on OK button on Alert popup$")
+ public void iClickOnOKButtonOnAlertPopup() throws Throwable {
+ CreateEditDelOrgViews.clickOnOkOnAlertPopUp();
+ }
+
+ @And("^I enter the another \"([^\"]*)\" name$")
+ public void iEnterTheAnotherName(String New_Organization) throws Throwable {
+ CreateEditDelOrgViews.enterNewOrgName(New_Organization);
+ }
+
+ @And("^I enter another \"([^\"]*)\" in \"([^\"]*)\" Edit box$")
+ public void iEnterAnotherInEditBox(String name, String idOfEditBox) throws Throwable {
+ CreateEditDelJenkinsViews.enterJenkinsName(name,idOfEditBox);
+
+ }
+
+ @And("^I close the toast popup$")
+ public void iCloseTheToastPopup() throws Throwable {
+ CreateEditDelOrgViews.clickOnCloseToast();
+ }
+
+ @And("^I move the cursor on \"([^\"]*)\"$")
+ public void iMoveTheCursorOn(String arg0) throws Throwable {
+ CreateEditDelOrgViews.moveCursorOnMenu();
+ }
+
+ @And("^I Check where application is landing and take the step$")
+ public void iCheckWhereApplicationIsLandingAndTakeTheStep() throws Throwable {
+ CreateEditDelOrgViews.checkAndDecide();
+
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelProjectSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelProjectSteps.java
new file mode 100755
index 000000000..ded434bb6
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDelProjectSteps.java
@@ -0,0 +1,70 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.CreateEditDelProjectViews;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+/**
+ * Created by RLE0372 on 20-07-2016.
+ */
+public class CreateEditDelProjectSteps {
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ @And("^I click on Projects link$")
+ public void iClickOnProjectsLink() throws Throwable {
+ CreateEditDelProjectViews.clickOnProLink();
+ }
+
+ @And("^I click on new Projects button$")
+ public void iClickOnNewProjectsButton() throws Throwable {
+ CreateEditDelProjectViews.clickOnNewProButton();
+ }
+
+
+ @And("^I click on \"([^\"]*)\"$")
+ public void iClickOn(String proOrg) throws Throwable {
+ CreateEditDelProjectViews.clickOnOrg(proOrg);
+ }
+
+ @And("^I clear the project name field$")
+ public void iClearTheProjectNameField() throws Throwable {
+ CreateEditDelProjectViews.clearProNameField();
+ }
+
+
+ @And("^I enter \"([^\"]*)\" name$")
+ public void iEnterName(String newProName) throws Throwable {
+ CreateEditDelProjectViews.typeNewProj(newProName);
+ }
+
+ @And("^I click on \"([^\"]*)\" delete project button$")
+ public void iClickOnDeleteProjectButton(String proName) throws Throwable {
+ CreateEditDelProjectViews.delProject(proName);
+ }
+
+ @Then("^I verify the created \"([^\"]*)\" in project table$")
+ public void iVerifyTheCreatedProInProjectTable(String proName) throws Throwable {
+ CreateEditDelProjectViews.verifyCreatedProject(proName);
+ }
+
+ @Then("^I verify the \"([^\"]*)\" is deleted from project table$")
+ public void iVerifyTheIsDeletedFromProjectTable(String proName) throws Throwable {
+ CreateEditDelProjectViews.verifyDeletedPro(proName);
+ }
+
+ @And("^I check the environment$")
+ public void iCheckTheEnvironment() throws Throwable {
+ CreateEditDelProjectViews.clickOnEnv();
+ }
+
+ @Then("^I verify the \"([^\"]*)\" with assigned \"([^\"]*)\" in project table$")
+ public void iVerifyTheWithAssignedInProjectTable(String projectName, String projectDetails) throws Throwable {
+ CreateEditDelProjectViews.verifyProjectInfo(projectName,projectDetails);
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDeleteTeamSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDeleteTeamSteps.java
new file mode 100755
index 000000000..64ec9d535
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/CreateEditDeleteTeamSteps.java
@@ -0,0 +1,43 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.CreateEditDeleteTeamViews;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+/**
+ * Created by RLE0372 on 16-08-2016.
+ */
+public class CreateEditDeleteTeamSteps {
+ private static final Logger logger = Logger.getLogger(com.rl.qa.steps.LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ @Then("^I verify created \"([^\"]*)\" in the teams table$")
+ public void iVerifyCreatedInTheTeamsTable(String teamName) throws Throwable {
+ CreateEditDeleteTeamViews.verifyTeamName(teamName);
+ }
+
+ @Then("^I verify created \"([^\"]*)\" with \"([^\"]*)\" in the teams table$")
+ public void iVerifyCreatedWithInTheTeamsTable(String teamName, String TeamDetails)throws Throwable {
+ CreateEditDeleteTeamViews.verifyTeamDetails(teamName,TeamDetails);
+ }
+
+ @And("^I check the \"([^\"]*)\" check box$")
+ public void iCheckTheCheckBox(String value) throws Throwable {
+ CreateEditDeleteTeamViews.checkTheCheckBox(value);
+ }
+
+ @And("^I find the \"([^\"]*)\" by navigating to different page in and click on corresponding \"([^\"]*)\" Button$")
+ public void iFindTheByNavigatingToDifferentPageInAndClickOnCorrespondingButton(String teamName, String edit) throws Throwable {
+ CreateEditDeleteTeamViews.searchAndEditTheTeam(teamName,edit);
+ }
+
+ @Then("^I verify the \"([^\"]*)\" is deleted by navigating to different pages$")
+ public void iVerifyTheIsDeletedByNavigatingToDifferentPages(String teamName) throws Throwable {
+ CreateEditDeleteTeamViews.verifyTeamIsDeleted(teamName);
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ImportNodeFromChefSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ImportNodeFromChefSteps.java
new file mode 100755
index 000000000..c62c63e10
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ImportNodeFromChefSteps.java
@@ -0,0 +1,154 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.ImportNodesFromChefViews;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+/**
+ * Created by RLE0372 on 10-08-2016.
+ */
+public class ImportNodeFromChefSteps {
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+
+ @And("^I click on AWS provider$")
+ public void iClickOnAWSProvider() throws Throwable {
+ ImportNodesFromChefViews.clickOnAWSProvider();
+ }
+
+ @And("^I select type of blueprint \"([^\"]*)\"$")
+ public void iSelectTypeOfBlueprint(String blueprintType) throws Throwable {
+ ImportNodesFromChefViews.selectBlueprintType(blueprintType);
+ }
+
+ @And("^I click on next button$")
+ public void iClickOnNextButton() throws Throwable {
+ ImportNodesFromChefViews.clickOnNext();
+ }
+
+ @And("^I select \"([^\"]*)\" in \"([^\"]*)\" select box$")
+ public void iSelectInSelectBox(String valueToSelect, String idOfSelectBox) throws Throwable {
+ ImportNodesFromChefViews.selectValues(valueToSelect,idOfSelectBox);
+ }
+
+ @And("^I select \"([^\"]*)\" in select box$")
+ public void iSelectInSelectBox(String region) throws Throwable {
+ ImportNodesFromChefViews.selectRegion(region);
+ }
+
+ @And("^I select security group$")
+ public void iSelectSecurityGroup() throws Throwable {
+ ImportNodesFromChefViews.selectSecurityGrp();
+ }
+
+ @And("^I click on the \"([^\"]*)\"$")
+ public void iClickOnThe(String tempName) throws Throwable {
+ ImportNodesFromChefViews.selectTemplate(tempName);
+ }
+
+ @And("^I verify the \"([^\"]*)\" in the workzone$")
+ public void iVerifyTheInTheWorkzone(String envDetails) throws Throwable {
+ ImportNodesFromChefViews.verifyEnvDetails(envDetails);
+ }
+
+ @And("^I click on launch blueprint$")
+ public void iClickOnLaunchBlueprint() throws Throwable {
+ ImportNodesFromChefViews.clickOnLaunchBlueprint();
+ }
+
+ @And("^I click on Workzone$")
+ public void iClickOnWorkzone() throws Throwable {
+ ImportNodesFromChefViews.clickOnWorkzone();
+ }
+
+ @And("^I click on launch blueprint on the pop-up menu$")
+ public void iClickOnLaunchBlueprintOnThePopUpMenu() throws Throwable {
+ ImportNodesFromChefViews.clickOnLaunchBlueprintPopUp();
+ }
+
+ @And("^I click on launch on select blueprint parameter pop-up menu$")
+ public void iClickOnLaunhOnSelectBlueprintParameterPopUpMenu() throws Throwable {
+ ImportNodesFromChefViews.clickOnLaunchOnSelBlueprintPopUp();
+ }
+
+ @And("^I capture the AWS ID of \"([^\"]*)\"$")
+ public void iCaptureTheAWSIDOf(String bluePrintName) throws Throwable {
+ ImportNodesFromChefViews.captureAwsId(bluePrintName);
+ }
+
+ @And("^I capture the IP Address of \"([^\"]*)\"$")
+ public void iCaptureTheIPAddressOf(String bluePrintName) throws Throwable {
+ ImportNodesFromChefViews.captureIpAddress(bluePrintName);
+ }
+
+ @And("^I click on Import Nodes button$")
+ public void iClickOnImportNodesButton() throws Throwable {
+ ImportNodesFromChefViews.clickOnImportNodesButton();
+ }
+
+ @And("^I enter \"([^\"]*)\" in \"([^\"]*)\" Edit box in Import Nodes popup window$")
+ public void iEnterInEditBoxInImportNodesPopupWindow(String userName, String idOfEditBox) throws Throwable {
+ ImportNodesFromChefViews.enterUserNameInPopup(userName,idOfEditBox);
+ }
+ @And("^I enter \"([^\"]*)\" in the search box and check the corresponding AWS ID checkbox$")
+ public void iEnterInTheSearchBoxAndCheckTheCorrespondingAWSIDCheckbox(String arg0) throws Throwable {
+ ImportNodesFromChefViews.checkTheCheckBoxOfCorrespondingAWSID();
+ }
+
+ @And("^I select \"([^\"]*)\" in \"([^\"]*)\" drop down in Import Nodes popup window$")
+ public void iSelectInDropDownInImportNodesPopupWindow(String BusinessGroup, String idOfDropDown) throws Throwable {
+ ImportNodesFromChefViews.selectBGroupInImportPopUp(BusinessGroup,idOfDropDown);
+ }
+
+ @And("^I browse pem file in Import Nodes popup window$")
+ public void iBrowsePemFileInImportNodesPopupWindow() throws Throwable {
+ ImportNodesFromChefViews.importPemFileInPopupWindow();
+ }
+
+ @And("^I click on Import button on the popup window$")
+ public void iClickOnImportButtonOnThePopupWindow() throws Throwable {
+ ImportNodesFromChefViews.clickOnImportButton();
+ }
+
+ @And("^i verify Importing Nodes popup window is displayed$")
+ public void iVerifyImportingNodesPopupWindowIsDisplayed() throws Throwable {
+ ImportNodesFromChefViews.verifyImportingNodesPopUp();
+ }
+
+ @And("^I click on close button on popup window$")
+ public void iClickOnCloseButtonOnPopupWindow() throws Throwable {
+ ImportNodesFromChefViews.clickOnCloseButtonOnPopup();
+ }
+
+ @And("^I verify Node Imported with AWS ID$")
+ public void iVerifyNodeImportedWithAWSID() throws Throwable {
+ ImportNodesFromChefViews.verifyNodeImportedMessage();
+ }
+
+ @And("^I select the \"([^\"]*)\" from the drop down$")
+ public void iSelectTheFromTheDropDown(String envName) throws Throwable {
+ ImportNodesFromChefViews.selectEnv(envName);
+
+ }
+
+ @And("^I delete the launched instance from Instances$")
+ public void iDeleteTheLaunchedInstanceFromInstances() throws Throwable {
+ ImportNodesFromChefViews.deleteInstance();
+ }
+
+ @Then("^I verify \"([^\"]*)\" message on popup$")
+ public void iVerifyMessageOnPopup(String confirmationMsg) throws Throwable {
+ ImportNodesFromChefViews.verifyConfirmationMsg(confirmationMsg);
+ }
+
+// @And("^I browse pem file in Import Nodes popup window$")
+// public void iBrowsePemFileInImportNodesPopupWindow() throws Throwable {
+// ImportNodesFromChefViews.browsePemFile();
+// }
+}
\ No newline at end of file
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/LoginSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/LoginSteps.java
new file mode 100755
index 000000000..56f571753
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/LoginSteps.java
@@ -0,0 +1,317 @@
+package com.rl.qa.steps;
+
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.CucumberContext;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.LoginViews;
+import cucumber.api.Scenario;
+import cucumber.api.java.After;
+import cucumber.api.java.Before;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Given;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.OutputType;
+import org.openqa.selenium.TakesScreenshot;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.support.PageFactory;
+
+import java.net.URL;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import static com.rl.qa.utils.CucumberContext.getCucumberContext;
+import static junit.framework.Assert.assertNotNull;
+
+/**
+ * Created by RLE0097 on 21-06-2016.
+ */
+public class LoginSteps {
+ private static WebDriver driver;
+ private static Scenario scenario;
+
+
+
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ @Then("^I Login to IWMS using \"([^\"]*)\" access credentials$")
+ public void I_Login_to_IWMS_using_access_credentials(String loginName) throws Throwable {
+ try {
+ boolean flag = false;
+ String strUserName, strPassword;
+
+ strUserName = CucumberContext.getUserName();
+ strPassword = CucumberContext.getPassword();
+
+ URL url = CucumberContext.getURL();
+
+ assertNotNull(url);
+
+ String appURL = url.toString();
+
+ assertNotNull(appURL);
+
+ // Load browser and point it at configured IWMS web-ui.
+ BrowserDriver.loadPage(appURL);
+
+ Boolean loggedIn = (Boolean) getCucumberContext().get("loggedIn");
+ if (loggedIn != null && loggedIn) {
+ logger.info("Already logged in, reusing authenticated session(1).");
+ return;
+ }
+
+
+ logger.info("Logged in successfully.");
+// } else
+// logger.info("Login to IWMS using " + loginName + " access credentials does not exist in excel spreadsheet");
+ } catch (Exception e) {
+ BaseView.takeScreenshot("I_Login_to_IWMS_using_access_credentials");
+ String msg = String.format("Unable to login and see expected dashboard: %s", e.getMessage());
+ logger.log(Level.SEVERE, msg, e);
+ logger.info("Created new WebDriver instance as old one was failing to respond.");
+// fail(msg);
+ }
+ }
+
+ @Given("^I Login to catalyst using \"([^\"]*)\" access credentials$")
+ public void I_Login_to_catalyst_using_access_credentials(String loginName,String password) throws Throwable {
+ try {
+ boolean flag = false;
+ String strUserName, strPassword;
+
+
+ strUserName = loginName;//CucumberContext.getUserName();
+ strPassword = password;//CucumberContext.getPassword();
+
+
+ URL url = CucumberContext.getURL();
+
+ assertNotNull(url);
+
+ String appURL = url.toString();
+
+ assertNotNull(appURL);
+
+ // Load browser and point it at configured IWMS web-ui.
+ BrowserDriver.loadPage(appURL);
+
+ LoginViews.enterUsername(strUserName);
+ LoginViews.enterPassword(strPassword);
+ LoginViews.clickLoginButton();
+
+ /*Boolean loggedIn = (Boolean) getCucumberContext().get("loggedIn");
+ if (loggedIn != null && loggedIn) {
+ logger.info("Already logged in, reusing authenticated session(1).");
+ return;
+ }*/
+
+
+ logger.info("Logged in successfully.");
+ } catch (Exception e) {
+ BaseView.takeScreenshot("I_Login" + loginName + "_using_access_credentials");
+ String msg = String.format("Unable to login and see expected dashboard: %s", e.getMessage());
+ logger.log(Level.SEVERE, msg, e);
+ logger.info("Created new WebDriver instance as old one was failing to respond.");
+ }
+ }
+
+ @Given("^I Login to created new stack using \"([^\"]*)\" access credentials$")
+ public void I_Login_to_created_new_stack_using_access_credentials(String loginName) throws Throwable {
+ try {
+ boolean flag = false;
+ String strUserName, strPassword;
+
+ strUserName = "superadmin";//CucumberContext.getUserName();
+ strPassword = "superadmin@123";//CucumberContext.getPassword();
+
+ URL url = CucumberContext.getURL();
+
+ assertNotNull(url);
+
+ String appURL = url.toString();
+
+ assertNotNull(appURL);
+
+ // Load browser and point it at configured IWMS web-ui.
+ BrowserDriver.loadPage(appURL);
+
+ LoginViews.enterUsername(strUserName);
+ LoginViews.enterPassword(strPassword);
+ LoginViews.clickLoginButton();
+
+ Boolean loggedIn = (Boolean) getCucumberContext().get("loggedIn");
+ if (loggedIn != null && loggedIn) {
+ logger.info("Already logged in, reusing authenticated session(1).");
+ return;
+ }
+
+
+ logger.info("Logged in successfully.");
+ } catch (Exception e) {
+ BaseView.takeScreenshot("I_Login" + loginName + "_using_access_credentials");
+ String msg = String.format("Unable to login and see expected dashboard: %s", e.getMessage());
+ logger.log(Level.SEVERE, msg, e);
+ logger.info("Created new WebDriver instance as old one was failing to respond.");
+ }
+ }
+
+ @Given("^I Login to created new stack \"([^\"]*)\" using \"([^\"]*)\" access credentials$")
+ public void I_Login_to_created_new_stack_using_access_credentials(String strStackName, String strLoginName) throws Throwable {
+ try {
+ Thread.sleep(200000);
+ boolean flag = false;
+ String strUserName, strPassword;
+
+ strUserName = strLoginName;//CucumberContext.getUserName();
+ strPassword = "superadmin@123";//CucumberContext.getPassword();
+
+// URL url = strStackName+"."+"rlcatalyst.com"; CucumberContext.getURL();
+ String url = "http://" + strStackName + ".rlcatalyst.com";
+ assertNotNull(url);
+
+ String appURL = url.toString();
+
+ assertNotNull(appURL);
+
+ // Load browser and point it at configured IWMS web-ui.
+ BrowserDriver.loadPage(appURL);
+
+ LoginViews.enterUsername(strUserName);
+ LoginViews.enterPassword(strPassword);
+ LoginViews.clickLoginButton();
+
+ Boolean loggedIn = (Boolean) getCucumberContext().get("loggedIn");
+ if (loggedIn != null && loggedIn) {
+ logger.info("Already logged in, reusing authenticated session(1).");
+ return;
+ }
+
+
+ logger.info("Logged in successfully.");
+ } catch (Exception e) {
+ BaseView.takeScreenshot("I_Login" + strLoginName + "_using_access_credentials");
+ String msg = String.format("Unable to login and see expected dashboard: %s", e.getMessage());
+ logger.log(Level.SEVERE, msg, e);
+ logger.info("Created new WebDriver instance as old one was failing to respond.");
+ }
+ }
+
+ @And("^I Sign Out$")
+ public void I_Sign_Out() throws Throwable {
+ LoginViews.signOut();
+ }
+
+
+ @Before
+ public static void setUp(Scenario scenario) {
+ scenario = scenario;
+ System.out.println("I am at before");
+
+ }
+
+ @After
+ public static void embedscreenshot(Scenario scenario) {
+
+ if (scenario.isFailed()) {
+ try {
+ //encoded_img = @browser.driver.screenshot_as(:base64)
+ byte[] screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES);
+ scenario.embed(screenshot, "image/png"); //stick it in the report
+ System.out.println("I am at after");
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ }
+
+
+
+ @Given("^I need to check for which mail\"([^\"]*)\" application to login with valid credentials$")
+ public void iNeedToCheckForWhichMailApplicationToLoginWithValidCredentials(String strEmailAppName) throws Throwable {
+ LoginViews.whichApplicationToLaunch(strEmailAppName);
+
+ }
+
+ @Given("^I Login to catalyst using \"([^\"]*)\" and \"([^\"]*)\" and \"([^\"]*)\"access credentials$")
+ public void iLoginToCatalystUsingAndAndAccessCredentials(String strAppUrl, String loginName, String password) throws Throwable {
+ try {
+ boolean flag = false;
+ String strUserName, strPassword;
+
+
+ strUserName = loginName;//CucumberContext.getUserName();
+ strPassword = password;//CucumberContext.getPassword();
+
+
+ //URL url = CucumberContext.getURL();
+
+ //assertNotNull(url);
+
+ //String appURL = url.toString();
+
+ //assertNotNull(appURL);
+
+ // Load browser and point it at configured IWMS web-ui.
+
+ if(strAppUrl.contains("gmail")) {
+ BrowserDriver.loadPage(strAppUrl);
+ LoginViews.enterUsername(strUserName);
+ LoginViews.enterPassword(strPassword);
+ LoginViews.clickLoginButton();
+ LoginViews.signOutGmail();
+ }
+ else if (strAppUrl.contains("yahoo")){
+ BrowserDriver.loadPage(strAppUrl);
+ LoginViews.enterYahooUsername(strUserName);
+ LoginViews.enterYahooPassword(strPassword);
+ LoginViews.clickYahooLoginButton();
+ LoginViews.signOutYahoo();
+
+ }
+ else
+ {
+ System.out.println("Your option is not Gmail or Yahoo");
+
+ //if (strAppUrl.contains("rediff")){
+ // BrowserDriver.loadPage(strAppUrl);
+ //LoginViews.enterUsername(strUserName);
+ //LoginViews.enterPassword(strPassword);
+ //LoginViews.clickLoginButton();
+ }
+
+
+ /*Boolean loggedIn = (Boolean) getCucumberContext().get("loggedIn");
+ if (loggedIn != null && loggedIn) {
+ logger.info("Already logged in, reusing authenticated session(1).");
+ return;
+ }*/
+
+
+ logger.info("Logged in successfully.");
+ } catch (Exception e) {
+ BaseView.takeScreenshot("I_Login" + loginName + "_using_access_credentials");
+ String msg = String.format("Unable to login and see expected dashboard: %s", e.getMessage());
+ logger.log(Level.SEVERE, msg, e);
+ logger.info("Created new WebDriver instance as old one was failing to respond.");
+ }
+ }
+
+
+ @Then("^I logout of the Application$")
+ public void iLogoutOfTheApplication() throws Throwable {
+
+ }
+
+ @Then("^I logged out of application successfully$")
+ public void iLoggedOutOfApplicationSuccessfully() throws Throwable {
+ LoginViews.loggedout();
+ }
+}
+
+
+
+
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ProivderSyncSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ProivderSyncSteps.java
new file mode 100755
index 000000000..c217a8ac0
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/ProivderSyncSteps.java
@@ -0,0 +1,39 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.SeleniumUtilities;
+import cucumber.api.PendingException;
+import cucumber.api.java.en.And;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+/**
+ * Created by rle0346 on 11/8/16.
+ */
+public class ProivderSyncSteps {
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ @And("^I Click on Teams Link$")
+ public void iClickOnTeamsLink() throws Throwable {
+
+ }
+
+
+ @And("^Clicks on New Team Button$")
+ public void clicksOnNewTeamButton() throws Throwable {
+
+ }
+
+
+ @And("^Enters the Team Name$")
+ public void entersTheTeamName() throws Throwable {
+
+ }
+
+ @And("^Enters the Team Description$")
+ public void entersTheTeamDescription() throws Throwable {
+
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/TemplateSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/TemplateSteps.java
new file mode 100755
index 000000000..ed31f0915
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/TemplateSteps.java
@@ -0,0 +1,59 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.TemplateViews;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+/**
+ * Created by RLE0372 on 11-08-2016.
+ */
+public class TemplateSteps {
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ @And("^I click On \"([^\"]*)\" link$")
+ public void iClickOnLink(String linkText) throws Throwable {
+ TemplateViews.clickOnLink(linkText);
+
+ }
+
+ @And("^I select \"([^\"]*)\" from select box$")
+ public void iSelectFromSelectBox(String tempType) throws Throwable {
+ TemplateViews.selectTempType(tempType);
+ }
+
+ @Then("^I verify the \"([^\"]*)\" is deleted from the Templates table$")
+ public void iVerifyTheIsDeletedFromTheTemplatesTable(String tempName) throws Throwable {
+ TemplateViews.verifyDeletedTemp(tempName);
+ }
+
+ @And("^I verify \"([^\"]*)\" is displayed$")
+ public void iVerifyIsDisplayed(String idOfChkBox) throws Throwable {
+ TemplateViews.verifyChefFactory(idOfChkBox);
+ }
+
+ @Then("^I select \"([^\"]*)\" and verify corresponding \"([^\"]*)\" in Templates table$")
+ public void iSelectAndVerifycorrespondingCreatedInTemplatesTable(String templateName, String tempDetails) throws Throwable {
+ TemplateViews.verifyTempDetails(templateName,tempDetails);
+ }
+
+ @Then("^I verify \"([^\"]*)\" is available in templates table$")
+ public void iVerifyIsAvailableInTemplatesTable(String tempName) throws Throwable {
+ TemplateViews.verifyTempName(tempName);
+ }
+
+ @And("^I browse \"([^\"]*)\" Template file$")
+ public void iBrowseTemplateFile(String fileName) throws Throwable {
+ TemplateViews.browseAndUploadTemplateFile(fileName);
+ }
+
+ @And("^I select \"([^\"]*)\" from the drop down in create template page$")
+ public void iSelectFromTheDropDownInCreateTemplatePage(String orgName) throws Throwable {
+ TemplateViews.selectOrgInTemplatePage(orgName);
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/VMImageSteps.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/VMImageSteps.java
new file mode 100755
index 000000000..96867a374
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/steps/VMImageSteps.java
@@ -0,0 +1,43 @@
+package com.rl.qa.steps;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.SeleniumUtilities;
+import com.rl.qa.views.VMImageViews;
+import cucumber.api.java.en.And;
+import cucumber.api.java.en.Then;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+/**
+ * Created by RLE0372 on 11-08-2016.
+ */
+public class VMImageSteps {
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ private static final com.rl.qa.utils.SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ @And("^I select \"([^\"]*)\" type$")
+ public void iSelectOSType(String osType) throws Throwable {
+ VMImageViews.selectOS(osType);
+ }
+
+ @Then("^I verify created \"([^\"]*)\" in the Images table$")
+ public void iVerifyCreatedInTheImagesTable(String imageName) throws Throwable {
+ VMImageViews.verifyCreatedImage(imageName);
+ }
+
+ @Then("^I select \"([^\"]*)\" and verify assigned \"([^\"]*)\" in Images table$")
+ public void iSelectAndVerifyAssignedInImagesTable(String imageName, String imageDetail ) throws Throwable {
+ VMImageViews.verifyVMImageDetails(imageName,imageDetail);
+ }
+
+ @Then("^I select \"([^\"]*)\" and verify given \"([^\"]*)\" in Images table$")
+ public void iSelectAndVerifyGivenInImagesTable(String imageName, String imageDetail) throws Throwable {
+ VMImageViews.verifyImageId(imageName,imageDetail);
+ }
+
+ @And("^I select \"([^\"]*)\" from the select box in VMImage page$")
+ public void iSelectFromTheSelectBoxInVMImagePage(String orgName) throws Throwable {
+ VMImageViews.selectOrgInVMImagePage(orgName);
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/AjaxEnabledPageFactory.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/AjaxEnabledPageFactory.java
new file mode 100755
index 000000000..c1515cbe7
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/AjaxEnabledPageFactory.java
@@ -0,0 +1,54 @@
+package com.rl.qa.utils;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.support.PageFactory;
+import org.openqa.selenium.support.pagefactory.AjaxElementLocatorFactory;
+import org.openqa.selenium.support.pagefactory.ElementLocatorFactory;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+public class AjaxEnabledPageFactory extends PageFactory {
+ static Method instantiatePageMethod = null;
+
+ static {
+ Method[] methods = PageFactory.class.getDeclaredMethods();
+ for (Method method : methods) {
+ if (StringUtils.equals(method.getName(), "instantiatePage")) {
+ instantiatePageMethod = method;
+ instantiatePageMethod.setAccessible(true);
+ }
+ }
+ }
+
+ public static T ajaxInitElements(WebDriver driver, Class pageClassToProxy) {
+ T page = instantiatePage(driver, pageClassToProxy);
+ initElements(driver, page);
+ return page;
+ }
+
+ public static void initElements(WebDriver driver, Object page) {
+ final WebDriver driverRef = driver;
+ initElements(new AjaxElementLocatorFactory(driverRef, 10), page);
+ }
+ public static void initElements(ElementLocatorFactory factory, Object page) {
+ final ElementLocatorFactory factoryRef = factory;
+ initElements(new StaleReferenceAwareFieldDecorator(factoryRef, 3), page);
+ }
+
+ protected static T instantiatePage(WebDriver driver,
+ Class pageClassToProxy) {
+ try {
+ return (T) instantiatePageMethod.invoke(
+ AjaxEnabledPageFactory.class, driver, pageClassToProxy);
+ } catch (IllegalArgumentException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/BaseView.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/BaseView.java
new file mode 100755
index 000000000..a16d303b8
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/BaseView.java
@@ -0,0 +1,339 @@
+package com.rl.qa.utils;
+
+import com.google.common.collect.Iterables;
+import com.rl.qa.FileUtilities;
+import com.rl.qa.browsers.BrowserDriver;
+import cucumber.api.java.After;
+import cucumber.api.java.Before;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.openqa.selenium.*;
+import org.openqa.selenium.support.ui.Select;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+import java.util.logging.Logger;
+
+import static junit.framework.Assert.fail;
+
+public class BaseView {
+
+ private static final Logger logger = Logger.getLogger(BaseView.class.getName());
+ private final static int DEFAULT_TIMEOUT = 40;
+ public static String mainWindowHandle;
+ public static String genericSecondWindowHandle;
+
+
+ public static void pushShortTimeout() {
+ BrowserDriver.getCurrentDriver().manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
+ }
+
+ public static void pushShortTimeout(int intSeconds) {
+ BrowserDriver.getCurrentDriver().manage().timeouts().implicitlyWait(intSeconds, TimeUnit.SECONDS);
+ }
+
+ public static void pushMillSecTimeout(int millSec) {
+ BrowserDriver.getCurrentDriver().manage().timeouts().implicitlyWait(millSec, TimeUnit.MILLISECONDS);
+ }
+
+ public static void pushVeryShortTimeout() {
+ BrowserDriver.getCurrentDriver().manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);
+ }
+
+ public static void popDefaultTimeout() {
+ BrowserDriver.getCurrentDriver().manage().timeouts().implicitlyWait(DEFAULT_TIMEOUT, TimeUnit.SECONDS);
+ }
+
+ /**
+ * Returns true if the specified WebElement is visible, does not wait for
+ * the element.
+ */
+ public static boolean isElementPresentNoWait(WebElement we) {
+ try {
+ pushShortTimeout();
+
+ return we.isDisplayed();
+ } catch (NoSuchElementException e) {
+ return false;
+ } catch (NullPointerException e) {
+ return false;
+ } finally {
+ popDefaultTimeout();
+ }
+ }
+
+// Waits for the max time mentioned or till the element is visible and then moves to the next step - rupi
+ public static WebElement waitForElement(By by) throws InterruptedException {
+ WebElement visible = null;
+ long maxTime = 15 * 100; // time in milliseconds
+ long waitTime = 350;
+ long elapsedTime = 0;
+ do {
+ try {
+ Thread.sleep(waitTime);
+ elapsedTime += waitTime;
+ visible = BrowserDriver.getCurrentDriver().findElement(by);
+ if (!visible.isDisplayed()) {
+ visible = null;
+ } else {
+ System.out.println("element visible" + by);
+ }
+ } catch (NoSuchElementException e) {
+ System.out.println("waiting for element to be visible"+ by);
+ }
+ } while (visible == null && elapsedTime < maxTime);
+ return visible;
+ }
+
+// Selects the dropdown by the label text
+ public static void selectFromList(By by, String visibleText) {
+ Select selectNew = new Select(BrowserDriver.getCurrentDriver().findElement(by));
+ selectNew.selectByVisibleText(visibleText);
+ }
+
+ // returns the selected value in the drop down
+ protected String getSelectedTextInDropDown(By by) {
+ Select sel = new Select(BrowserDriver.getCurrentDriver().findElement(by));
+ return sel.getFirstSelectedOption().getText();
+ }
+
+ public static void clickLink(String linkText) {
+ try {
+ waitForElement(By.linkText(linkText));
+ } catch (InterruptedException e) {
+ System.out.println("Could not find link text");
+ }
+ BrowserDriver.getCurrentDriver().findElement(By.linkText(linkText)).click();
+ }
+
+ public static void switchToFrame()throws InterruptedException{
+ waitForElement(By.tagName("iframe"));
+ String iframeID = BrowserDriver.getCurrentDriver().findElement(By.tagName("iframe")).getAttribute("id");
+ BrowserDriver.getCurrentDriver().switchTo().frame(iframeID);
+ }
+
+ //this method will find the right iframe containing specific CSS element and switch to it
+ public static void switchToFrameWithField(String cssSelector)throws InterruptedException{
+ waitForElement(By.tagName("iframe"));
+ List iframeList = BrowserDriver.getCurrentDriver().findElements(By.tagName("iframe"));
+ List idList = new ArrayList();
+ //just record the iframes IDs here
+ for (WebElement we : iframeList) {
+ String iframeID = we.getAttribute("id");
+ idList.add(iframeID);
+ }
+ //have to do it in separate loop as selenium is real funny about object access
+ for (String id : idList) {
+ BrowserDriver.getCurrentDriver().switchTo().frame(id);
+ List itemList = BrowserDriver.getCurrentDriver().findElements(By.cssSelector(cssSelector));
+ if (itemList.size() > 0) {
+ break;
+ }
+ //have to go back to default frame to find next child iframe
+ BrowserDriver.getCurrentDriver().switchTo().defaultContent();
+ }
+ }
+
+ public static void takeScreenshot(String filename) {
+ File dir = new File(FileUtilities.getCWD(), "//target//screenshots");
+ dir.mkdirs();
+
+ SimpleDateFormat sdf = new SimpleDateFormat("ddMMyyyy_hhmmss");
+ Date curDate = new Date();
+ String strDate = sdf.format(curDate);
+ filename = filename.replace(".png","");
+ filename = filename + strDate+".png";
+
+ File file = new File(dir, filename);
+
+ try {
+ BrowserDriver.takeScreenshot(file);
+ System.out.format("Wrote screen shot to '%s'", file.getAbsolutePath());
+ } catch (IOException e) {
+ System.out.format("Unable to write screen shot to '%s': %s", file.getAbsolutePath(), e.getMessage());
+ }
+ }
+
+ public static void switchToFrameByTitle(String title)throws InterruptedException {
+ WebElement iframe = BrowserDriver.getCurrentDriver().findElement(By.cssSelector("iframe[title=\""+title+"\"]"));
+ BrowserDriver.getCurrentDriver().switchTo().frame( iframe );
+ }
+
+ public static void switchToSecondFrame() {
+
+ WebElement secondIframe = null;
+ List iframes = BrowserDriver.getCurrentDriver()
+ .findElements(By.cssSelector("iframe"));
+ if(CollectionUtils.isNotEmpty(iframes)) {
+
+ int i = 0;
+ for(WebElement iFrame : iframes) {
+ if(iFrame.getAttribute("title") != null && i++ == 1) {
+ secondIframe = iFrame;
+ break;
+ }
+ }
+
+ if(secondIframe == null) {
+ fail("Couldn't find second iFrame");
+ }
+
+ BrowserDriver.getCurrentDriver().switchTo().frame( secondIframe );
+
+ } else {
+ fail("There are no iFrames found");
+ }
+
+ }
+
+ /**
+ * Get's second window handle.
+ * Helpful when dealing with multiple windows
+ *
+ * @return
+ * @see BaseView#getCurrentWindowHandle()
+ */
+ public static void switchToSecondWindow() {
+ /* try {
+ Thread.sleep(4000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }*/
+// Set windowHandles = BrowserDriver.getCurrentDriver().getWindowHandles();
+// if(CollectionUtils.isNotEmpty(windowHandles)) {
+// mainWindowHandle = Iterables.get(windowHandles, 0, null);
+// String secondWindowHandle = Iterables.get(windowHandles, 1, null);
+//
+// if(StringUtils.isNotEmpty(secondWindowHandle)) {
+// BrowserDriver.getCurrentDriver().switchTo().window(secondWindowHandle);
+// BrowserDriver.getCurrentDriver().switchTo().window(secondWindowHandle).manage().window().setPosition(new Point(0, 0));
+// BrowserDriver.getCurrentDriver().switchTo().window(secondWindowHandle).manage().window().setSize(new Dimension(1500, 800));
+// } else {
+// logger.warning("There is no second browser window found");
+// }
+// }
+ for(int i=0;i<20;i++) {
+ Set windowHandles = BrowserDriver.getCurrentDriver().getWindowHandles();
+ if (CollectionUtils.isNotEmpty(windowHandles)) {
+ mainWindowHandle = Iterables.get(windowHandles, 0, null);
+ String secondWindowHandle = Iterables.get(windowHandles, 1, null);
+ genericSecondWindowHandle = secondWindowHandle;
+
+ if (StringUtils.isNotEmpty(secondWindowHandle)) {
+ BrowserDriver.getCurrentDriver().switchTo().window(secondWindowHandle);
+ BrowserDriver.getCurrentDriver().switchTo().window(secondWindowHandle).manage().window().setPosition(new Point(0, 0));
+ BrowserDriver.getCurrentDriver().switchTo().window(secondWindowHandle).manage().window().setSize(new Dimension(1500, 800));
+ return;
+ } else {
+ /* try {
+ Thread.sleep(100);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }*/
+ logger.warning(i + " : There is no second browser window found");
+ }
+ }
+ }
+ }
+
+
+ public boolean switchToSecondWindow(int counter) {
+ boolean flag = false;
+ for(int i=0;i windowHandles = BrowserDriver.getCurrentDriver().getWindowHandles();
+ if (CollectionUtils.isNotEmpty(windowHandles)) {
+ mainWindowHandle = Iterables.get(windowHandles, 0, null);
+ String secondWindowHandle = Iterables.get(windowHandles, 1, null);
+
+ if (StringUtils.isNotEmpty(secondWindowHandle)) {
+ BrowserDriver.getCurrentDriver().switchTo().window(secondWindowHandle);
+ BrowserDriver.getCurrentDriver().switchTo().window(secondWindowHandle).manage().window().setPosition(new Point(0, 0));
+ BrowserDriver.getCurrentDriver().switchTo().window(secondWindowHandle).manage().window().setSize(new Dimension(1500, 800));
+ flag = true;
+ } else {
+ logger.warning("There is no second browser window found");
+ }
+ }
+ }
+ return flag;
+ }
+
+ public static void switchToSecondWindowToClose() {
+ /* try {
+ Thread.sleep(4000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }*/
+ Set windowHandles = BrowserDriver.getCurrentDriver().getWindowHandles();
+ if(CollectionUtils.isNotEmpty(windowHandles)) {
+ mainWindowHandle = Iterables.get(windowHandles, 0, null);
+ String secondWindowHandle = Iterables.get(windowHandles, 1, null);
+
+ if(StringUtils.isNotEmpty(secondWindowHandle)) {
+ BrowserDriver.getCurrentDriver().switchTo().window(secondWindowHandle).close();
+ } else {
+ logger.warning("There is no second browser window found");
+ }
+ }
+ }
+
+ public static void switchToThirdWindowToClose() {
+ /* try {
+ Thread.sleep(4000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }*/
+ Set windowHandles = BrowserDriver.getCurrentDriver().getWindowHandles();
+ if(CollectionUtils.isNotEmpty(windowHandles)) {
+ mainWindowHandle = Iterables.get(windowHandles, 0, null);
+ String thirdWindowHandle = Iterables.get(windowHandles, 2, null);
+
+ if(StringUtils.isNotEmpty(thirdWindowHandle)) {
+ BrowserDriver.getCurrentDriver().switchTo().window(thirdWindowHandle).close();
+ } else {
+ logger.warning("There is no second browser window found");
+ }
+ }
+ }
+
+ /**
+ * Get's current window handle.
+ * Helpful when dealing with multiple windows
+ *
+ * @return
+ * @see BaseView#switchToSecondWindow()
+ */
+ public static String getCurrentWindowHandle() {
+
+ return BrowserDriver.getCurrentDriver().getWindowHandle();
+ }
+
+
+ public static void switchToThirdWindow() {
+ BrowserDriver.getCurrentDriver().switchTo().window(BaseView.mainWindowHandle);
+ for(int i=0;i<20;i++) {
+ Set windowHandles = BrowserDriver.getCurrentDriver().getWindowHandles();
+ if (CollectionUtils.isNotEmpty(windowHandles)) {
+ mainWindowHandle = Iterables.get(windowHandles, 0, null);
+ String thirdWindowHandle = Iterables.get(windowHandles, 2, null);
+
+ if (StringUtils.isNotEmpty(thirdWindowHandle)) {
+ BrowserDriver.getCurrentDriver().switchTo().window(thirdWindowHandle);
+ BrowserDriver.getCurrentDriver().switchTo().window(thirdWindowHandle).manage().window().setPosition(new Point(0, 0));
+ BrowserDriver.getCurrentDriver().switchTo().window(thirdWindowHandle).manage().window().setSize(new Dimension(1500, 800));
+ return;
+ } else {
+ logger.warning(i + " : There is no third browser window found");
+ }
+ }
+ }
+ }
+
+
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/CucumberContext.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/CucumberContext.java
new file mode 100755
index 000000000..ffdbb6fb5
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/CucumberContext.java
@@ -0,0 +1,434 @@
+package com.rl.qa.utils;
+
+import com.google.common.collect.ImmutableMap;
+import com.rl.qa.browsers.BrowserType;
+import org.apache.commons.lang.NotImplementedException;
+import org.apache.http.auth.Credentials;
+import org.junit.Assert;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.HashMap;
+import java.util.Properties;
+import java.util.logging.Logger;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import static com.google.common.base.Strings.isNullOrEmpty;
+import static junit.framework.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+//import sun.reflect.generics.reflectiveObjects.NotImplementedException;
+
+/**
+ * Manages test execution context by providing properties that define:
+ * 1) IWMS url
+ * 2) IWMS authentication credentials
+ * 3) WEB Browser (e.g. Firefox)
+ * 4) Selenium HUB url if remote browser specified
+ * 5) Anything else a test case wants to share
+ *
+ * The property values originate from one of three sources:
+ * 1) Environment variables
+ * 2) JVM properties
+ * 3) Currently active maven profile
+ *
+ * The 1st place a given property is defined takes precedence over the other
+ * sources.
+ *
+ * The following is the set of properties that can be defined via the above
+ * mentioned three sources:
+ *
+ * Property Purpose Example
+ * ------------- ---------------- ----------------------------
+ * browser Browser to use REMOTE_FIREFOX
+ * selenium.hub Selenium HUB url http://127.0.0.1:4444/wd/hub
+ * iwms.url IWMS web-ui url http://test.lucernex.com
+ * iwms.username IWMS username rootDev
+ * iwms.password IWMS password not-going-to-say
+ * iwms.firm IWMS firm name QA
+ *
+ * So for example if you wanted to override the firm name that is specified
+ * by the maven profile you could use this JVM execution argument:
+ *
+ * -Diwms.firm=whatever
+ *
+ * Note: if you specify one of the remote browsers (e.g. REMOTE_FIREFOX), then you
+ * must also provide a value for the selenium.hub property as that is where
+ * the remote browser is expected to be.
+ */
+public class CucumberContext extends HashMap {
+ private static final Logger logger = Logger.getLogger(CucumberContext.class.getName());
+
+ // The properties file that defines the IWMS url and credentials.
+ private static final String LX_SELENIUM_RESOURCE = "lx-selenium.properties";
+
+ // Map key for Credentials object.
+ public static final String CREDENTIALS = "credentials";
+
+ // Property name (JVM and environment variable) for Selenium HUB URL to use.
+ public static final String SELENIUM_HUB = "selenium.hub";
+
+ // Property name (JVM, environment variable, and lx-selenium.properties) for name of web-browser to use.
+ public static final String BROWSER = "browser";
+
+ // Property name (JVM, environment variable, and lx-selenium.properties) for URL of IWMS web-ui.
+ public static final String IWMS_URL = "iwms.url";
+
+ // Property name (JVM, environment variable, and lx-selenium.properties) for IWMS username.
+ public static final String IWMS_USERNAME = "iwms.username";
+
+ // Property name (JVM, environment variable, and lx-selenium.properties) for IWMS password.
+ public static final String IWMS_PASSWORD = "iwms.password";
+
+ // Property name (JVM, environment variable, and lx-selenium.properties) for IWMS firm.
+ public static final String IWMS_FIRM = "iwms.firm";
+
+ // Property name of member's DateFormat (cache of getSessionDateFormat() call).
+ public static String SESSION_DATE_FORMAT = "DateFormat";
+
+ // Property name of member's NumberFormat (cache of getSessionNumberFormat() call).
+ public static String SESSION_NUMBER_FORMAT = "NumberFormat";
+
+ // Property name of member's Locale (cache of getSessionNumberFormat() call).
+ public static String SESSION_LOCALE = "Locale";
+
+ private static final ThreadLocal cucumberThreadLocal = new ThreadLocal() {
+ protected CucumberContext initialValue() {
+ return new CucumberContext();
+ }
+ };
+
+ public static URL getURL() {
+ return (URL)getCucumberContext().get(IWMS_URL);
+ }
+
+ public static String getUserName() {
+ return (String)getCucumberContext().get(IWMS_USERNAME);
+ }
+
+ public static String getPassword() {
+ return (String)getCucumberContext().get(IWMS_PASSWORD);
+ }
+
+ private static URL handleURLProperty(String name, String value) {
+ // Assert.assertNotNull(String.format("Required property '%s' not specified", name), value);
+
+ try {
+ URL url = new URL(value);
+
+ getCucumberContext().put(name, url);
+
+ return url;
+ } catch (MalformedURLException e) {
+ String msg2 = String.format(
+ "Property '%s' specifies an invalid URL '%s': %s",
+ name,
+ value,
+ e.getMessage()
+ );
+
+ fail(msg2);
+
+ return null; // will never happen due to fail() call above.
+ }
+ }
+
+ private static void handleBrowserProperty(String value) {
+ Assert.assertNotNull("Required property 'browser' not specified", value);
+
+ BrowserType browserType;
+
+ try {
+ browserType = BrowserType.fromString(value);
+ } catch (IllegalArgumentException e) {
+ browserType = BrowserType.FIREFOX;
+ }
+
+ getCucumberContext().put(BROWSER, browserType);
+ }
+
+ /**
+ * Returns the value of the specified property by consulting three sources:
+ * Environment, JVM Property, and maven props in that order (1st one wins).
+ *
+ * @param props - properties as supplied by current maven profile (can be null)
+ * @param name - name of desired property
+ */
+ private static String getPropertyValue(Properties props, String name) {
+ String value = System.getenv(name);
+
+ if (!isNullOrEmpty(value)) {
+ logger.info(String.format("Property [%s] value [%s] set by environment variable", name, value));
+ return value;
+ }
+
+ value = System.getProperty(name);
+
+ if (!isNullOrEmpty(value)) {
+ logger.info(String.format("Property [%s] value [%s] set by system property", name, value));
+ return value;
+ }
+
+ if (props != null) {
+ value = props.getProperty(name);
+ if (!name.equals("iwms.password") || value.startsWith("DES:")) {
+ logger.info(String.format("Property [%s] value [%s] set by maven profile", name, value));
+ }
+ }
+
+ return value;
+ }
+
+ /**
+ * Returns the value of the specified property by consulting two sources:
+ * Environment and JVM Property in that order (1st one wins).
+ *
+ * @param name - name of desired property
+ */
+ private static String getPropertyValue(String name) {
+ return getPropertyValue(null, name);
+ }
+
+ /**
+ * Lazy load the properties as defined by the 'lx-selenium.properties' file
+ * with optional JVM overrides.
+ */
+// private static void loadIWMSProperties() {
+// if (getCucumberContext().get(IWMS_URL) == null) {
+// InputStream in = "";//Credentials.class.getClassLoader().getResourceAsStream(LX_SELENIUM_RESOURCE);
+//
+// assertNotNull("Resource '" + LX_SELENIUM_RESOURCE + "' not found in classpath!", in);
+//
+// try {
+// Properties props = new Properties();
+// String username = null;
+// String password = null;
+// String firmname = null;
+//
+// props.load(in);
+//
+// for (Object key : props.keySet()) {
+// String name = (String)key;
+//
+// if (IWMS_URL.equals(name)) {
+// handleURLProperty(name, getPropertyValue(props, IWMS_URL));
+// } else if (BROWSER.equals(name)) {
+// handleBrowserProperty(getPropertyValue(props, BROWSER));
+// } else if (IWMS_USERNAME.equals(name)) {
+// username = getPropertyValue(props, IWMS_USERNAME);
+// } else if (IWMS_PASSWORD.equals(name)) {
+// password = getPropertyValue(props, IWMS_PASSWORD);
+// } else if (IWMS_FIRM.equals(name)) {
+// firmname = getPropertyValue(props, IWMS_FIRM);
+// } else {
+// logger.warning(String.format("Ignoring unexpected property '%s'", name));
+// }
+// }
+//
+// Assert.assertNotNull(
+// String.format("Required property '%s' not defined!", IWMS_USERNAME),
+// username
+// );
+// Assert.assertNotNull(
+// String.format("Required property '%s' not defined!", IWMS_PASSWORD),
+// password
+// );
+// Assert.assertNotNull(
+// String.format("Required property '%s' not defined!", IWMS_FIRM),
+// firmname
+// );
+//
+// handleCredentials(username, password, firmname);
+// try {
+// SESSION_LOCALE=getLocaleByUserName(username, "Language");
+// SESSION_NUMBER_FORMAT=getLocaleByUserName(username, "NumberPattern");
+// SESSION_DATE_FORMAT=getLocaleByUserName(username, "DatePattern");
+// } catch (Exception e) {
+// e.printStackTrace();
+// }
+// } catch (IOException e) {
+// String msg = String.format(
+// "Unable to load '%s' from classpath: %s",
+// LX_SELENIUM_RESOURCE,
+// e.getMessage()
+// );
+//
+// fail(msg);
+// } finally {
+// try {
+// in.close();
+// } catch (IOException e) {
+// // ignore
+// }
+// }
+// }
+// }
+
+ /**
+ * Returns the thread local that represents the current state of the executing
+ * BDD Scenario.
+ */
+ public static CucumberContext getCucumberContext() {
+ return cucumberThreadLocal.get();
+ }
+
+ /**
+ * Returns the desired Selenium HUB URL if defined otherwise null.
+ */
+ public static URL getSeleniumHub() {
+ URL url = (URL)getCucumberContext().get(SELENIUM_HUB);
+
+ if (url != null) {
+ return url;
+ }
+
+ String seleniumHub = getPropertyValue(SELENIUM_HUB);
+
+ if (isNullOrEmpty(seleniumHub)) {
+ return null;
+ }
+
+ return handleURLProperty(SELENIUM_HUB, seleniumHub);
+ }
+
+ /**
+ * Returns the desired type of web browser.
+ */
+ public static BrowserType getBrowserType() {
+ loadIWMSProperties();
+ return (BrowserType)getCucumberContext().get(BROWSER);
+ }
+
+ private static void loadIWMSProperties() {
+ if (getCucumberContext().get(IWMS_URL) == null) {
+ InputStream in = Credentials.class.getClassLoader().getResourceAsStream(LX_SELENIUM_RESOURCE);
+
+ assertNotNull("Resource '" + LX_SELENIUM_RESOURCE + "' not found in classpath!", in);
+
+ try {
+ Properties props = new Properties();
+ String username = null;
+ String password = null;
+ String firmname = null;
+
+ props.load(in);
+
+ for (Object key : props.keySet()) {
+ String name = (String)key;
+
+ if (IWMS_URL.equals(name)) {
+ handleURLProperty(name, getPropertyValue(props, IWMS_URL));
+ } else if (BROWSER.equals(name)) {
+ handleBrowserProperty(getPropertyValue(props, BROWSER));
+ } else if (IWMS_USERNAME.equals(name)) {
+ username = getPropertyValue(props, IWMS_USERNAME);
+ } else if (IWMS_PASSWORD.equals(name)) {
+ password = getPropertyValue(props, IWMS_PASSWORD);
+ } else {
+ logger.warning(String.format("Ignoring unexpected property '%s'", name));
+ }
+ }
+
+ Assert.assertNotNull(
+ String.format("Required property '%s' not defined!", IWMS_USERNAME),
+ username
+ );
+ Assert.assertNotNull(
+ String.format("Required property '%s' not defined!", IWMS_PASSWORD),
+ password
+ );
+
+ } catch (IOException e) {
+ String msg = String.format(
+ "Unable to load '%s' from classpath: %s",
+ LX_SELENIUM_RESOURCE,
+ e.getMessage()
+ );
+
+ fail(msg);
+ } finally {
+ try {
+ in.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ }
+ }
+
+ /**
+ * Returns the IWMS base URL.
+ */
+// public static URL getURL() {
+// loadIWMSProperties();
+//
+// return (URL)getCucumberContext().get(IWMS_URL);
+// }
+
+ /**
+ * Returns the IWMS authentication credentials.
+ */
+// public static Credentials getCredentials() {
+// loadIWMSProperties();
+//
+// return (Credentials)getCucumberContext().get(CREDENTIALS);
+// }
+
+ private static Pattern isoREGEX;
+
+ /**
+ * Returns true if the specified string matches the XML ISO date-time pattern.
+ *
+ * @param ts - sample timestamp string to classify
+ */
+ public static boolean isISOFormatted(String ts) {
+ if (ts == null) {
+ return false;
+ }
+
+ /* Lucernex ISO format:
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T05:00:00.000Z'");
+
+ try {
+ sdf.parse(ts);
+ return true;
+ } catch (ParseException e) {
+ return false;
+ }
+ */
+
+ if (isoREGEX == null) {
+ isoREGEX = Pattern.compile(
+ "^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"
+ );
+ }
+
+ synchronized (isoREGEX) {
+ Matcher m = isoREGEX.matcher(ts);
+
+ if (m.find()) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ // Map of Member's LANG vs DateFormat
+ private static final ImmutableMap LANG_TO_DATEFORMAT =
+ new ImmutableMap.Builder()
+ .put("en", new SimpleDateFormat("MM/dd/yyyy"))
+ .build();
+
+ /**
+ * Revert authentication to initial user.
+ */
+ public static void revertUser() {
+ throw new NotImplementedException();
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/ForceWaitForItem.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/ForceWaitForItem.java
new file mode 100755
index 000000000..be8577d30
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/ForceWaitForItem.java
@@ -0,0 +1,16 @@
+package com.rl.qa.utils;
+
+/**
+ * Created by RLE0097 on 4/20/2015.
+ */
+public class ForceWaitForItem {
+ public static void delay(int intMilliSeconds){
+ try {
+ int waitTime=intMilliSeconds;
+ Thread.sleep(waitTime);
+ //SeleniumUtilities.Log.info("Wait :" + waitTime + " Milli Seconds\n");
+ } catch (Exception e) {
+ SeleniumUtilities.Log.error("Error :"+e.getMessage());
+ }
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/SeleniumUtilities.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/SeleniumUtilities.java
new file mode 100755
index 000000000..afc7e0c66
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/SeleniumUtilities.java
@@ -0,0 +1,2730 @@
+package com.rl.qa.utils;
+
+import com.rl.qa.browsers.BrowserDriver;
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import org.apache.log4j.Logger;
+import org.openqa.selenium.*;
+import org.openqa.selenium.interactions.Actions;
+import org.openqa.selenium.support.ui.*;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.NoSuchElementException;
+import java.util.concurrent.TimeUnit;
+
+import static com.rl.qa.utils.CucumberContext.getCucumberContext;
+import static junit.framework.Assert.fail;
+import static org.openqa.selenium.support.ui.ExpectedConditions.*;
+
+/**
+ * Commonly used Framework Function libraries
+ *
+ */
+public class SeleniumUtilities {
+ public static int OBJWAITTIMEOUT = 10;
+ public static int WEBDRIVER_WAIT = 60;
+ public static int WEBDRIVER_WAIT_SMALL = 30;
+ public static int DEFAULT_TIMEOUT_IN_SECONDS = 50, DEFAULT_SLEEP_TIME_IN_SECONDS = 50, WAIT_TIME = 50;
+ public static Logger Log = Logger.getLogger(Logger.class.getName());
+ public static Properties objProp;
+
+ String parentBrowser = null;
+ private static final String DATE_FORMAT = "MM/dd/yyyy";
+ private static DateFormat formatter = new SimpleDateFormat(DATE_FORMAT);
+ Map map = new HashMap();
+ Integer count;
+ public static Properties GTKey = new Properties();
+
+ private int waitTime = 4;
+ private WebDriver driver;
+
+
+ public enum Locators {
+ xpath, id, name, classname, paritallinktext, linktext, tagname, cssselector
+ }
+
+ //WebElement el = seleniumUtil.getWebElementObject("div[id^=Covenant_CodeCovenantGroupID]", "cssSelector");
+
+
+ public void editableField(String locator, String element, String value, int timeout) throws Exception {
+ //WebElement el = seleniumUtil.getWebElementObject("div[id^=Covenant_CodeCovenantGroupID]", "cssSelector");
+ BaseView.pushShortTimeout();
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ Actions action = new Actions(driver);
+ action.click(ele).sendKeys(value).perform();
+ Log.info("Typing text '" + value + "' into text field ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+
+
+ public void editableClick(String locator, String element, int timeout) throws Exception {
+ //WebElement el = seleniumUtil.getWebElementObject("div[id^=Covenant_CodeCovenantGroupID]", "cssSelector");
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+// Actions action = new Actions(driver);
+// action.click(ele).perform();
+
+ Actions builder = new Actions(driver);
+
+ builder.moveToElement(ele);
+ builder.click();
+ builder.build().perform();
+
+ Log.info("Clicking on field ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+
+
+ public static WebElement findElementWithTimeout(final By by, final long timeOut) throws InterruptedException {
+ Wait wait = new FluentWait(BrowserDriver.getCurrentDriver())
+ .withTimeout(timeOut, TimeUnit.SECONDS)
+ .pollingEvery(500l, TimeUnit.MILLISECONDS)
+ .ignoring(NoSuchElementException.class)
+ .ignoring(StaleElementReferenceException.class);
+
+ try {
+ return wait.until(presenceOfElementLocated(by));
+ } catch (TimeoutException te) {
+ throw new InterruptedException(te.getMessage());
+ }
+ }
+
+ public void dragAndDropElement(String fromElementLocator, String fromElement, String targetElementLocator, String targetElement) throws Exception {
+ try {
+ WebElement fromEle = getWebElementObject(fromElementLocator, fromElement);
+ WebElement targetEle = getWebElementObject(targetElementLocator, targetElement);
+ Actions builder = new Actions(driver);
+ builder.moveToElement(fromEle).build().perform();
+ builder.dragAndDrop(fromEle, targetEle).build().perform();
+ /* Action dragAndDrop = builder.clickAndHold(fromEle)
+ .moveToElement(targetEle)
+ .release(targetEle)
+ .build();
+ dragAndDrop.perform();*/
+
+ Log.info("Drag and drop of " + fromElement + " field is successful");
+ } catch (Exception ex) {
+ Log.error("Error Message :" + ex.getMessage());
+ }
+ }
+
+
+ public void dragAndDropElementXYOffSet(String fromElementLocator, String fromElement, int xOffset, int yOffset) throws Exception {
+ try {
+ WebElement fromEle = getWebElementObject(fromElementLocator, fromElement);
+ Actions builder = new Actions(driver);
+ builder.moveToElement(fromEle).perform();
+ builder.dragAndDropBy(fromEle, xOffset, yOffset).build().perform();
+
+ Log.info("Drag and drop of " + fromElement + " field is successful");
+ } catch (Exception ex) {
+ Log.error("Error Message :" + ex.getMessage());
+ }
+ }
+
+ public void rightClickSelectMenuOption(String locator, String element, String menuOptionLink) throws Exception {
+ try {
+ WebElement ele = getWebElementObject(locator, element);
+ Actions oAction = new Actions(driver);
+ oAction.moveToElement(ele);
+ for (int i = 0; i < 10; i++) {
+ /* this will perform right click */
+ oAction.contextClick(ele).build().perform();
+ try {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), 5);
+ wait.until(visibilityOfElementLocated(By.cssSelector("div#folderMenu-body")));
+
+ break;
+ } catch (Exception e) {
+ }
+ }
+ driver.findElement(By.linkText(menuOptionLink)).click();
+ /*WebElement elementOpen = driver.findElement(By.linkText(menuOptionLink)); *//*This will select menu after right click *//*
+ elementOpen.click();*/
+ Log.info("Performed right click on menu option to select : " + menuOptionLink + " '" + locator + "=" + element + "'");
+ } catch (Exception ex) {
+ Exception error = new Exception(element);
+ Log.error("Does not performed right click on menu option to select : " + menuOptionLink + " '" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+
+ public void rightClickSelectMenuOption(String locator, String element, String menuLocator, String menuElement) throws Exception {
+ try {
+ WebElement ele = getWebElementObject(locator, element);
+ Actions oAction = new Actions(driver);
+ oAction.moveToElement(ele);
+ for (int i = 0; i < 10; i++) {
+ /* this will perform right click */
+ oAction.contextClick(ele).build().perform();
+ try {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), 5);
+ wait.until(visibilityOfElementLocated(By.id("mainMenu-innerCt")));
+
+ break;
+ } catch (Exception e) {
+ }
+ }
+ click(menuLocator, menuElement, SeleniumUtilities.OBJWAITTIMEOUT);
+
+ Log.info("Performed right click on menu option to select : " + locator + "=" + element + "'");
+ } catch (Exception ex) {
+ Exception error = new Exception(element);
+ Log.error("Does not performed right click on menu option to select : " + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+
+ public void rightClickSelectMenuOption(WebElement ele, String menuOptionLink) throws Exception {
+ try {
+ Actions oAction = new Actions(driver);
+ oAction.moveToElement(ele);
+ oAction.contextClick(ele).build().perform();
+ driver.findElement(By.linkText(menuOptionLink)).click();
+ Log.info("Performed right click on menu option to select : " + menuOptionLink + " '" + ele.getText());
+ } catch (Exception ex) {
+ Exception error = new Exception(ele.getText());
+ Log.error("Does not performed right click on menu option to select : " + menuOptionLink + " '" + ele.getText());
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+
+ public void rightClickSelectMenuOption(WebElement ele, String strMovemenuOptionLink, String menuOptionLink) throws Exception {
+ int count = 0;
+ do {
+ count++;
+ try {
+ Actions oAction = new Actions(driver);
+ oAction.moveToElement(ele);
+ oAction.contextClick(ele).build().perform();
+
+ WebElement mvEle = driver.findElement(By.linkText(strMovemenuOptionLink));
+ Actions mvAction = new Actions(driver);
+ mvAction.moveToElement(mvEle);
+ mvAction.click(mvEle).build().perform();
+
+ WebElement menuOpEle = driver.findElement(By.linkText(menuOptionLink));
+ Actions menuOpAction = new Actions(driver);
+ menuOpAction.moveToElement(menuOpEle).build().perform();
+
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), 5);
+ wait.until(presenceOfElementLocated(By.xpath("//span[text()='" + menuOptionLink + "'][contains(@class,'x-menu-item-text')]")));
+ driver.findElement(By.xpath("//span[text()='" + menuOptionLink + "'][contains(@class,'x-menu-item-text')]")).click();
+ mvAction.doubleClick(driver.findElement(By.xpath("//span[text()='" + menuOptionLink + "'][contains(@class,'x-menu-item-text')]")));
+ BaseView.pushShortTimeout();
+ if (!(BrowserDriver.getCurrentDriver().findElements(By.xpath("//span[text()='" + menuOptionLink + "'][contains(@class,'x-menu-item-text')]")).size() > 0)) {
+ break;
+ }
+ Log.info("Performed right click on menu option to select : " + menuOptionLink + " '" + ele.getText());
+ } catch (Exception ex) {
+
+ if (count == 9) {
+ Exception error = new Exception(ele.getText());
+ Log.error("Does not performed right click on menu option to select : " + menuOptionLink + " '" + ele.getText());
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ BaseView.popDefaultTimeout();
+ throw error;
+ }
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ } while (count < 10);
+
+ }
+
+ public Boolean rightClickVerifyMenuOption(WebElement ele, String strMovemenuOptionLink, String menuOptionLink) throws Exception {
+ Boolean flag = false;
+ try {
+ Actions oAction = new Actions(driver);
+ oAction.moveToElement(ele);
+ oAction.contextClick(ele).build().perform();
+
+ WebElement mvEle = driver.findElement(By.linkText(strMovemenuOptionLink));
+ Actions mvAction = new Actions(driver);
+ mvAction.moveToElement(mvEle);
+ mvAction.click(mvEle).build().perform();
+
+ try {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), 5);
+ //wait.until(ExpectedConditions.presenceOfElementLocated(By.linkText(menuOptionLink)));
+ wait.until(presenceOfElementLocated(By.xpath("//span[text()='" + menuOptionLink + "'][contains(@class,'x-menu-item-text')]")));
+ flag = true;
+ } catch (Exception ex) {
+ flag = false;
+ }
+
+ try {
+ WebElement escpmvEle = driver.findElement(By.linkText(strMovemenuOptionLink));
+ Actions escpmvAction = new Actions(driver);
+ escpmvAction.moveToElement(escpmvEle);
+ escpmvAction.sendKeys(Keys.ESCAPE).build().perform();
+ } catch (Exception ex) {
+ }
+ Log.info("Performed right click on menu option to verify : " + menuOptionLink + " '" + ele.getText());
+ return flag;
+ } catch (Exception ex) {
+ Exception error = new Exception(ele.getText());
+ Log.error("Does not performed right click on menu option to verify : " + menuOptionLink + " '" + ele.getText());
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+
+ public void dblClick(String locator, String element, int OBJWAITTIMEOUT) throws Exception {
+ try {
+ WebElement ele = getWebElementObject(locator, element);
+ Actions oAction = new Actions(driver);
+ oAction.moveToElement(ele);
+ oAction.doubleClick(ele).build().perform(); /* this will perform dbl click */
+ Log.info("Performed double click on element : " + "'" + locator + "=" + element + "'");
+ } catch (Exception ex) {
+ Exception error = new Exception(element);
+ Log.error("Does not performed double click on element : " + " '" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+
+ public void doubleClickElement(WebElement element) throws Exception {
+ try {
+ BrowserDriver.waitForElement(element);
+ Actions oAction = new Actions(driver);
+ oAction.moveToElement(element);
+ oAction.doubleClick(element).build().perform(); /* this will perform dbl click */
+ Log.info("Performed double click on element : " + "'" + "=" + element + "'");
+ } catch (Exception ex) {
+ Log.error("Does not performed double click on element : " + "='" + element + "'");
+ //fail("Does not performed double click on element : "+"='"+element+"'"+"\n"+ex.getMessage());
+ }
+ }
+
+ public void sendEnterKeyToElement(WebElement element) throws Exception {
+ try {
+ BrowserDriver.waitForElement(element);
+ Actions oAction = new Actions(driver);
+ oAction.moveToElement(element);
+ oAction.sendKeys(element, Keys.ENTER).build().perform(); /* this will perform dbl click */
+ Log.info("Performed enter on element : " + "'" + "=" + element + "'");
+ } catch (Exception ex) {
+ Log.error("Does not performed double click on element : " + "='" + element + "'");
+ //fail("Does not performed double click on element : "+"='"+element+"'"+"\n"+ex.getMessage());
+ }
+ }
+
+
+ public void dblClickSendKey(String locator, String element, String txtBoxLocator, String txtBoxElement, String strValue, int OBJWAITTIMEOUT) throws Exception {
+ try {
+ WebElement ele = getWebElementObject(locator, element);
+ Actions oAction = new Actions(driver);
+ oAction.moveToElement(ele);
+ oAction.doubleClick(ele).build().perform(); /* this will perform dbl click */
+
+ WebElement txtBoxele = getWebElementObject(txtBoxLocator, txtBoxElement);
+ txtBoxele.clear();
+ Actions txtBoxAction = new Actions(driver);
+ txtBoxAction.moveToElement(txtBoxele);
+ txtBoxAction.sendKeys("").sendKeys(strValue).sendKeys(Keys.ENTER).build().perform();
+
+ Log.info("Performed double click on element and entered the value in text box: " + "'" + locator + "=" + element + "'" + "'" + strValue + "'");
+ } catch (Exception ex) {
+ Exception error = new Exception(element);
+ Log.error("Does not performed double click on element : " + " '" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+
+ public boolean verifyDataInTableColumns(WebElement ele, String strLabelName, String strValue) throws Exception {
+ int col_num = 0, matchIndex = 0;
+ boolean flag = false;
+ List tableRows = ele.findElements(By.xpath("./tbody/tr"));
+
+ for (WebElement trElement : tableRows) {
+ List Cols = trElement.findElements(By.tagName("td"));
+ for (WebElement tdElement : Cols) {
+ col_num++;
+ if (tdElement.getText().trim().contains(strLabelName)) {
+ matchIndex = col_num + 1;
+ } else if (matchIndex == col_num) {
+// String colValue = tdElement.getText().trim();
+// if (colValue.contains(",")) {
+// colValue = colValue.replace(",", "");
+// }
+// if (colValue.contains("$")) {
+// colValue = colValue.replace("$", "");
+// }
+// if (colValue.contains(".")) {
+// colValue = colValue.replace(".", "");
+// }
+// if (colValue.contains("%")) {
+// colValue = colValue.replace("%", "");
+// }
+//
+// if (strValue.contains(",")) {
+// strValue = strValue.replace(",", "");
+// }
+// if (strValue.contains("$")) {
+// strValue = strValue.replace("$", "");
+// }
+// if (strValue.contains(".")) {
+// strValue = strValue.replace(".", "");
+// }
+// if (strValue.contains("%")) {
+// strValue = strValue.replace("%", "");
+// }
+ String colValue = replaceSpecialChar(tdElement.getText().trim());
+ strValue = replaceSpecialChar(strValue.trim());
+
+ if (colValue.contains(strValue) || strValue.contains(colValue) || colValue.equalsIgnoreCase(strValue)) {
+ matchIndex = 0;
+ Log.info(" Expected value :" + strLabelName + " - " + strValue + "- value exist :" + tdElement.getText().trim());
+ flag = true;
+ return flag;
+ } else {
+ Log.error(" Expected value :" + strLabelName + " - " + strValue + "- value exist :" + tdElement.getText().trim());
+ flag = false;
+ return flag;
+ }
+ }
+ }
+ }
+ if (flag == false)
+ Log.error("Value does not exist: " + strLabelName + " : " + strValue);
+ return flag;
+ }
+
+// public boolean verifyRowPairValueData(WebElement ele, String strLabelName, String strValue) throws Exception {
+// int col_num = 0, matchIndex = 0;
+// boolean flag = false;
+// List tableRows = ele.findElements(By.xpath("./tbody/tr"));
+//
+// for (WebElement trElement : tableRows) {
+// List Cols = trElement.findElements(By.tagName("td"));
+// for (WebElement tdElement : Cols) {
+// col_num++;
+// if (tdElement.getText().trim().contains(strLabelName)) {
+// matchIndex = col_num + 1;
+// } else if (matchIndex == col_num) {
+// String colValue = replaceSpecial(tdElement.getText().trim());
+// strValue = replaceSpecial(strValue.trim());
+//
+// if (colValue.contains(strValue) || strValue.contains(colValue) || colValue.equalsIgnoreCase(strValue)) {
+// matchIndex = 0;
+// Log.info(" Expected value :" + strLabelName + " - " + strValue + "- value exist :" + tdElement.getText().trim());
+// flag = true;
+// return flag;
+// } else {
+// Log.error(" Expected value :" + strLabelName + " - " + strValue + "- value exist :" + tdElement.getText().trim());
+// flag = false;
+// return flag;
+// }
+// }
+// }
+// }
+// if (flag == false)
+// Log.error("Value does not exist: " + strLabelName + " : " + strValue);
+// return flag;
+// }
+
+ public String replaceSpecialChar(String strData) {
+ if (strData.contains(",")) {
+ strData = strData.replace(",", "");
+ }
+ if (strData.contains("'")) {
+ strData = strData.replace("'", "");
+ }
+ if (strData.contains("$")) {
+ strData = strData.replace("$", "");
+ }
+ if (strData.contains(".")) {
+ strData = strData.replace(".", "");
+ }
+ if (strData.contains("%")) {
+ strData = strData.replace("%", "");
+ }
+ if (strData.equalsIgnoreCase("false")) {
+ strData = "No/off/false";
+ }
+ if (strData.equalsIgnoreCase("true")) {
+ strData = "Yes/on/true";
+ }
+
+ if (strData.equals("Yes")) {
+ strData = "true";
+ }
+ if (strData.equals("No")) {
+ strData = "false";
+ }
+ return strData;
+ }
+
+ public boolean verifyDataInTableColumn(WebElement ele, String strLabelName, String strValue) throws Exception {
+ boolean flag = false;
+ List tableRows = ele.findElements(By.xpath("./tbody/tr"));
+ for (WebElement trElement : tableRows) {
+ List Cols = trElement.findElements(By.tagName("td"));
+ for (WebElement tdElement : Cols) {
+ if (tdElement.getText().trim().contains((strLabelName + " " + strValue))) {
+ Log.info(" Expected value " + strLabelName + " : " + strValue + "- Value exist " + tdElement.getText().trim());
+ flag = true;
+ return flag;
+ }
+ }
+ }
+ if (flag == false)
+ Log.error("Value does not exist: " + strLabelName + " : " + strValue);
+ return flag;
+ }
+
+
+ public boolean verifySplitDataInTableColumns(WebElement ele, String strLabelName, String strValue) throws Exception {
+ int col_num = 0, matchIndex = 0;
+ boolean flag = false;
+ List tableRows = ele.findElements(By.xpath("./tbody/tr"));
+
+ for (WebElement trElement : tableRows) {
+ List Cols = trElement.findElements(By.tagName("td"));
+ for (WebElement tdElement : Cols) {
+ col_num++;
+ if (tdElement.getText().trim().contains(strLabelName)) {
+ matchIndex = col_num + 1;
+ } else if (matchIndex == col_num) {
+ if (tdElement.getText().trim().contains(strValue)) {
+ matchIndex = 0;
+ Log.info(" Expected value :" + strLabelName + " - " + strValue + "- value exist :" + tdElement.getText().trim());
+ flag = true;
+ return flag;
+ } else {
+ Log.error(" Expected value :" + strLabelName + " - " + strValue + "- value exist :" + tdElement.getText().trim());
+ flag = false;
+ return flag;
+ }
+ }
+ }
+ }
+ if (flag == false)
+ Log.error("Value does not exist: " + strLabelName + " : " + strValue);
+ return flag;
+ }
+
+ public boolean verifyDataInTableRow(WebElement ele, String strLabelName, String strValue) throws Exception {
+ int col_num = 0, matchIndex = 0;
+ boolean flag = false;
+
+ //Fetching web elemnts using the below xpath hanging inconsistently
+ //List tableRows = ele.findElements(By.xpath("./tbody/tr"));
+ List tableRows = ele.findElements(By.cssSelector("tbody>tr"));
+
+ for (WebElement trElement : tableRows) {
+ /* if((replaceSpecialChar(trElement.getText()).trim().contains(strLabelName)) && replaceSpecialChar(trElement.getText()).trim().contains(strValue)){
+ Log.info(" Value exist: " + strLabelName + " : " + strValue);
+ flag=true;
+ return flag;
+ }*/
+ }
+ if (flag == false)
+ Log.error("Value does not exist: " + strLabelName + " : " + strValue);
+ return flag;
+ }
+
+ public boolean verifyDataInNestedTables(WebElement ele, String strNestedLocator, String strNestedElement, String strTableHeaderLocator, String strTableHeaderElement, String strTableHeadertxt, String strLabelName, String strValue) throws Exception {
+ int col_num = 0, matchIndex = 0;
+ boolean flag = false;
+ List tables = ele.findElements(By.cssSelector(strNestedElement));
+
+ for (WebElement trElement1 : tables) {
+ WebElement tableHeaderElement = trElement1.findElement(By.cssSelector(strTableHeaderElement));
+ if (strTableHeadertxt.contentEquals(tableHeaderElement.getText())) {
+ List tableRows = trElement1.findElements(By.xpath("./tbody/tr"));
+ for (WebElement trElement : tableRows) {
+ List Cols = trElement.findElements(By.tagName("td"));
+ for (WebElement tdElement : Cols) {
+ col_num++;
+ if (tdElement.getText().trim().contains(strLabelName))
+ matchIndex = col_num + 1;
+ else if (matchIndex == col_num) {
+ if (tdElement.getText().contains(strValue)) {
+ matchIndex = 0;
+ Log.info("Expected value :" + strLabelName + " - " + strValue + "- Value exist " + tdElement.getText().trim());
+ flag = true;
+ return flag;
+ } else {
+ Log.error("Expected value :" + strLabelName + " - " + strValue + "- Value exist " + tdElement.getText().trim());
+ flag = false;
+ return flag;
+ }
+ }
+ }
+ }
+ }
+ }
+ if (flag == false)
+ Log.error("Value does not exist: " + strLabelName + " : " + strValue);
+ return flag;
+ }
+
+ public boolean verifyDataInNestedTablesEquals(WebElement ele, String strNestedLocator, String strNestedElement, String strTableHeaderLocator, String strTableHeaderElement, String strTableHeadertxt, String strLabelName, String strValue) throws Exception {
+ int col_num = 0, matchIndex = 0;
+ boolean flag = false;
+ List tables = ele.findElements(By.cssSelector(strNestedElement));
+
+ for (WebElement trElement1 : tables) {
+ WebElement tableHeaderElement = trElement1.findElement(By.cssSelector(strTableHeaderElement));
+ if (strTableHeadertxt.contentEquals(tableHeaderElement.getText())) {
+ List tableRows = trElement1.findElements(By.xpath("./tbody/tr"));
+ for (WebElement trElement : tableRows) {
+ List Cols = trElement.findElements(By.tagName("td"));
+ for (WebElement tdElement : Cols) {
+ col_num++;
+ if (tdElement.getText().trim().contentEquals(strLabelName))
+ matchIndex = col_num + 1;
+ else if (matchIndex == col_num) {
+ if (tdElement.getText().contains(strValue)) {
+ matchIndex = 0;
+ Log.info("Expected value :" + strLabelName + " - " + strValue + "- Value exist " + tdElement.getText().trim());
+ flag = true;
+ return flag;
+ } else {
+ Log.error("Expected value :" + strLabelName + " - " + strValue + "- Value exist " + tdElement.getText().trim());
+ flag = false;
+ return flag;
+ }
+ }
+ }
+ }
+ }
+ }
+ if (flag == false)
+ Log.error("Value does not exist: " + strLabelName + " : " + strValue);
+ return flag;
+ }
+
+ public WebElement waitForElement(WebElement elementToWaitFor, Integer waitTimeInSeconds) {
+ WebElement ele;
+ if (waitTimeInSeconds == null) {
+ waitTimeInSeconds = OBJWAITTIMEOUT;
+ }
+
+ Wait wait = new FluentWait(this.driver)
+ .withTimeout(waitTimeInSeconds, TimeUnit.SECONDS)
+ .pollingEvery(500l, TimeUnit.MILLISECONDS)
+ .ignoring(NoSuchElementException.class)
+ .ignoring(StaleElementReferenceException.class);
+
+ ele = wait.until(elementToBeClickable((By) elementToWaitFor));
+
+ if (ele.isDisplayed()) {
+ ele.getAttribute("value");
+ Log.info("Element exist '" + ele.getText());
+ } else {
+ Log.error("Element does not exist '" + ele.getText());
+ }
+ return ele;
+ }
+
+ public SeleniumUtilities(WebDriver driver) {
+ this(driver, SeleniumUtilities.DEFAULT_TIMEOUT_IN_SECONDS);
+ }
+
+ public SeleniumUtilities(WebDriver driver, int elementWaitTime) {
+ this.driver = driver;
+ this.waitTime = elementWaitTime;
+ }
+
+ /**
+ * Use when element is on the page or will be on the page. Can be used element is not on the page before the ajax call and will be on the page after the ajax call
+ *
+ * @param elementId
+ * @param value
+ */
+ protected void waitUntilElementGetsValue(final String elementId, final String value) {
+ new FluentWait(driver).withTimeout(DEFAULT_TIMEOUT_IN_SECONDS, TimeUnit.SECONDS).pollingEvery(DEFAULT_SLEEP_TIME_IN_SECONDS, TimeUnit.SECONDS).ignoring(NoSuchElementException.class).until(new ExpectedCondition() {
+ public Boolean apply(WebDriver wd) {
+ WebElement element = wd.findElement(By.id(elementId));
+ return element.getText().equals(value);
+ }
+ }
+ );
+ }
+
+ public void waitUntilElementExists(final By by) {
+ new FluentWait(driver).withTimeout(DEFAULT_TIMEOUT_IN_SECONDS, TimeUnit.SECONDS).pollingEvery(DEFAULT_SLEEP_TIME_IN_SECONDS, TimeUnit.SECONDS).ignoring(NoSuchElementException.class).until(new ExpectedCondition() {
+ public Boolean apply(WebDriver wd) {
+ wd.findElement(by);
+ return true;
+ }
+ }
+ );
+ }
+
+
+ public String buildTextXML(String strValue) {
+ return "//div[./text()='" + strValue + "'];xpath";
+ }
+
+ public void elementShouldVisible(String locator, String element, int maxTry, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isEnabled()) {
+ Log.info("Element visible '" + locator + "=" + element + "'");
+ } else {
+ for (int i = 0; i < maxTry; i++) {
+ WebElement tryAgainele = getWebElementObject(locator, element);
+ if (tryAgainele.isEnabled()) {
+ Log.info("Element visible '" + locator + "=" + element + "'");
+ break;
+ } else if (maxTry > i) {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element '" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+ Exception error = new Exception();
+ Log.error("Current page does not contain element '" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+
+ }
+
+ public boolean elementShouldContain(String locator, String element, String strIntputData) throws Exception {
+ String strExtractedElementData = getElementText(locator, element, 1);
+ if (strExtractedElementData.contains(strIntputData)) {
+ Log.info("Verifying element'" + locator + "=" + element + "' contains text '" + strIntputData + "'");
+ return true;
+ } else {
+ Log.error("Verifying element'" + locator + "=" + element + "' does not contains text '" + strIntputData + "'");
+ return false;
+ }
+ }
+
+ public boolean elementShouldNotContain(String locator, String element, String strIntputData) throws Exception {
+ String strExtractedElementData = getElementText(locator, element, 1);
+ if (!strExtractedElementData.contains(strIntputData)) {
+ Log.info("Verifying element'" + locator + "=" + element + "' contains text '" + strIntputData + "'");
+ return true;
+ } else {
+ Log.error("Verifying element'" + locator + "=" + element + "' does not contains text '" + strIntputData + "'");
+ return false;
+ }
+ }
+
+ public void verifyText(String strExtractedData, String strIntputData) throws Exception {
+ if (strExtractedData.contains(strIntputData))
+ Log.info("Verified data '" + strIntputData + "'");
+ else
+ Log.error("Verified data does not exist :" + strIntputData);
+ }
+
+ /**
+ * Adds specified number of days to the today's date
+ *
+ * @param Days Number of days to be added to the current date
+ * @return newdate New date returned after adding specified number of days to current date
+ */
+ public String addDaystoCurrentDate(int Days) {
+ SimpleDateFormat dateformat = new SimpleDateFormat("MM/dd/yyyy");
+ Calendar cal = Calendar.getInstance();
+ cal.add(Calendar.DATE, Days); //Adding 1 day to current date
+ String newdate = dateformat.format(cal.getTime());
+ Log.info("New date '" + newdate + "'");
+ System.out.println(newdate);
+ return (newdate);
+ }
+
+
+ /**
+ * Adds specified duration to the start date and skip week ends
+ *
+ * @param Days Number of days to be added to the current date
+ * @return newdate New date returned after adding specified number of days to current date
+ */
+ public String addDaystoCurrentDateSkipWeekEndsCount(int Days) {
+ SimpleDateFormat dateformat = new SimpleDateFormat("MM/dd/yyyy");
+ Calendar cal = Calendar.getInstance();
+ int daysCount = 1;
+ do {
+ cal.add(Calendar.DATE, 1);
+ if (cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY
+ || cal.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY) {
+ } else {
+ daysCount++;
+ }
+ if (daysCount == 30 && cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {
+ cal.add(Calendar.DATE, 2);
+ }
+
+ if (daysCount == 30 && cal.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY) {
+ cal.add(Calendar.DATE, 1);
+ }
+
+ } while (daysCount < Days);
+
+ String newdate = dateformat.format(cal.getTime());
+ Log.info("New date '" + newdate + "'");
+ System.out.println(newdate);
+ return (newdate);
+ }
+
+ public String dateFormat(String strDateFormat, String strDate) throws ParseException {
+ SimpleDateFormat DEFAULTDATE_FORMAT = new SimpleDateFormat("MM/dd/yyyy");
+ Date mDefaultDate = DEFAULTDATE_FORMAT.parse(strDate);
+ SimpleDateFormat DATE_FORMAT = new SimpleDateFormat(strDateFormat);
+ String newDate = DATE_FORMAT.format(mDefaultDate);
+ System.out.println("Today in dd-MM-yyyy format : " + strDateFormat);
+ return newDate;
+ }
+
+ public String getDateFormat(String strDate) throws ParseException {
+ String newdate, strDateFormat = getCucumberContext().SESSION_DATE_FORMAT;
+ ;
+ switch (strDateFormat) {
+ case "dd/MM/yyyy":
+ newdate = dateFormat(strDateFormat, strDate);
+ break;
+ case "dd-MM-yyyy":
+ newdate = dateFormat(strDateFormat, strDate);
+ break;
+ case "dd.MM.yyyy":
+ newdate = dateFormat(strDateFormat, strDate);
+ break;
+ case "dd.MM.yyyy.":
+ newdate = dateFormat(strDateFormat, strDate);
+ break;
+ case "MM/dd/yyyy":
+ newdate = dateFormat(strDateFormat, strDate);
+ break;
+ case "MM-dd-yyyy":
+ newdate = dateFormat(strDateFormat, strDate);
+ break;
+ case "MM.dd.yyyy":
+ newdate = dateFormat(strDateFormat, strDate);
+ break;
+ case "MM.dd.yyyy.":
+ newdate = dateFormat(strDateFormat, strDate);
+ break;
+ case "yyyy-MM-dd":
+ newdate = dateFormat(strDateFormat, strDate);
+ break;
+ case "yyyy.MM.dd":
+ newdate = dateFormat(strDateFormat, strDate);
+ break;
+ case "yyyy.MM.dd.":
+ newdate = dateFormat(strDateFormat, strDate);
+ break;
+
+ case "yyyy/MM/dd":
+ newdate = dateFormat(strDateFormat, strDate);
+ break;
+ case "yyyy.dd.MM":
+ newdate = dateFormat(strDateFormat, strDate);
+ break;
+ case "yyyy. MM. dd":
+ newdate = dateFormat(strDateFormat, strDate);
+ break;
+ case "MMMM d, yyyy":
+ newdate = dateFormat(strDateFormat, strDate);
+ break;
+ case "MMMM, yyyy":
+ newdate = dateFormat(strDateFormat, strDate);
+ break;
+ default:
+ newdate = dateFormat("MM/dd/yyyy", strDate);
+ break;
+ }
+ return (newdate);
+ }
+
+ /**
+ * Clear the editable UI element
+ *
+ * @param propertyNameAndValue UI Property name and value delimited by ";"
+ * @param timeout customizable wait time for object to load
+ * @throws Exception
+ */
+ public String getElementText(String locator, String element, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+
+ if (ele.isDisplayed()) {
+ Log.info("Element text '" + ele.getText() + "' ''" + locator + "=" + element + "'");
+ return ele.getText();
+ } else {
+ Log.error("Element text does not exist '" + ele.getText() + "' ''" + locator + "=" + element + "'");
+ return "";
+ }
+ }
+
+ /**
+ * Clear the editable UI element
+ *
+ * @param propertyNameAndValue UI Property name and value delimited by ";"
+ * @param timeout customizable wait time for object to load
+ * @throws Exception
+ */
+ public void clear(String locator, String element, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ ele.clear();
+ Log.info("Cleared text ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+
+ public void clear(WebElement ele, int timeout) throws Exception {
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ ele.clear();
+ Log.info("Cleared text ''" + ele);
+ } else {
+ Exception error = new Exception();
+ Log.error("Current page does not contain element ''" + ele);
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+
+ public void Enter(String locator, String element, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ ele = getClickableWebElementObject(locator, element);
+ ele.sendKeys(Keys.RETURN);
+ Log.info("Clicking element ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element '" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+
+ public void checkbox(String locator, String element, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ if (!ele.isSelected())
+ ele.click();
+ Log.info("Selected checkbox ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element '" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ /**
+ * Clicks the UI element
+ *
+ * @param propertyNameAndValue UI Property name and value delimited by ";"
+ * @param timeout customizable wait time for object to load
+ * @return none
+ */
+ public void click(String locator, String element, int timeout) throws Exception {
+// WebElement ele = getWebElementObject(locator, element);
+ WebElement ele = getClickableWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ //Wait(timeout);
+ if (ele.isDisplayed()) {
+// ele = getClickableWebElementObject(locator, element);
+// ele.click();
+ Actions builder = new Actions(driver);
+// builder.moveToElement(ele).build().perform();
+// getClickableWebElementObject(locator, element).click();
+ builder.moveToElement(ele);
+ builder.click(getClickableWebElementObject(locator, element));
+ builder.build().perform();
+
+ Log.info("Clicking element ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element '" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ public void click(WebElement ele, int timeout) throws Exception {
+ waitForObjectToLoad(ele);
+ if (ele.isDisplayed()) {
+ Log.info("Clicking element ''" + ele.getText());
+ Actions builder = new Actions(driver);
+ builder.moveToElement(ele);
+ builder.click();
+ builder.build().perform();
+ } else {
+ Exception error = new Exception(ele.getText());
+ Log.error("Current page does not contain element '" + ele.getText());
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ public void mouseOver(String locator, String element, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ if (ele.isDisplayed()) {
+ Actions builder = new Actions(driver);
+ builder.moveToElement(ele);
+ builder.build().perform();
+ Log.info("mouse over to element ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element '" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+
+ public static void waitForTextToAppear(WebDriver newDriver, String textToAppear, WebElement element) {
+ WebDriverWait wait = new WebDriverWait(newDriver, 30);
+ wait.until(textToBePresentInElement(element, textToAppear));
+ }
+
+ public void moveToElement(WebElement ele, int timeout) throws Exception {
+ Actions builder = new Actions(driver);
+ builder.moveToElement(ele);
+ builder.build().perform();
+ Log.info("move to element ''" + ele.getText());
+ }
+
+ public void selectHitEnterKey(String locator, String element, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ ele = getClickableWebElementObject(locator, element);
+ Actions action = new Actions(driver);
+ try {
+ action.moveToElement(ele).click().sendKeys(Keys.ENTER).build().perform();
+ } catch (Exception e) {
+// AllContractPagesView.focusWebElement(ele);
+ try {
+ ele.click();
+ Log.info("Clicking element after last try of finding element");
+ } catch (Exception last) {
+ Log.info("Unable to click element after last try of finding element " + last.getMessage());
+ }
+ }
+ Log.info("Double clicking element ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element '" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ public void hitEnterKey(String locator, String element, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ ele = getClickableWebElementObject(locator, element);
+ Actions action = new Actions(driver);
+ action.moveToElement(ele).sendKeys(Keys.ENTER).build().perform();
+ Log.info("Hit enter key on element''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element '" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ public void escape(String locator, String element, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ ele = getClickableWebElementObject(locator, element);
+ Actions action = new Actions(driver);
+ action.moveToElement(ele).sendKeys(Keys.ESCAPE).build().perform();
+ Log.info("escape element ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element '" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ public void tab(String locator, String element, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ ele = getClickableWebElementObject(locator, element);
+ Actions action = new Actions(driver);
+ action.moveToElement(ele).sendKeys(Keys.TAB).build().perform();
+ Log.info("tab element ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element '" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ /**
+ * Clicks the UI element
+ *
+ * @param propertyNameAndValue UI Property name and value delimited by ";"
+ * @param timeout customizable wait time for object to load
+ * @return none
+ */
+ public void enter(String locator, String element, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ ele = getClickableWebElementObject(locator, element);
+ ele.sendKeys(Keys.ENTER);
+ Log.info("Clicking element ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element '" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ /**
+ * types data into the editable UI element
+ *
+ * @param propertyNameAndValue UI Property name and value delimited by ";"
+ * @param value test data to be populated
+ * @param timeout customizable wait time for object to load
+ */
+ public void type(String locator, String element, String value, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ ele.sendKeys(value);
+ Log.info("Typing text '" + value + "' into text field ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ public void type(WebElement ele, String value, int timeout) throws Exception {
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ ele.sendKeys(value);
+ Log.info("Typing text '" + value + "' into text field ''" + ele.getText());
+ } else {
+ Exception error = new Exception(ele.getText());
+ Log.error("Current page does not contain element ''" + ele.getText());
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ public void typeHitTab(String locator, String element, String value, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ Actions action = new Actions(driver);
+ action.doubleClick(ele).sendKeys(Keys.chord(Keys.CONTROL, "a"), value).perform();
+ action.moveToElement(ele).click(ele).sendKeys(Keys.TAB).build().perform();
+ Log.info("Typing text '" + value + "' into text field ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ public void typeHitEnter(String locator, String element, String value, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ Actions action = new Actions(driver);
+ action.moveToElement(ele).click(ele).sendKeys(value).sendKeys(Keys.ENTER).build().perform();
+ Log.info("Typing text '" + value + "' into text field ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ public static List getDropDownOptions(WebElement webElement) {
+ Select select = new Select(webElement);
+ return select.getOptions();
+ }
+
+ public String getFirstSelectedOption(String locator, String element, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ ele = getWebElementObject(locator, element);
+ Select list = new Select(ele);
+ Log.info("Selected '" + list.getFirstSelectedOption().getText() + "' from dropdown ''" + locator + "=" + element + "'");
+ return list.getFirstSelectedOption().getText();
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ public void getDropDownOption(WebElement ele, String value) throws Exception {
+ waitForObjectToLoad(ele);
+ if (ele.isDisplayed()) {
+ Select list = new Select(ele);
+ list.selectByVisibleText(value);
+ Log.info("Selected '" + value + "' from dropdown");
+ } else {
+ Exception error = new Exception(value);
+ Log.error("Current page does not contain element");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+
+ public void selectRepeatedly(String locator, String element, String value) {
+ try {
+ WebElement ele = getWebElementObject(locator, element);
+ ele = getWebElementObject(locator, element);
+ Select list = new Select(ele);
+ int count = 0;
+// AllContractPagesView.focusWebElement(ele);
+ while (!list.getFirstSelectedOption().getText().trim().equals(value.trim()) && count < 10) {
+ list.selectByVisibleText(value);
+// AllContractPagesView.focusWebElement(ele);
+ count++;
+ if (count == 10) {
+ break;
+ }
+ }
+ } catch (Exception e) {
+ }
+ }
+
+ /**
+ * Selects the specified Web Radio button
+ *
+ * @param propertyNameAndValue UI Property name and value delimited by ";"
+ * @param value test data to be populated
+ * @timeout customizable wait time for object to load
+ */
+ public void select(String locator, String element, String value, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ ele = getWebElementObject(locator, element);
+ Select list = new Select(ele);
+ list.selectByVisibleText(value);
+ selectRepeatedly(locator, element, value);
+ Log.info("Selected '" + value + "' from dropdown ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ public void select(WebElement ele, String value, int timeout) throws Exception {
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ Select list = new Select(ele);
+ list.selectByVisibleText(value);
+ Log.info("Selected '" + value + "' from dropdown ''" + ele.getText());
+ } else {
+ Exception error = new Exception(ele.getText());
+ Log.error("Current page does not contain element ''" + ele.getText());
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ /**
+ * Selects the drop down box by value
+ *
+ * @param propertyNameAndValue UI Property name and value delimited by ";"
+ * @param value test data to be populated
+ * @timeout customizable wait time for object to load
+ */
+ public void selectByValue(String locator, String element, String value, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ Select list = new Select(ele);
+ list.selectByValue(value);
+ Log.info("Selected '" + value + "' from dropdown ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ /**
+ * Types the date in date web control
+ *
+ * @param propertyNameAndValue UI Property name and value delimited by ";"
+ * @param value date value to be populated
+ * @param timeout customizable wait time for object to load
+ */
+ public void dateType(String locator, String element, String value, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ ele.clear();
+ if (value.contains("/")) {
+ ele.sendKeys(value);
+ } else {
+ String curDate = currentDate(Integer.parseInt(value));
+ ele.sendKeys(curDate);
+ }
+ driver.findElement(By.className("ui-datepicker-close")).click(); // Click on the Close line in datepicker window.
+ Wait(1);
+ Log.info("Clicking element ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ public void clickOnCellValue(String locator, String element, String cellValue) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ if (ele.isDisplayed()) {
+ List tblRow = ele.findElements(By.tagName("tr"));
+ for (int i = 0; i <= tblRow.size(); i++) {
+ System.out.println(tblRow.get(i).toString());
+ Log.info("Clicking element ''" + locator + "=" + element + "'");
+ }
+
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+
+ /**
+ * Determines the type of the UI web element based on the UI obeject description
+ *
+ * @param propValue UI object name description
+ * @param propName type of the property descrtiption like "id","name", "xpath", tagname" etc
+ * @return the identified web element
+ * @throws Exception
+ */
+ public WebElement getWebElementObject(String locator, String element) throws Exception {
+ By byElement;
+ try {
+ byElement = getElementBy(locator, element);
+ Wait wait = new FluentWait(this.driver)
+ .withTimeout(this.waitTime, TimeUnit.SECONDS)
+ .pollingEvery(500l, TimeUnit.MILLISECONDS)
+ .ignoring(NoSuchElementException.class)
+ .ignoring(StaleElementReferenceException.class);
+
+ WebElement webelement = wait.until(presenceOfElementLocated(byElement));
+ waitForObjectToLoad(webelement);
+ return webelement; // return webelement object
+ } catch (Exception ex) {
+ String Str = new String(ex.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw ex;
+ }
+ }
+
+ public List getWebElementObjects(String locatorType, String locator, int counter, int timeOut) throws Exception {
+ List eles = null;
+ for (int i = 0; i < counter; i++) {
+ try {
+ BaseView.pushShortTimeout(1);
+ eles = BrowserDriver.getCurrentDriver().findElements(getElementBy(locatorType, locator));
+ for (WebElement ele : eles) {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ ele = wait.until(visibilityOf(ele));
+ if (ele.isDisplayed()) return eles;
+ }
+ } catch (StaleElementReferenceException se) {
+
+ } catch (Exception ne) {
+ Log.error("Webelements does not exist : " + locatorType + " : " + locator + "counter :" + counter);
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ }
+ return eles;
+ }
+
+ public WebElement getClickableWebElementObject(String locator, String element) throws Exception {
+ By byElement;
+ try {
+ byElement = getElementBy(locator, element);
+ Wait wait = new FluentWait(this.driver)
+ .withTimeout(this.waitTime, TimeUnit.SECONDS)
+ .pollingEvery(500l, TimeUnit.MILLISECONDS)
+ .ignoring(NoSuchElementException.class)
+ .ignoring(StaleElementReferenceException.class);
+
+ WebElement webelement = wait.until(elementToBeClickable(byElement));
+ wait.until(visibilityOf(webelement));
+ waitForObjectToLoad(webelement);
+ return webelement; // return webelement object
+ } catch (Exception ex) {
+ String Str = new String(ex.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw ex;
+ }
+ }
+
+ public WebElement getClickableWebElementObject(WebElement byElement) throws Exception {
+ try {
+ Wait wait = new FluentWait(this.driver)
+ .withTimeout(this.waitTime, TimeUnit.SECONDS)
+ .pollingEvery(500l, TimeUnit.MILLISECONDS)
+ .ignoring(NoSuchElementException.class)
+ .ignoring(StaleElementReferenceException.class);
+
+ WebElement webelement = wait.until(elementToBeClickable(byElement));
+ wait.until(visibilityOf(webelement));
+ waitForObjectToLoad(webelement);
+ return webelement; // return webelement object
+ } catch (Exception ex) {
+ String Str = new String(ex.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw ex;
+ }
+ }
+
+ public void Wait(int timeout) {
+ long t1, t2;
+ t1 = System.currentTimeMillis();
+
+ do {
+ t2 = System.currentTimeMillis();
+ }
+ while ((t2 - t1) < (timeout * 1000));
+
+ }
+
+ /**
+ * Waits for the UI object to completed load on webpage
+ *
+ * @param ele UI element for which wait time is required to load
+ */
+ public void waitForObjectToLoad(WebElement ele) {
+ boolean isExist = false;
+ int cntr = 0;
+ while (!isExist) {
+ if (ele.isDisplayed()) {
+ isExist = true;
+ } else {
+ Wait(1);
+ cntr++;
+ if (cntr >= 240) { // Maximum wait time is for 120 seconds i.e. 2 minutes
+ //fail
+ isExist = true;
+ }
+ }
+ }
+ }
+
+ public static String currentDate(int num) {
+ Calendar c1 = Calendar.getInstance();
+ c1.add(Calendar.DATE, num);
+ return formatter.format(c1.getTime());
+ }
+
+ /**
+ * checks whether the element is present on webpage
+ *
+ * @param by String UI object reference
+ * @return returns true or false based on whether UI object present on the webpage
+ */
+ public boolean isElementPresent(String by) {
+ try {
+ driver.findElement(By.xpath(by));
+ Log.info("Element " + by + " exist.");
+ return true;
+ } catch (NoSuchElementException e) {
+ Log.info("Element does not " + by + " exist.");
+ return false;
+ }
+ }
+
+ /**
+ * checks whether the element is present on webpage
+ *
+ * @param by UI object reference
+ * @return returns true or false based on whether UI object present on the webpage
+ */
+ public boolean isElementPresent(By by) {
+ try {
+ driver.findElement(by);
+ return true;
+ } catch (NoSuchElementException e) {
+ return false;
+ }
+ }
+
+
+ /**
+ * Handles intestistial page
+ */
+ public void handle() {
+ try {
+
+ String windowHandle = driver.getWindowHandle();
+ driver.switchTo().window(windowHandle);
+
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+
+ }
+
+ public void switchToFrame(int index) {
+ try {
+ driver.switchTo().frame(index);
+ } catch (Exception e) {
+ Log.error("Error :" + e.getMessage());
+ }
+ }
+
+ public void switchTodefaultContent() {
+ try {
+ driver.switchTo().defaultContent();
+ } catch (Exception e) {
+ Log.error("Error :" + e.getMessage());
+ }
+ }
+
+ /**
+ * Clicks on the link present on a webtable for a specifed row and column
+ *
+ * @param ele UI element for which wait time is required to load
+ * @throws Exception
+ */
+ public void randomClick(String locator, String element, int ClickRow, int ClickCol) throws Exception {
+ int row_num = 1, col_num, ClickedFlag = 0;
+ WebElement TableElement = getWebElementObject(locator, element);
+ List Rows = TableElement.findElements(By.xpath("id('" + element + "')/tbody/tr"));
+ for (WebElement trElement : Rows) {
+ if (row_num > ClickRow) {
+ List Cols = trElement.findElements(By.xpath("td"));
+ col_num = 1;
+ for (WebElement tdElement : Cols) {
+ if (col_num > ClickCol) {
+ if (tdElement.getText() != "")
+ if (tdElement.getText() != "N/A")
+ if (tdElement.getText().length() < 12) {
+ driver.findElement(By.linkText(tdElement.getText())).click();
+ ClickedFlag = 1;
+ break;
+ }
+ System.out.println("row # " + row_num + ", col # " + col_num + "text=" + tdElement.getText());
+ }
+ col_num++;
+ }
+ if (ClickedFlag == 1)
+ break;
+ }
+ row_num++;
+ }
+ }
+
+ public int getTableRowCount(String locator, String element) throws Exception {
+ WebElement TableElement = getWebElementObject(locator, element);
+ List Rows = TableElement.findElements(By.xpath(element));
+ Log.info("Total Rows '" + Rows.size() + "' ''" + locator + "=" + element + "'");
+ return Rows.size();
+ }
+
+ public String getTableColumnValue(String locator, String element, int intRow, int intCol) throws Exception {
+ int row_num = 1, col_num, boolExitFlag = 0;
+ String strColText = "";
+ WebElement TableElement = getWebElementObject(locator, element);
+ List Rows = TableElement.findElements(By.xpath("" + element + "/tbody/tr"));
+ for (WebElement trElement : Rows) {
+ if (row_num == intRow) {
+ List Cols = trElement.findElements(By.xpath("td"));
+ col_num = 1;
+ for (WebElement tdElement : Cols) {
+ if (col_num == intCol) {
+ strColText = tdElement.getText();
+ Log.info("Extracted element value '" + tdElement.getText() + "' ''" + locator + "=" + element + "'");
+ boolExitFlag = 1;
+ break;
+ }
+ }
+ if (boolExitFlag == 1)
+ break;
+ }
+ }
+ row_num++;
+ return strColText;
+ }
+
+ public String getLastIndexTextValue(String locator, String element, int timeout) throws Exception {
+ //String[] propertyNameValue= propertyNameAndValue.split(";");
+ List eles = driver.findElements(getElementBy(locator, element));
+ if (eles.get(eles.size() - 1).isDisplayed()) {
+ Log.info("Extracted element value '" + eles.get(eles.size() - 1).getText() + "' ''" + locator + "=" + element + "'");
+ return eles.get(eles.size() - 1).getText().trim();
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+
+ public boolean verifyTextValue(String locator, String element, String strMsg, int timeout) {
+ boolean flag = false;
+ try {
+ List eles = driver.findElements(getElementBy(locator, element));
+
+ for (int i = 0; i < eles.size(); i++) {
+// AllContractPagesView.focusWebElement(eles.get(i));
+ if (eles.get(i).getText().trim().contains(strMsg.trim())) {
+ flag = true;
+ Log.info("Extracted element value '" + eles.get(i).getText() + "' ''" + locator + "=" + element + "'");
+ return flag;
+ }
+ }
+ if (flag == false) {
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ }
+ } catch (Exception ex) {
+ return false;
+ }
+ return flag;
+ }
+
+ public Boolean isElementExist(String locator, String element) {
+ Boolean flag = false;
+ try {
+ if (getWebElementObject(locator, element).isDisplayed())
+ flag = true;
+ } catch (Exception ex) {
+ flag = false;
+ }
+ return flag;
+ }
+
+ /**
+ * Captures the text value of the web element
+ *
+ * @param propertyNameAndValue UI Property name and value delimited by ";"
+ * @param timeout customizable wait time for object to load
+ * @return ele returns the captured text
+ */
+ public String getTextValue(String locator, String element, int timeout) throws Exception {
+ //String[] propertyNameValue= propertyNameAndValue.split(";");
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ ele = getWebElementObject(locator, element);
+ Log.info("Extracted element value '" + ele.getText() + "' ''" + locator + "=" + element + "'");
+ return ele.getText().trim();
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ public String getTextValue(WebElement ele, int timeout) throws Exception {
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ Log.info("Extracted element value '" + ele.getText() + "' ''" + ele);
+ return ele.getText().trim();
+ } else {
+ Exception error = new Exception();
+ Log.error("Current page does not contain element ''" + ele);
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ /**
+ * Checks whether element is enabled in UI.
+ *
+ * @param element The UI element to be validated
+ * @return true or false depending on whether UI element is enabled.
+ */
+
+ public static boolean assertNull(WebElement element) {
+ try {
+ // call any method on the element
+ element.isEnabled();
+ Log.info("Element enabled");
+ } catch (Exception ex) {
+ Log.error("Current page does not contain element");
+ String Str = new String(ex.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Checks whether element is not enabled in UI.
+ *
+ * @param element The UI element to be validated
+ * @return true or false depending on whether UI element is enabled.
+ */
+ public static boolean assertNotNull(WebElement element) {
+ try {
+ // call any method on the element
+ if (element.isEnabled())
+ Log.info("Element enabled");
+ } catch (Exception ex) {
+ Log.error("Current page does not contain element");
+ String Str = new String(ex.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ return false;
+ }
+ return true;
+ }
+
+ /*
+ * findWebelement method looks for the presence of the element and clicks on the same.
+ *
+ * @param xpath String: xpath is the element
+ */
+ public void findWebElement(String xpath) {
+ WebElement Elements = null;
+
+ try {
+ By ElementLocator = By.xpath(xpath);
+ Elements = driver.findElement(ElementLocator);
+ Elements.click();
+ Log.info("Clicking element");
+ } catch (Exception Ex) {
+ Log.error("Current page does not contain element");
+ String Str = new String(Ex.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ System.out.println("FindWebElement Functiion : " + Ex.getMessage());
+ }
+ }
+
+ /**
+ * Returns the Attribute value for a given Webelement object
+ *
+ * @param propertyNameAndValue: Webelement object
+ * @param attribute: Attribute name for which the value to be returned
+ * *@param timeout: default timeout
+ * @return Attribute value
+ */
+ public String getAttributeValue(String locator, String element, String attribute, int timeout) throws Exception {
+ //String[] propertyNameValue= propertyNameAndValue.split(";");
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ Log.info("Attribute of the element '" + ele.getAttribute(attribute) + "' ''" + locator + "=" + element + "'");
+ return ele.getAttribute(attribute);
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+
+
+ /**
+ * This method returns the Selected item value from the dropdown.
+ *
+ * @param propertyNameAndValue: Listbox Object
+ * @param timeout: default timeout
+ * @return String : Item value selected in the dropdown
+ */
+ public String getSelectedValue(String locator, String element, int timeout) throws Exception {
+ //String[] propertyNameValue= propertyNameAndValue.split(";");
+ WebElement ele = getWebElementObject(locator, element);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ Select list = new Select(ele);
+ WebElement val = list.getFirstSelectedOption();
+ Log.info("Selected '" + val.getText() + "' ''" + locator + "=" + element + "'");
+ return val.getText();
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ public String getTableText(String locator, String element) throws Exception {
+ WebElement TableElement = getWebElementObject(locator, element);
+ Log.info("Table Value '" + TableElement.getText() + "' ''" + locator + "=" + element + "'");
+ return TableElement.getText();
+ }
+
+ public List getTableValues(String locator, String element, int ClickRow, int ClickCol) throws Exception {
+ WebElement TableElement = getWebElementObject(locator, element);
+ List Rows = TableElement.findElements(By.xpath(element + "/tbody/tr"));
+ Log.info("Selected '" + TableElement.getText() + "' ''" + locator + "=" + element + "'");
+ return Rows;
+ }
+
+ public int getXpathCount(String xpathValue) throws Exception {
+ return driver.findElements(By.xpath(xpathValue)).size();
+ }
+
+ public WebDriver getWebDriver() {
+ return driver;
+ }
+
+// public void getChildWindow(boolean flag) throws Throwable{
+// try{
+// if(flag){
+// parentBrowser = driver.getWindowHandle();
+// Iterator i = driver.getWindowHandles().iterator();
+// while(i.hasNext()) {
+// String childBrowser = i.next();
+// driver.switchTo().window(childBrowser);
+// }
+// }else{
+// driver.close();
+// driver.switchTo().window(parentBrowser);
+// }
+// } catch (Exception e) {
+// }
+// }
+
+ public void getChildWindow(boolean flag) throws Throwable {
+ try {
+ parentBrowser = driver.getWindowHandle();
+ if (flag) {
+ Iterator i = driver.getWindowHandles().iterator();
+ while (i.hasNext()) {
+ String childBrowser = i.next();
+ driver.switchTo().window(childBrowser);
+ }
+ }
+ driver.close();
+ driver.switchTo().window(parentBrowser);
+ } catch (Exception e) {
+ }
+ }
+
+ public void waitForPopUp(long count) throws Throwable {
+ int time = 0;
+ boolean flag = false;
+ try {
+ while (time < count) {
+ time++;
+ Thread.sleep(1000);
+ Set i = driver.getWindowHandles();
+ if (i.toArray().length > 1) {
+ flag = true;
+ break;
+ }
+ }
+ if (time == count) {
+ throw new Exception("Pop up not found");
+ }
+ } catch (Exception e) {
+ }
+ }
+
+ public boolean handelPopWindow(long count) {
+ int time = 0;
+ boolean flag = false;
+ try {
+ while (time < count) {
+ time++;
+ Thread.sleep(1000);
+ Set i = driver.getWindowHandles();
+ if (i.toArray().length > 1) {
+ flag = true;
+ return flag;
+ //break;
+ }
+ }
+ if (time == count) {
+ throw new Exception("Pop up not found");
+ }
+ } catch (Exception e) {
+ }
+ return flag;
+ }
+
+ public void verifyLabelAndValuePair(String strType, String strValue) throws Exception {
+ Assert.assertTrue("Expected type " + strType + " and pair " + strValue + " NOT found", getWebElementObject("xpath", "//td[contains(text(),'" + strType + "')]//following-sibling::td").getText().trim().replace(",", "").replace(".", "").contains(strValue.replace(",", "").replace(".", "")));
+ Log.info("Expected type " + strType + " and pair " + strValue + " exist");
+ }
+
+
+ public void focusAndClick(String locator, String element, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ ele = getClickableWebElementObject(locator, element);
+// ele.sendKeys("");
+// ele.click();
+ Actions builder = new Actions(driver);
+ builder.moveToElement(ele);
+ builder.sendKeys("");
+ builder.click();
+ builder.build().perform();
+
+ Log.info("Clicking element ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element '" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ public void moveToElement(String locator, String element, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ ele = getClickableWebElementObject(locator, element);
+ Actions builder = new Actions(driver);
+ builder.moveToElement(ele);
+// builder.sendKeys("");
+ builder.build().perform();
+ ele.sendKeys("");
+ Log.info("Clicking element ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element '" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+
+ }
+
+ public By getElementBy(String locator, String element) throws Exception {
+ By byElement;
+ try {
+ switch (Locators.valueOf(locator.toLowerCase())) { // determine which locator item we are interested in
+ case xpath: {
+ byElement = By.xpath(element);
+ break;
+ }
+ case id: {
+ byElement = By.id(element);
+ break;
+ }
+ case name: {
+ byElement = By.name(element);
+ break;
+ }
+ case classname: {
+ byElement = By.className(element);
+ break;
+ }
+ case linktext: {
+ byElement = By.linkText(element);
+ break;
+ }
+ case paritallinktext: {
+ byElement = By.partialLinkText(element);
+ break;
+ }
+ case tagname: {
+ byElement = By.tagName(element);
+ break;
+ }
+ case cssselector: {
+ byElement = By.cssSelector(element);
+ break;
+ }
+ default: {
+ throw new InvalidSelectorException(locator
+ + " is not a valid Selector.");
+ }
+ }
+ return byElement;
+ } catch (Exception ex) {
+ String Str = new String(ex.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw ex;
+ }
+ }
+
+ public void clickElement(String locator, String element, int count) throws Exception {
+ int localCount = 0;
+ while (!(localCount == count)) {
+
+ try {
+ //This element focus will work only for link, input etc. Therefore surrounded with try catch
+ try {
+ getWebElementObject(locator, element).sendKeys("");
+ getClickableWebElementObject(locator, element).sendKeys("");
+
+ } catch (Exception e) {
+ }
+// getWebElementObject(locator, element).click();
+ click(locator, element, waitTime);
+ break;
+ } catch (StaleElementReferenceException e) {
+ localCount++;
+ }
+ }
+ }
+
+ public void handleUnexpectedAlerts() throws Exception {
+ try {
+// ForceWaitForItem.delay(10000);
+ WebDriverWait wait = new WebDriverWait(driver, 4);
+ wait.ignoring(NoAlertPresentException.class)
+ .until(alertIsPresent());
+ Alert alert = BrowserDriver.getCurrentDriver().switchTo().alert();
+ alert.accept();
+ } catch (Exception e) {
+ }
+ }
+
+ public void handleParticularAlert(String alertMessage) throws Exception {
+ try {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), 5);
+ wait.until(alertIsPresent());
+ Alert alert = BrowserDriver.getCurrentDriver().switchTo().alert();
+ if (alertMessage.trim().contains(alert.getText().trim())) {
+ alert.accept();
+ } else {
+ System.out.println("Alert not found");
+ }
+ } catch (Exception e) {
+ }
+ }
+
+ public void dismissUnexpectedAlerts() throws Exception {
+ try {
+// ForceWaitForItem.delay(5000);
+ WebDriverWait wait = new WebDriverWait(driver, 10);
+ wait.ignoring(NoAlertPresentException.class)
+ .until(alertIsPresent());
+
+ Alert alert = BrowserDriver.getCurrentDriver().switchTo().alert();
+ alert.dismiss();
+ } catch (Exception e) {
+ }
+ }
+
+ public void switchToFrameHavingElement(String locatorType, String locator) {
+ int count = 0;
+ driver.switchTo().defaultContent();
+
+ //Wait for frame to load
+ WebDriverWait wait = new WebDriverWait(driver, OBJWAITTIMEOUT);
+ wait.until(frameToBeAvailableAndSwitchToIt(By.cssSelector("iframe")));
+
+ driver.switchTo().defaultContent();
+ List elements = this.getWebDriver().findElements(By.cssSelector("iframe"));
+ Log.info("Number of frames in this page : " + elements.size());
+
+ for (WebElement e : elements) {
+ driver.switchTo().defaultContent();
+ System.out.println(e.getAttribute("src"));
+ driver.switchTo().frame(e);
+ try {
+ this.getWebElementObject(locatorType, locator);
+ Log.info("Element is found in frame " + (count + 1));
+ break;
+ } catch (Exception ec) {
+ count++;
+ }
+ }
+ if (count == elements.size()) {
+ Log.info("Element is not found in any of the frames");
+ driver.switchTo().defaultContent();
+ //throw new NoSuchElementException("Element is not found in any of the frames");
+ }
+ }
+
+ public boolean getFrameIndex(String locatorType, String locator) {
+ int count = 0;
+ boolean flag = false;
+ driver.switchTo().defaultContent();
+
+ //Wait for frame to load
+ WebDriverWait wait = new WebDriverWait(driver, OBJWAITTIMEOUT);
+ wait.until(frameToBeAvailableAndSwitchToIt(By.cssSelector("iframe")));
+
+ driver.switchTo().defaultContent();
+ List elements = this.getWebDriver().findElements(By.cssSelector("iframe"));
+ Log.info("Number of frames in this page : " + elements.size());
+
+ for (WebElement e : elements) {
+ driver.switchTo().defaultContent();
+ System.out.println(e.getAttribute("src"));
+ driver.switchTo().frame(e);
+ try {
+// if(count!=0) {
+ BaseView.pushShortTimeout(1);
+ this.getWebElementObject(locatorType, locator);
+ Log.info("Element is found in frame " + (count + 1));
+ flag = true;
+ break;
+// }
+// count++;
+ } catch (Exception ec) {
+ count++;
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ }
+// if (count == elements.size()) {
+// Log.info("Element is not found in any of the frames");
+// driver.switchTo().defaultContent();
+// //throw new NoSuchElementException("Element is not found in any of the frames");
+// }
+ return true;
+ }
+
+ public static void selectDropdownOption(By by, String optionName) {
+
+ WebElement optionNames = BrowserDriver.getCurrentDriver().findElement(by);
+ Select select = new Select(optionNames);
+ select.selectByVisibleText(optionName);
+
+ }
+ /*public void waitForPageLoad() {
+
+ try{
+ JavascriptExecutor js = (JavascriptExecutor)driver;
+ final boolean response = js.executeScript("return document.readyState").equals("complete");
+ WebDriverWait wait = new WebDriverWait(driver,30000,5000);
+ wait.until(new Predicate() {
+ public boolean apply(WebDriver arg0) {
+ return response;
+ }
+ });
+ Log.info("Page is loaded completely....");
+ }catch(Exception e){
+ //Ignore
+ }
+ }*/
+
+// private void readExcelSheet(String destFile){
+// File excelSheet = null;
+// Workbook workbook = null;
+//
+// try {
+// Workbook wb = Workbook.getWorkbook(new File(destFile));
+// System.out.println(wb.getNumberOfSheets());
+// for(int sheetNo=0; sheetNo tableRows = ele.findElements(By.xpath("./tbody/tr"));
+ for (WebElement trElement : tableRows) {
+ List Cols = trElement.findElements(By.tagName("td"));
+ for (WebElement tdElement : Cols) {
+ // System.out.println(tdElement.getText().trim()+"===="+strLabelName+":"+strValue);
+ if (tdElement.getText().trim().contains((strLabelName + "\n" + strValue))) {
+ Log.info(" Expected value " + strLabelName + " : " + strValue + "- Value exist " + tdElement.getText().trim());
+ flag = true;
+ return flag;
+ }
+ }
+ }
+ if (flag == false)
+ Log.error("Value does not exist: " + strLabelName + " : " + strValue);
+ return flag;
+ }
+
+ public WebElement getWebElementWithoutStaleness(String locator, String element) throws Exception {
+ By byElement;
+ WebElement webelement = null;
+ int staleElementCount = 0;
+ do {
+ try {
+ byElement = getElementBy(locator, element);
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), WEBDRIVER_WAIT_SMALL);
+ wait.until(not(stalenessOf(BrowserDriver.getCurrentDriver().findElement(byElement))));
+ webelement = BrowserDriver.getCurrentDriver().findElement(byElement);
+ break;
+ } catch (StaleElementReferenceException se) {
+ staleElementCount++;
+ } catch (NoSuchElementException ne) {
+ BaseView.takeScreenshot("ElementNotFound.png");
+ fail("Element not found in the DOM " + ne.getMessage());
+ }
+ } while (!(staleElementCount > 15));
+ return webelement;
+ }
+
+ public static boolean waitForNonStaleWebElement(WebElement element, int timeOut) {
+ boolean flag = false;
+ try {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ return wait.until(not(stalenessOf(element)));
+ } catch (Exception e) {
+ Log.info("Error: Waited for non stale element for " + timeOut + " seconds but no use...");
+ return flag;
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ }
+
+ public static boolean waitForNonStaleWebElement(WebElement element, int counter, int timeOut) {
+ boolean flag = false;
+ for (int i = 0; i < counter; i++) {
+ try {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ boolean ele = wait.until(not(stalenessOf(element)));
+ if (ele) return ele;
+ } catch (Exception e) {
+ Log.info("Error: Waited for non stale element for " + timeOut + " seconds but no use...");
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ }
+ return flag;
+ }
+
+ public boolean waitForNonStaleWebElement(String locatorType, String locator, int timeOut) {
+ boolean flag = false;
+ try {
+ BaseView.pushShortTimeout(2);
+ WebElement element = getWebElementObject(locatorType, locator);
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ return wait.until(not(stalenessOf(element)));
+// flag = wait.until(ExpectedConditions.not(ExpectedConditions.stalenessOf(element)));
+// flag = true;
+ } catch (Exception e) {
+ Log.info("Error: Waited for non stale element for \"+timeOut+\" seconds but no use..." + e.getMessage());
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ return flag;
+ }
+
+ public boolean waitForNonStaleWebElement(String locatorType, String locator, int counter, int timeOut) {
+ boolean flag = false;
+ for (int i = 0; i < counter; i++) {
+ try {
+ BaseView.pushShortTimeout(2);
+ WebElement element = getWebElementObject(locatorType, locator);
+
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ flag = wait.until(not(stalenessOf(element)));
+ if (flag) return flag;
+ } catch (Exception e) {
+ Log.info("Error: Waited for non stale element for " + timeOut + " seconds but no use...");
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ }
+ return flag;
+ }
+
+ public boolean waitForElementContainText(WebElement element, String text) throws Exception {
+ boolean textPresent = false;
+ try {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), WEBDRIVER_WAIT);
+ textPresent = wait.until(textToBePresentInElement(element, text));
+ } catch (Exception ne) {
+ BaseView.takeScreenshot("TextNotFoundInElement.png");
+ fail("Element not found in the DOM " + ne.getMessage());
+ }
+ return textPresent;
+ }
+
+ public boolean waitForElementContainText(String locatorType, String locator, String text) throws Exception {
+ boolean textPresent = false;
+ try {
+ BaseView.pushShortTimeout(1);
+ WebElement element = getWebElementObject(locatorType, locator);
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), WEBDRIVER_WAIT);
+ textPresent = wait.until(textToBePresentInElement(element, text));
+ } catch (Exception ne) {
+ Log.error("Webelement does not exist : " + locatorType + " : " + locator);
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ return textPresent;
+ }
+
+ public boolean waitForElementVisibilityOf(String locatorType, String locator, int timeOut) {
+ try {
+ BaseView.pushShortTimeout(1);
+ WebElement element = getWebElementObject(locatorType, locator);
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ return wait.until(visibilityOf(element)).isDisplayed();
+ } catch (Exception ne) {
+ Log.error("Webelement does not exist : " + locatorType + " : " + locator);
+ return false;
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ }
+
+ /*public boolean waitForElementVisibilityOf(String element, int timeOut){
+ try {
+ BaseView.pushShortTimeout(1);
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ return wait.until(visibilityOf(element)).isDisplayed();
+ } catch (Exception ne) {
+ Log.error("Webelement does not exist : " + element.getText());
+ return false;
+ }finally{
+ BaseView.popDefaultTimeout();
+ }
+ }*/
+
+ public boolean waitForElementVisibilityOf(WebElement element, int counter, int timeOut) {
+ boolean eleVisibile = false;
+ for (int i = 0; i < counter; i++) {
+ try {
+ BaseView.pushShortTimeout(1);
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ eleVisibile = wait.until(visibilityOf(element)).isDisplayed();
+ if (eleVisibile) return eleVisibile;
+ } catch (Exception ne) {
+ Log.error("Webelement does not exist : " + element.getText());
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ }
+ return eleVisibile;
+ }
+
+ public boolean waitForElementVisibilityOf(String locatorType, String locator, int counter, int timeOut) {
+ boolean eleVisibile = false;
+ for (int i = 0; i < counter; i++) {
+ try {
+ BaseView.pushShortTimeout(1);
+ WebElement element = getWebElementObject(locatorType, locator);
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ eleVisibile = wait.until(visibilityOf(element)).isDisplayed();
+ if (eleVisibile) return eleVisibile;
+ } catch (Exception ne) {
+ Log.error("Webelement does not exist : " + locatorType + " : " + locator + "counter :" + counter);
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ }
+ return eleVisibile;
+ }
+
+ public boolean waitForElementIsClickable(String locatorType, String locator, int counter, int timeOut) {
+ boolean eleVisibile = false;
+ for (int i = 0; i < counter; i++) {
+ try {
+ BaseView.pushShortTimeout(1);
+ WebElement element = getWebElementObject(locatorType, locator);
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ eleVisibile = wait.until(elementToBeClickable(element)).isDisplayed();
+ if (eleVisibile) return eleVisibile;
+ } catch (Exception ne) {
+ Log.error("Webelement does not exist : " + locatorType + " : " + locator + "counter :" + counter);
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ }
+ return eleVisibile;
+ }
+
+ public boolean waitForElementIsClickable(WebElement element, int counter, int timeOut) {
+ boolean eleVisibile = false;
+ for (int i = 0; i < counter; i++) {
+ try {
+ BaseView.pushShortTimeout(1);
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ eleVisibile = wait.until(elementToBeClickable(element)).isDisplayed();
+ if (eleVisibile) return eleVisibile;
+ } catch (Exception ne) {
+ Log.error("Webelement does not exist : " + element.getText() + "counter :" + counter);
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ }
+ return eleVisibile;
+ }
+
+ public WebElement getElement(String locatorType, String locator, int timeOut) {
+ WebElement element = null;
+ try {
+ BaseView.pushShortTimeout(1);
+ element = getWebElementObject(locatorType, locator);
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ element = wait.until(visibilityOf(element));
+ } catch (Exception ne) {
+ Log.error("Webelement does not exist : " + locatorType + " : " + locator);
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ return element;
+ }
+
+ public WebElement getElement(String locatorType, String locator, int counter, int timeOut) {
+ WebElement element = null;
+ for (int i = 0; i < counter; i++) {
+ try {
+ BaseView.pushShortTimeout(1);
+ element = getClickableWebElementObject(locatorType, locator);//BrowserDriver.getCurrentDriver().findElement(getElementBy(locatorType, locator));
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ element = wait.until(visibilityOf(element));
+ if (element.isDisplayed()) return element;
+// wait.until(ExpectedConditions.not(ExpectedConditions.stalenessOf(element)));
+ } catch (StaleElementReferenceException se) {
+
+ } catch (Exception ne) {
+ Log.error("Webelement does not exist : " + locatorType + " : " + locator + "counter :" + counter);
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ }
+ return element;
+ }
+
+ public boolean waitForElementNotPresent(String locatorType, String locator) throws Throwable {
+ try {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), WEBDRIVER_WAIT);
+ wait.until(invisibilityOfElementLocated(getElementBy(locatorType, locator)));
+ return true;
+ } catch (Exception e) {
+ return false;
+ }
+ }
+
+ public boolean waitForElementNotPresent(String locatorType, String locator, int timeOut) throws Throwable {
+ try {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ wait.until(invisibilityOfElementLocated(getElementBy(locatorType, locator)));
+ return true;
+ } catch (Exception e) {
+ return false;
+ }
+ }
+
+ public boolean waitForElementPresent(String locatorType, String locator) throws Throwable {
+ try {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), WEBDRIVER_WAIT);
+ wait.until(visibilityOfElementLocated(getElementBy(locatorType, locator)));
+ return true;
+ } catch (Exception e) {
+ return false;
+ }
+ }
+
+ public boolean waitUntilElementContainsText(String locatorType, String locator, String text, int timeOut) throws Exception {
+ boolean textPresent = false;
+ try {
+ WebDriverWait wait = new WebDriverWait(driver, timeOut);
+ textPresent = wait.until(textToBePresentInElement(getElement(locatorType, locator, timeOut), text));
+ if (textPresent) return textPresent;
+ } catch (Exception ne) {
+ BaseView.takeScreenshot("TextNotFoundInElement.png");
+ Log.info("Error :" + ne.getMessage());
+ return textPresent;
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ return textPresent;
+ }
+
+ public boolean waitUntilElementContainsText(String locatorType, String locator, String text, int counter, int timeOut) throws Exception {
+ boolean textPresent = false;
+ for (int i = 0; i < counter; i++) {
+ try {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ textPresent = wait.until(textToBePresentInElement(getElement(locatorType, locator, timeOut), text));
+ if (textPresent) return textPresent;
+ } catch (Exception ne) {
+ BaseView.takeScreenshot("TextNotFoundInElement.png");
+ Log.info("Error :" + ne.getMessage());
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ }
+ return textPresent;
+ }
+
+ public boolean waitUntilElementNotContainsText(String locatorType, String locator, String text, int counter, int timeOut) throws Exception {
+ boolean textPresent = false;
+ for (int i = 0; i < counter; i++) {
+ try {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ textPresent = wait.until(not(textToBePresentInElement(getElement(locatorType, locator, timeOut), text)));
+ if (textPresent) return textPresent;
+ } catch (Exception ne) {
+ BaseView.takeScreenshot("TextNotFoundInElement.png");
+ Log.info("Error :" + ne.getMessage());
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ }
+ return textPresent;
+ }
+
+ public boolean waitUntilElementNotContainsText(WebElement ele, String text, int counter, int timeOut) throws Exception {
+ boolean textPresent = false;
+ for (int i = 0; i < counter; i++) {
+ try {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ textPresent = wait.until(not(textToBePresentInElement(ele, text)));
+ if (textPresent) return textPresent;
+ } catch (Exception ne) {
+ BaseView.takeScreenshot("TextNotFoundInElement.png");
+ Log.info("Error :" + ne.getMessage());
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ }
+ return textPresent;
+ }
+
+ public static void failed(String errorMessage) {
+ org.junit.Assert.fail(errorMessage);
+ }
+
+ public boolean waitUntilElementDisappers(String locatorType, String locator, int counter, int timeOut) throws Exception {
+ boolean boolEleExist = false;
+ for (int i = 0; i < counter; i++) {
+ try {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ boolEleExist = wait.until(not(visibilityOf(getElement(locatorType, locator, timeOut))));
+ if (boolEleExist) return boolEleExist;
+ } catch (Exception ne) {
+ BaseView.takeScreenshot("waitUntilElementDisappers");
+ Log.info("Error :" + ne.getMessage());
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ }
+ return boolEleExist;
+ }
+
+ public boolean waitUntilElementDisappers(WebElement ele, int counter, int timeOut) throws Exception {
+ boolean boolEleExist = false;
+ for (int i = 0; i < counter; i++) {
+ try {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), timeOut);
+ boolEleExist = wait.until(not(visibilityOf(ele)));
+ if (boolEleExist) return boolEleExist;
+ } catch (Exception ne) {
+ BaseView.takeScreenshot("waitUntilElementDisappers");
+ Log.info("Error :" + ne.getMessage());
+ } finally {
+ BaseView.popDefaultTimeout();
+ }
+ }
+ return boolEleExist;
+ }
+
+ public boolean textContains(String strSearchText) {
+ boolean flag = false;
+ try {
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), 30);
+ return wait.until(textToBePresentInElement(By.tagName("*"), strSearchText));
+ } catch (Exception ex) {
+ Log.error("Text doesnot contains :" + strSearchText + ex.getMessage());
+ }
+ Log.info("Verified : " + strSearchText);
+ return flag;
+ }
+
+ public static void switchToFrame(String strFrameLoctor) throws Throwable {
+ WebElement allPagesFrame = null;
+ Log.info("Switching to default frame....");
+ BrowserDriver.getCurrentDriver().switchTo().defaultContent();
+ boolean isFrameVisible = false;
+ Log.info("Started finding visible frame....");
+ for (WebElement frame : BrowserDriver.getCurrentDriver().findElements(By.cssSelector(strFrameLoctor))) {
+ //System.out.println(frame.getAttribute("src"));
+ if (frame.isDisplayed()) {
+ allPagesFrame = frame;
+ isFrameVisible = true;
+ Log.info("Visible frame found, exiting loop");
+ break;
+ }
+ }
+ if (!isFrameVisible) {
+ TestCase.fail("No frames are visible hence not switching to frame");
+ }
+ //Waits till the "Loading.." text disappears
+ BrowserDriver.getCurrentDriver().switchTo().frame(allPagesFrame);
+ Log.info("Switched to Third level Tab continuing....");
+ }
+
+ public void selectByVisibleText(String locator, String element, String value, int timeout) throws Exception {
+ WebElement ele = getWebElementObject(locator, element);
+ waitForObjectToLoad(ele);
+ Wait(timeout);
+ if (ele.isDisplayed()) {
+ Select list = new Select(ele);
+ list.selectByVisibleText(value);
+ Log.info("Selected '" + value + "' from dropdown ''" + locator + "=" + element + "'");
+ } else {
+ Exception error = new Exception(element);
+ Log.error("Current page does not contain element ''" + locator + "=" + element + "'");
+ String Str = new String(error.getMessage());
+ Log.error("Error Message :" + Str.substring(1, 240));
+ throw error;
+ }
+ }
+}
+
+
+
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/SpreadsheetUtils.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/SpreadsheetUtils.java
new file mode 100755
index 000000000..69ad910f7
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/SpreadsheetUtils.java
@@ -0,0 +1,235 @@
+package com.rl.qa.utils;
+
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.DataFormatter;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.xssf.usermodel.XSSFSheet;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import static junit.framework.Assert.assertTrue;
+
+public class SpreadsheetUtils {
+
+
+ // IWMS spreadsheet file.
+ private File file;
+
+ // The one and only sheet expected from the Excel workbook.
+ private Sheet sheet;
+
+
+
+ public String getCellValue(String colHeader,int rowNum) {
+ int numberOfCells = 0;
+ int colIndex = 0;
+ String cellValue = "";
+ Iterator rowIterator = this.sheet.rowIterator();
+ while (rowIterator.hasNext())
+ {
+ Row headerRow = (Row) rowIterator.next();
+ numberOfCells = headerRow.getPhysicalNumberOfCells();
+ for(int i=0;i -1);
+
+ String suffix = file.getName().substring(dot);
+
+ if (suffix.equalsIgnoreCase(".xls")) {
+ return ".xls";
+ } else if (suffix.equalsIgnoreCase(suffix)) {
+ return ".xlsx";
+ } else {
+ String msg = String.format(
+ "File '%s' is not of a support type ['xls','xlsx]!",
+ file.getName()
+ );
+
+ throw new IllegalStateException(msg);
+ }
+ }
+
+ private Sheet getSheet(File spreadsheet) throws IOException {
+ String suffix = getFileSuffix(spreadsheet);
+ FileInputStream inputStream = new FileInputStream(spreadsheet);
+ if (suffix.equals(".xlsx")) {
+ XSSFWorkbook book = new XSSFWorkbook(inputStream);
+ XSSFSheet sheet = book.getSheetAt(0);
+
+ return sheet;
+ } else {
+ HSSFWorkbook book = new HSSFWorkbook(inputStream);
+ HSSFSheet sheet = book.getSheetAt(0);
+
+ return sheet;
+ }
+ }
+
+
+ /**
+ * Create instance given the spreadsheet file.
+ *
+ * @param spreadsheet - file containing an IWMS spreadsheet
+ */
+ public SpreadsheetUtils(File spreadsheet) throws IOException {
+ this.file = spreadsheet;
+ this.sheet = this.getSheet(spreadsheet);
+ }
+
+ public static void main(String args[]){
+ try{
+ SpreadsheetUtils obj = new SpreadsheetUtils(new File("C:/Users/RLE0239/Desktop/Sales.xls"));
+ System.out.println(System.getProperty("user.dir"));
+ System.out.println(obj.getCellValue("Sales Group", 5));
+ System.out.println(obj.getCellValue("Currency Type",4));
+ System.out.println(obj.getCellValue("Currency Type",6));
+ }catch(Exception e){
+
+ }
+
+ }
+
+ public String getDateCellValue(String colHeader,int rowNum) {
+ int numberOfCells = 0;
+ int colIndex = 0;
+ String cellValue = "";
+ Iterator rowIterator = this.sheet.rowIterator();
+ while (rowIterator.hasNext())
+ {
+ Row headerRow = (Row) rowIterator.next();
+ numberOfCells = headerRow.getPhysicalNumberOfCells();
+ for(int i=0;i colIndex = new ArrayList<>();
+ String cellValue = "";
+ int headerCount = 0;
+ Iterator rowIterator = this.sheet.rowIterator();
+ while (rowIterator.hasNext())
+ {
+ Row headerRow = (Row) rowIterator.next();
+ numberOfCells = headerRow.getPhysicalNumberOfCells();
+ for(int i=0;i1){
+ System.out.println("Same header name is present more than one: "+headerCount);
+ }else if(headerCount==0){
+ System.out.println("Same header name is not present "+headerCount);
+ }
+
+ String value = "";
+ for(int i=0;iJan Papousek
+ *
+ * @see Extending Selenium 2.0
+ * WebDriver to Support AJAX
+ */
+public class StaleReferenceAwareFieldDecorator extends DefaultFieldDecorator {
+ private final int numberOfTries;
+ /**
+ * Creates a new instance of the decorator
+ *
+ * @param factory
+ * locator factory
+ * @param numberOfTries
+ * number of tries to locate element
+ */
+ public StaleReferenceAwareFieldDecorator(ElementLocatorFactory factory, int numberOfTries) {
+ super(factory);
+ this.numberOfTries = numberOfTries;
+ }
+
+ @Override
+ protected WebElement proxyForLocator(ClassLoader loader, ElementLocator locator) {
+ InvocationHandler handler = new StaleReferenceAwareElementLocator(locator);
+ WebElement proxy = (WebElement) Proxy.newProxyInstance(loader, new Class[] { WebElement.class,
+ WrapsElement.class }, handler);
+ return proxy;
+ }
+
+ private class StaleReferenceAwareElementLocator extends LocatingElementHandler {
+ private final ElementLocator locator;
+ public StaleReferenceAwareElementLocator(ElementLocator locator) {
+ super(locator);
+ this.locator = locator;
+ }
+ public Object invoke(Object object, Method method, Object[] objects) throws Throwable {
+ WebElement element = null;
+ for (int i = 0; i < numberOfTries; i++) {
+ element = locator.findElement();
+ if ("getWrappedElement".equals(method.getName())) {
+ return element;
+ }
+ try {
+ return invokeMethod(method, element, objects);
+ } catch (StaleElementReferenceException ignored) {
+ }
+ }
+ throw new RuntimeException("Cannot invoke " + method.getName() + " on element " + element
+ + ". Cannot find it");
+ }
+ private Object invokeMethod(Method method, WebElement element, Object[] objects) throws Throwable {
+ try {
+ return method.invoke(element, objects);
+ } catch (InvocationTargetException e) {
+ throw e.getCause();
+ } catch (IllegalArgumentException e) {
+ throw e.getCause();
+ } catch (IllegalAccessException e) {
+ throw e.getCause();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/ThreadPool.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/ThreadPool.java
new file mode 100755
index 000000000..0acd8296c
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/utils/ThreadPool.java
@@ -0,0 +1,152 @@
+package com.rl.qa.utils;
+
+import java.util.concurrent.*;
+
+public class ThreadPool {
+ private static ExecutorService executorService = null;
+
+ private static ExecutorService getExecutorService() {
+ if (executorService == null) {
+ executorService = Executors.newCachedThreadPool();
+ }
+
+ return executorService;
+ }
+
+ /**
+ * Executes the specified runnable in a thread from a thread pool.
+ */
+ public static void execute(Runnable command) {
+ ExecutorService es = getExecutorService();
+
+ es.execute(command);
+ }
+
+ /**
+ * Executes the specified runnable in a thread from a thread pool.
+ *
+ * @returns a handle to the running task
+ */
+ public static Future> submit(Runnable command) {
+ ExecutorService es = getExecutorService();
+
+ Future> f = es.submit(command);
+
+ return f;
+ }
+
+ /**
+ * Submits a value-returning task for execution and returns a Future
+ * representing the pending results of the task.
+ *
+ * If you would like to immediately block waiting for a task, you
+ * can use constructions of the form
+ *
+ * result = exec.submit(aCallable).get();
+ *
+ * @param task - the task to submit
+ *
+ * @return a Future representing pending completion of the task
+ */
+ public static Future submit(Callable task) {
+ ExecutorService es = getExecutorService();
+
+ Future f = es.submit(task);
+
+ return f;
+ }
+
+ private static ScheduledExecutorService scheduledExecutorService = null;
+
+ private static ScheduledExecutorService createScheduledExecutorService() {
+ if (scheduledExecutorService == null) {
+ scheduledExecutorService = Executors.newScheduledThreadPool(1);
+ }
+
+ return scheduledExecutorService;
+ }
+
+ /**
+ * Creates and executes a ScheduledFuture that becomes enabled after the given delay.
+ *
+ * @param callable - the task to execute
+ * @param delay - the time to wait before executing the task
+ * @param unit - the time units of the delay argument
+ *
+ * @return a Future that can be used to extract result or cancel
+ */
+ public static ScheduledFuture schedule(
+ Callable callable,
+ long delay,
+ TimeUnit unit
+ ) {
+ return createScheduledExecutorService().schedule(callable, delay, unit);
+ }
+
+ /**
+ * Creates and executes a one-shot action after waiting for the specified delay.
+ *
+ * @param command - the task to execute
+ * @param delay - the time to wait before executing the task
+ * @param unit - the time units of the delay argument
+ *
+ * @return a Future representing pending completion of the task, and whose get()
+ * method will return null upon completion
+ */
+ public static ScheduledFuture> schedule(Runnable command, long delay, TimeUnit unit) {
+ return createScheduledExecutorService().schedule(command, delay, unit);
+ }
+
+ /**
+ * Creates and executes a periodic action that becomes enabled first after the
+ * given initial delay, and subsequently with the given period; that is executions
+ * will commence after initialDelay then initialDelay+period, then
+ * initialDelay + 2 * period, and so on. If any execution of the task encounters
+ * an exception, subsequent executions are suppressed. Otherwise, the task will
+ * only terminate via cancellation or termination of the executor.
+ *
+ * @param command - the task to execute
+ * @param initialDelay - the time to wait before the first execution
+ * @param period - the time to wait before subsequent executions without
+ * concern with the completion of prior executions
+ * @param unit - the time units of the initialDelay and period arguments
+ *
+ * @return a future representing pending completion of the task, and whose get()
+ * method will throw an exception upon cancellation
+ */
+ public static ScheduledFuture> scheduleAtFixedRate(
+ Runnable command,
+ long initialDelay,
+ long period,
+ TimeUnit unit
+ ) {
+ return createScheduledExecutorService().
+ scheduleAtFixedRate(command, initialDelay, period, unit);
+ }
+
+ /**
+ * Creates and executes a periodic action that becomes enabled first after the
+ * given initial delay, and subsequently with the given delay between the termination
+ * of one execution and the commencement of the next. If any execution of the task
+ * encounters an exception, subsequent executions are suppressed. Otherwise, the
+ * task will only terminate via cancellation or termination of the executor.
+ *
+ * @param command - the task to execute
+ * @param initialDelay - the time to wait before the first execution
+ * @param delay - the time to wait after termination of one execution and
+ * start of subsequent executions
+ * @param unit - the time units of the initialDelay and delay arguments
+ *
+ * @return a future representing pending completion of the task, and whose get()
+ * method will throw an exception upon cancellation
+ */
+ public static ScheduledFuture> scheduleWithFixedDelay(
+ Runnable command,
+ long initialDelay,
+ long delay,
+ TimeUnit unit
+ ) {
+ return createScheduledExecutorService().
+ scheduleWithFixedDelay(command, initialDelay, delay, unit);
+ }
+}
\ No newline at end of file
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CFTViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CFTViews.java
new file mode 100755
index 000000000..ee236896f
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CFTViews.java
@@ -0,0 +1,488 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.LoginSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.PageFactory;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.WebDriverWait;
+
+import java.util.Random;
+import java.util.logging.Logger;
+
+import static junit.framework.TestCase.assertTrue;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0097 on 21-06-2016.
+ */
+public class CFTViews {
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ public static WebElement PagesFrame;
+ public static String stackName="";
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ public static void clickOnWorkZoneLink(){
+ try {
+ Thread.sleep(3000);
+ SeleniumUtil.waitForElementIsClickable("id", "workZoneNew",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("id", "workZoneNew", SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnWorkZoneLink");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOntheLink(String strLink){
+ try {
+ Thread.sleep(2000);
+ SeleniumUtil.waitForElementIsClickable("paritallinktext", strLink, 10, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("paritallinktext", strLink, SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOntheLink");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnLink(String strLink){
+ try {
+ SeleniumUtil.getFrameIndex("linktext", strLink);
+ SeleniumUtil.waitForElementIsClickable("linktext", strLink, 10, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("linktext", strLink, SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnLink");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOntheCssselectorField(String strcssselectorField){
+ try {
+ SeleniumUtil.click("cssselector", strcssselectorField, SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOntheCssselectorField");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectBlueprintAndClickOnLaunchButton(String strBlueprint){
+ try {
+ SeleniumUtil.click("cssselector", "li[title='"+strBlueprint+"']", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("cssselector", ".btn.pull-left.btn-primary.launchBtn.launchBtnMargin", SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("selectBlueprintAndClickOnLaunchButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnOKButton(String strButton){
+ try {
+ SeleniumUtil.click("xpath", ".//button[./text()='"+strButton+"']", SeleniumUtilities.OBJWAITTIMEOUT);
+ Thread.sleep(5000);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnOKButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void enterStackName(String strStackName){
+ try {
+ SeleniumUtil.type("id", "cftInput",strStackName, SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("enterStackName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnButtonButton(){
+ try {
+ SeleniumUtil.waitForElementIsClickable("cssselector", "input[value='Submit']", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("cssselector", "input[value='Submit']", SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnButtonButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyStackName(String strStackName,String strStatus){
+ try {
+ Thread.sleep(5000);
+ SeleniumUtil.waitForElementVisibilityOf("cssselector", "div[data-stackname='" + strStackName + "']", 10, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.waitUntilElementContainsText("cssselector","div[data-stackname='"+strStackName+"'] span[class='stackStatus']",strStatus,200,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("verifyStackName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnMoreInfoofInstanceCard(String strCardName){
+ try {
+ SeleniumUtil.click("xpath", ".//span[@data-original-title='"+strCardName+"']/parent::div/following-sibling::div[1]/div/span/a", SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnMoreInfoofInstanceCard");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void getIPAddress(String strCardName){
+ try {
+ String IPAddress = SeleniumUtil.getTextValue("xpath", ".//span[@data-original-title='"+strCardName+"']/parent::div/following-sibling::div[2]/div/span[1]", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.Log.info("IP Address :"+IPAddress);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("getIPAddress");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnConfirmatinButton(){
+ try {
+ SeleniumUtil.click("cssselector", "#launchResultContainer > div > div > div.modal-footer > button", SeleniumUtilities.OBJWAITTIMEOUT);
+ Thread.sleep(2000);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnConfirmatinButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void seeDashboard(){
+ try {
+ SeleniumUtil.waitForElementIsClickable("id", "workzone", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.waitUntilElementNotContainsText("id", "workzone","WORKZONE", 8,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("seeDashboard");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void expendTheTree(String strTreeHead){
+ try {
+ if(SeleniumUtil.waitForElementVisibilityOf("xpath", ".//a[text()='"+strTreeHead+"']/ancestor::li/span[@class='expand-collapse click-expand fa fa-angle-right']", 2, SeleniumUtilities.OBJWAITTIMEOUT)) {
+ SeleniumUtil.waitForElementIsClickable("paritallinktext", strTreeHead, 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("paritallinktext", strTreeHead, SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("expendTheTree");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnTrack(){
+ try {
+ SeleniumUtil.click("id", "trackNew",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnTrack");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnLineChartNotifications(String strLabel){
+ try {
+// SeleniumUtil.getFrameIndex("xpath", ".//a[contains(./text(),'"+strLabel+"')]/ancestor::li/span[@class='icon fa fa-line-chart']");
+ SeleniumUtil.click("xpath", ".//a[contains(./text(),'"+strLabel+"')]/ancestor::li/span[@class='icon fa fa-line-chart']",SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.switchTodefaultContent();
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnLineChartNotifications");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnFileNotifications(String strLabel){
+ try {
+// SeleniumUtil.getFrameIndex("xpath", ".//a[contains(./text(),'"+strLabel+"')]/ancestor::li/span[@class='icon fa fa-lg fa-fw fa-files-o']");
+ SeleniumUtil.click("xpath", ".//a[contains(./text(),'"+strLabel+"')]/ancestor::li/span[@class='icon fa fa-lg fa-fw fa-files-o']",SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.switchTodefaultContent();
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnFileNotifications");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnDesktopNotifications(String strLabel){
+ try {
+ SeleniumUtil.click("xpath", ".//a[contains(./text(),'"+strLabel+"')]/ancestor::li/span[@class='icon fa fa-fw fa-1x fa-desktop']",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnDesktopNotifications");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void getPrivateIPAddress(String strCardName){
+ try {
+ String IPAddress = SeleniumUtil.getTextValue("cssselector", "span[class='ip-cell-private']", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.Log.info("IP Address :"+IPAddress);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("getPrivateIPAddress");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyPublicIPAddress(String strCardName){
+ try {
+ String IPAddress = SeleniumUtil.getTextValue("xpath", ".//*[./text()='"+strCardName+"']/parent::div/following-sibling::div[1]/span[@class='ip-cell-public']", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.Log.info("Public IP Address :"+IPAddress);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("verifyPublicIPAddress");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void switchToFrame() throws Throwable {
+ SeleniumUtil.Log.info("Switching to default frame....");
+ BrowserDriver.getCurrentDriver().switchTo().defaultContent();
+ boolean isFrameVisible = false;
+ SeleniumUtil.Log.info("Started finding visible frame....");
+ for (WebElement frame : BrowserDriver.getCurrentDriver().findElements(By.tagName("iframe"))) {
+ //System.out.println(frame.getAttribute("src"));
+ if (frame.isDisplayed()) {
+ PagesFrame = frame;
+ isFrameVisible = true;
+ SeleniumUtil.Log.info("Visible frame found, exiting loop");
+ break;
+ }
+ }
+ if (!isFrameVisible) {
+ fail("No frames are visible hence not switching to frame");
+ }
+ //Waits till the "Loading.." text disappears
+ BrowserDriver.getCurrentDriver().switchTo().frame(PagesFrame);
+ SeleniumUtil.Log.info("Switched to Third level Tab continuing....");
+ }
+
+ public static void selectOrg(String orgName) {
+ try {
+ SeleniumUtil.selectByVisibleText("id","selectOrgName",orgName,SeleniumUtil.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("selectOrg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnConfigStackParaLink(String configStackPara) {
+ try {
+ SeleniumUtil.click("linktext",configStackPara,SeleniumUtil.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnConfigStackParaLink");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void enterStackPara(String stackPara, String webEleAttribute) {
+ try {
+ SeleniumUtil.clear("xpath","//input[@data-cftparameter-name='"+webEleAttribute+"']",SeleniumUtil.OBJWAITTIMEOUT);
+ SeleniumUtil.type("xpath","//input[@data-cftparameter-name='"+webEleAttribute+"']",stackPara,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("enterStackPara");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void enterInstanceUserName(String instanceUserName) {
+ try {
+ SeleniumUtil.type("cssselector",".cftResourceInput.form-control.cftResourceUsernameInput",instanceUserName,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("enterStackUserName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnBlueprintType(String blueprintType) {
+ try {
+ SeleniumUtil.click("cssselector",".fa.fa-fw.ng-scope.fa-plus-circle",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnBlueprintType");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void enterUniqueStackName(String uniqueStackName) {
+ try {
+ int max = 10000;
+ int min = 1000;
+ Random r = new Random();
+ int ranNumber = r.nextInt((max - min) + 1) + min;
+ stackName = "RL" + ranNumber;
+ SeleniumUtil.type("id","cftInput",uniqueStackName,SeleniumUtilities.OBJWAITTIMEOUT);
+ System.out.println(stackName);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnBlueprintType");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void refreshCFTStackPage() {
+ try {
+ for (int i = 0; i < 10; i++) {
+ if (SeleniumUtil.verifyTextValue("cssselector", ".stackStatus.orange", "CREATE_IN_PROGRESS", SeleniumUtilities.OBJWAITTIMEOUT)) {
+ Thread.sleep(3000);
+ SeleniumUtil.click("xpath", ".//*[@id='cloudFormationPage']//button", SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ else{
+ break;
+ }
+ }
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnBlueprintType");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyStatusCreateInProgress(String stackName) {
+ try {
+ SeleniumUtil.waitUntilElementContainsText("cssselector",".stackStatus.orange","CREATE_IN_PROGRESS",SeleniumUtilities.OBJWAITTIMEOUT);
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), 50);
+ wait.until(ExpectedConditions.textToBePresentInElement(By.tagName("*"),"CREATE_IN_PROGRESS"));
+ SeleniumUtil.waitForElementVisibilityOf("cssselector",".stackStatus.orange", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("cssselector",".stackStatus.orange","CREATE_IN_PROGRESS",SeleniumUtilities.OBJWAITTIMEOUT));{
+ logger.info("Verified status : CREATE_IN_PROGRESS");
+ }
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("verifyStatusCreateInProgress");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyStatusCreateComplete() {
+ try {
+ SeleniumUtil.waitUntilElementContainsText("cssselector",".stackStatus.green","CREATE_COMPLETE",SeleniumUtilities.OBJWAITTIMEOUT);
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), 50);
+ wait.until(ExpectedConditions.textToBePresentInElement(By.tagName("*"),"CREATE_COMPLETE"));
+ SeleniumUtil.waitForElementVisibilityOf("cssselector",".stackStatus.green", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("cssselector",".stackStatus.green","CREATE_COMPLETE",SeleniumUtilities.OBJWAITTIMEOUT));{
+ logger.info("Verified status : CREATE_COMPLETE");
+ }
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("verifyStatusCreateComplete");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickonTheLinkSaid(String strLinkSaid) {
+ try {
+ SeleniumUtil.click("xpath", ".//*[@id='myTab3']/li[1]/a", 15);
+
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickLinkSaid");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickonCloudformationTab(String strCloudForamtion) {
+ try {
+ SeleniumUtil.click("xpath", "//*[contains(text(),'"+strCloudForamtion+"')]", 15);
+
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickLinkSaid");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void VerifyCloudFormationBlueprint(String strCloudForamtionBP) {
+ try {
+ Thread.sleep(1000);
+ assertTrue(SeleniumUtil.verifyTextValue("xpath", "//li[@class='card-text-overflow'][@title='"+strCloudForamtionBP+"']", strCloudForamtionBP, SeleniumUtilities.OBJWAITTIMEOUT));
+ System.out.println("CloudBlueprint is Created");
+
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickLinkSaid");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnBlueprints() {
+ try {
+ SeleniumUtil.click("xpath", ".//*[@id='myTab3']/li[1]/ul/li[2]/a", 15);
+
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnBlueprints");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void VerifySoftwareStackBlueprint(String strSoftwareStackBP) {
+ try {
+ Thread.sleep(1000);
+ assertTrue(SeleniumUtil.verifyTextValue("xpath", "//li[@class='card-text-overflow'][@title='"+strSoftwareStackBP+"']", strSoftwareStackBP, SeleniumUtilities.OBJWAITTIMEOUT));
+ System.out.println("SoftwareStack BP is Created");
+
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("verifySoftwarestackBP");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+
+
+
+
+
+
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ChefServerSetupViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ChefServerSetupViews.java
new file mode 100755
index 000000000..71e43603b
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ChefServerSetupViews.java
@@ -0,0 +1,269 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.LoginSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import cucumber.api.java.eo.Se;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.remote.LocalFileDetector;
+import org.openqa.selenium.remote.RemoteWebElement;
+import org.openqa.selenium.support.PageFactory;
+
+import java.io.File;
+import java.util.logging.Logger;
+
+import static junit.framework.Assert.assertTrue;
+import static junit.framework.TestCase.assertFalse;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0372 on 20-07-2016.
+ */
+public class ChefServerSetupViews {
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+
+ public static void enterServerName(String chefServerName) {
+ try{
+ SeleniumUtil.waitForElementIsClickable("id","configname",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id","configname",chefServerName,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("typeServerName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void enterUserName(String userName) {
+ try{
+ SeleniumUtil.waitForElementIsClickable("id","loginname",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id","loginname",userName,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("typeUserName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void enterURL(String url) {
+ try{
+ SeleniumUtil.waitForElementIsClickable("id","url",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id","url",url,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("typeURL");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+// public static void clickOnPemFileBrowse() {
+// try{
+// String path = new String(new File(".").getCanonicalPath() + "\\src\\test\\resources\\Upload\\mycatqa.pem");
+//// System.out.println(path);
+//// logger.info(path);
+// WebDriver driver=SeleniumUtil.getWebDriver();
+// driver.findElement(By.xpath("//input[@id='userpemfile']")).sendKeys(path);
+// }
+// catch(Exception ex){
+// BaseView.takeScreenshot("clickOnPemFileBrowse");
+// SeleniumUtil.Log.info("Error :" + ex.getMessage());
+// fail(ex.getMessage());
+// }
+// }
+//
+// public static void clickOnKnifeBrowse() {
+// try{
+// Thread.sleep(5000);
+// String path = new String(new File(".").getCanonicalPath() + "\\src\\test\\resources\\Upload\\knife.rb");
+//// System.out.println(path);
+//// logger.info(path);
+// WebDriver driver=SeleniumUtil.getWebDriver();
+// driver.findElement(By.xpath("//input[@id='kniferbfile']")).sendKeys(path);
+// }
+// catch(Exception ex){
+// BaseView.takeScreenshot("clickOnPemFileBrowse");
+// SeleniumUtil.Log.info("Error :" + ex.getMessage());
+// fail(ex.getMessage());
+// }
+// }
+
+ public static void BrowsePemFileForChefServer() {
+ try{
+ WebDriver driver=SeleniumUtil.getWebDriver();
+ WebElement element = driver.findElement(By.id("userpemfile"));
+ LocalFileDetector detector = new LocalFileDetector();
+ String path = new String(new File(".").getCanonicalPath() + "/src/test/resources/Upload/mycatqa.pem");
+ File f = detector.getLocalFile(path);
+ ((RemoteWebElement)element).setFileDetector(detector);
+ element.sendKeys(f.getAbsolutePath());
+// element.sendKeys(path);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnPemFileBrowse");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void BrowseKnifeFileForChefServer() {
+ try{
+ WebDriver driver=SeleniumUtil.getWebDriver();
+ WebElement element = driver.findElement(By.id("kniferbfile"));
+ LocalFileDetector detector = new LocalFileDetector();
+ String path = new String(new File(".").getCanonicalPath() + "/src/test/resources/Upload/knife.rb");
+ File f = detector.getLocalFile(path);
+ ((RemoteWebElement)element).setFileDetector(detector);
+ element.sendKeys(f.getAbsolutePath());
+// element.sendKeys(path);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnPemFileBrowse");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+
+ public static void chefServerEditButton(String cherServerName,String Edit ) {
+ try{
+ Thread.sleep(1000);
+ SeleniumUtil.waitForElementIsClickable("xpath",".//*[@id='envtable']//td[text()='"+cherServerName+"']/following-sibling::td//*[@title='"+Edit+"']",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath",".//*[@id='envtable']//td[text()='"+cherServerName+"']/following-sibling::td//*[@title='"+Edit+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("chefServerEditButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void clearNameField() {
+ try{
+ SeleniumUtil.waitForElementIsClickable("id","configname",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.clear("id","configname",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clearNameField");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyChefServerName(String chefServerName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+chefServerName+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//*[text()='"+chefServerName+"']",chefServerName,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Verified created chef server:"+chefServerName);
+// } else {
+// logger.info("Chef Server not found:" +chefServerName);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyChefServerName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifySelectOrgISDisabled() {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("id","s2id_orgname",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ WebElement wb=SeleniumUtil.getElement("id","s2id_orgname",SeleniumUtilities.OBJWAITTIMEOUT);
+ String actClassValOfElement=wb.getAttribute("class");
+ String expClassValWhenEleIsDisabled="select2-container select2-container-disabled chooseOrganization width-100";
+ assertTrue(actClassValOfElement.equals(expClassValWhenEleIsDisabled));
+ logger.info("Select Organization is disbled");
+// } else {
+// logger.info("Element is enabled");
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifySelectOrgISDisabled");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ } }
+
+ public static void verifyChefServerIsDeleted(String chefServerName) {
+ try {
+// SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+chefServerName+"']/following-sibling::td[2]", 1, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertFalse(SeleniumUtil.isElementExist("xpath", ".//*[@id='envtable']//*[text()='"+chefServerName+"']")); {
+ logger.info(chefServerName+" does not exists : deleted");
+// } else {
+// logger.info(chefServerName+" does not exists : deleted");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyChefServerIsDeleted");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyServerDetails(String chefServerName, String chefUserName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+chefServerName+"']/../td[text()='"+chefUserName+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//*[text()='"+chefServerName+"']/../td[text()='"+chefUserName+"']",chefUserName,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Chef server" +chefServerName+" exists with :"+chefUserName);
+// } else {
+// logger.info("Chef server" +chefServerName+" does not exists with :"+chefUserName);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("chefUserName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void uploadKnifeFile(String fileName) {
+ try{
+ WebDriver driver=SeleniumUtil.getWebDriver();
+ WebElement element = driver.findElement(By.id("kniferbfile"));
+ LocalFileDetector detector = new LocalFileDetector();
+ String path = new String(new File(".").getCanonicalPath() + "/src/test/resources/Upload/jagadeesh12_ChefServerFile"+fileName);
+ File f = detector.getLocalFile(path);
+ ((RemoteWebElement)element).setFileDetector(detector);
+ element.sendKeys(f.getAbsolutePath());
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnPemFileBrowse");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void uploadPemFile(String fileName) {
+ try{
+ WebDriver driver=SeleniumUtil.getWebDriver();
+ WebElement element = driver.findElement(By.id("userpemfile"));
+ LocalFileDetector detector = new LocalFileDetector();
+ String path = new String(new File(".").getCanonicalPath() + "/src/test/resources/Upload/jagadeesh12_ChefServerFile/"+fileName);
+ File f = detector.getLocalFile(path);
+ ((RemoteWebElement)element).setFileDetector(detector);
+ element.sendKeys(f.getAbsolutePath());
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("uploadPemFile");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+
+ public static void selectTheOrg(String strOrgname) {
+ try{
+ //SeleniumUtil.waitForElementIsClickable("id","loginname",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath", "//span[text()='Select an Organization']",SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath","//div[text()='"+strOrgname+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("selectOrg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+}
+
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ConfigBlueprintForOSImageUsingProAWSViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ConfigBlueprintForOSImageUsingProAWSViews.java
new file mode 100755
index 000000000..66ab31f2f
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ConfigBlueprintForOSImageUsingProAWSViews.java
@@ -0,0 +1,86 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.LoginSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+import static junit.framework.TestCase.assertFalse;
+import static junit.framework.TestCase.assertTrue;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0372 on 23-09-2016.
+ */
+public class ConfigBlueprintForOSImageUsingProAWSViews {
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+
+ public static void verifyChooseOSIsDisabled() {
+ try {
+ WebElement wb=SeleniumUtil.getElement("id","instanceOS",SeleniumUtilities.OBJWAITTIMEOUT);
+ assertFalse(wb.isEnabled());
+ logger.info("Choose Operating System is disabled");
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("verifyElementIsDisabled");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyChooseProviderIsDisabled() {
+ try {
+ WebElement wb=SeleniumUtil.getElement("id","providerId",SeleniumUtilities.OBJWAITTIMEOUT);
+ assertFalse(wb.isEnabled());
+ logger.info("Choose Choose Provider is disabled");
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("verifyChooseProviderIsDisabled");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyChooseAvailableImages() {
+ try {
+ WebElement wb=SeleniumUtil.getElement("id","imageId",SeleniumUtilities.OBJWAITTIMEOUT);
+ assertFalse(wb.isEnabled());
+ logger.info("Choose Available Images is disabled");
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("verifyChooseAvailableImages");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyChooseOrgIsDisabled() {
+ try {
+ WebElement wb=SeleniumUtil.getElement("id","",SeleniumUtilities.OBJWAITTIMEOUT);
+ assertFalse(wb.isEnabled());
+ logger.info("Choose Organization is disabled");
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("verifyChooseOrgIsDisabled");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyLaunchButtonISDisplayed() {
+ try {
+ assertTrue(SeleniumUtil.verifyTextValue("id","blueprintLaunch","Launch Blueprint",SeleniumUtilities.OBJWAITTIMEOUT));
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("verifyChooseOrgIsDisabled");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ConfigBlueprintForSSTempUsingProAWSViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ConfigBlueprintForSSTempUsingProAWSViews.java
new file mode 100755
index 000000000..e71005cf4
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ConfigBlueprintForSSTempUsingProAWSViews.java
@@ -0,0 +1,170 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.LoginSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+import static junit.framework.Assert.assertTrue;
+import static junit.framework.TestCase.assertFalse;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0372 on 10-09-2016.
+ */
+public class ConfigBlueprintForSSTempUsingProAWSViews {
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+
+ public static void verifyBlueprintInWorkZone(String blueprintName, String pageName) {
+ try {
+ assertTrue(SeleniumUtil.verifyTextValue("xpath", "//*[text()='"+blueprintName+"']",blueprintName,SeleniumUtilities.OBJWAITTIMEOUT));
+ logger.info("Verified Blueprint in "+pageName+" "+blueprintName);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyBlueprintInWorkZone");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void clickOnMoreInfo(String moreInfo, String blueprintName) {
+ try {
+ SeleniumUtil.click("cssselector","i[title='More Info']",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnMoreInfo");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void clickOnClose() {
+ try {
+ SeleniumUtil.click("xpath",".//*[@id='instanceLogsPage']//button",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnCloseInstanceLogPopup");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void selectBlueprint(String blueprintName) {
+ try {
+ SeleniumUtil.click("xpath","//*[text()='"+blueprintName+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectBlueprint");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnCopyBlueprint() {
+ try {
+ SeleniumUtil.click("cssselector","button[title='Copy Blueprint']",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnCopyBlueprint");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void selectParametersOnPopupWindow(String name, String idOfElement) {
+ try {
+ SeleniumUtil.selectByVisibleText("id",idOfElement,name,SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectParametersOnPopupWindow");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void clickOnSave(String buttonText) {
+ try {
+ SeleniumUtil.click("xpath","//*[text()='"+buttonText+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnSaveOnPopup");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnEnv(String proName, String envName) {
+ try {
+ SeleniumUtil.click("xpath","//div[span[text()='"+proName+"']]//*[text()='"+envName+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnSaveOnPopup");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnDeleteBlueprint(String buttonTitle) {
+ try {
+ SeleniumUtil.click("cssselector","button[title='Remove Blueprint']",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnDelete");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyBlueprintDeleted(String blueprintName) {
+ try {
+ assertFalse(SeleniumUtil.isElementExist("xpath", "//*[text()='"+blueprintName+"']"));
+ logger.info(blueprintName+" does not exists : deleted");
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyBlueprintDeleted");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnEditBlueprintButton(String buttonTitle, String blueprintName) {
+ try {
+ SeleniumUtil.click("xpath","//li[@title='"+blueprintName+"']/following-sibling::button[@title='"+buttonTitle+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyBlueprintDeleted");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnSettings() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id","settingsNew",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("id","settingsNew",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnSettings");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void deleteBlueprint(String title) {
+ try {
+ SeleniumUtil.click("cssselector","span[title='"+title+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("deleteBlueprint");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnDeleteOnConfirmationPopup() {
+ try {
+ SeleniumUtil.click("cssselector",".btn.cat-btn-delete",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnDeleteOnConfirmationPopup");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ConfigureNexusServerViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ConfigureNexusServerViews.java
new file mode 100755
index 000000000..d75af7c08
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ConfigureNexusServerViews.java
@@ -0,0 +1,62 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.LoginSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+import static junit.framework.TestCase.assertTrue;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0372 on 09-08-2016.
+ */
+public class ConfigureNexusServerViews {
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+
+ public static void verifyNexusServerName(String nexusServerName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+nexusServerName+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue (SeleniumUtil.verifyTextValue("xpath",".//*[@id='envtable']//*[text()='"+nexusServerName+"']",nexusServerName,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info(nexusServerName+" is available");
+// } else {
+// logger.info(nexusServerName+" is not available");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyNexusServerName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyNexusServerInfo(String nexusServerName, String nexusServerDetails) {
+ try {
+// SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+nexusServerName+"']/../*[text()='"+nexusServerDetails+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue (SeleniumUtil.verifyTextValue("xpath",".//*[@id='envtable']//*[text()='"+nexusServerName+"']/../*[text()='"+nexusServerDetails+"']",nexusServerDetails,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info(nexusServerName+" is available with "+nexusServerDetails);
+// } else {
+// logger.info(nexusServerName+" is not available with "+nexusServerDetails);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyNexusServerName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectOrgInNexusConfigPage(String orgName) {
+ try {
+ SeleniumUtil.selectByVisibleText("id","orgname",orgName,SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectOrgInNexusConfigPage");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+}
+
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ConfigureProviderViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ConfigureProviderViews.java
new file mode 100755
index 000000000..1eec9fbdf
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ConfigureProviderViews.java
@@ -0,0 +1,353 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.LoginSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.remote.LocalFileDetector;
+import org.openqa.selenium.remote.RemoteWebElement;
+import org.openqa.selenium.support.PageFactory;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.WebDriverWait;
+
+import java.io.File;
+import java.util.logging.Logger;
+
+import static junit.framework.TestCase.*;
+
+/**
+ * Created by RLE0372 on 02-08-2016.
+ */
+public class ConfigureProviderViews {
+
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+
+ public static void selectProviderType(String providerType) {
+
+ try {
+ SeleniumUtil.selectByVisibleText("id","providertype",providerType,SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.waitForElementIsClickable("id","s2id_providertype",8, SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.click("id","s2id_providertype",SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.click("xpath",".//*[@id='select2-drop']//*[text()='"+providerType+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("selectProviderType");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void clickCredentialSelButton(String buttonID) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id",buttonID,8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.checkbox("id",buttonID,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickCredentialSelButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectOrg(String orgName) {
+ try {
+ //SeleniumUtil.waitForElementIsClickable("xpath","//label[contains(text(),'Organization')]/following-sibling::div",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ //Thread.sleep(1000);
+// SeleniumUtil.click("xpath","//span[text()='Select an Organization']",SeleniumUtilities.OBJWAITTIMEOUT);
+// Thread.sleep(1000);
+ //SeleniumUtil.waitForElementIsClickable("xpath","//*[text()='"+orgName+"']",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ //Thread.sleep(1000);
+// SeleniumUtil.click("xpath","//div[text()='"+orgName+"']", SeleniumUtilities.OBJWAITTIMEOUT);
+ //select/option[@value='"+orgName+"']"
+// Thread.sleep(2000);
+ SeleniumUtil.selectByVisibleText("id","orgname",orgName,SeleniumUtilities.OBJWAITTIMEOUT);
+
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("selectOrg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void OrgSelct(String orgName) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath","//label[contains(text(),'Organization')]/following-sibling::div",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ Thread.sleep(1000);
+ SeleniumUtil.click("xpath","//label[contains(text(),'Organization')]/following-sibling::div",SeleniumUtilities.OBJWAITTIMEOUT);
+ Thread.sleep(1000);
+ //SeleniumUtil.waitForElementIsClickable("xpath","//*[text()='"+orgName+"']",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ //Thread.sleep(1000);
+ SeleniumUtil.click("xpath","//select[@id='orgId']/option[text()='"+orgName+"']", SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("selectOrg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectRegion(String region) {
+ try {
+ SeleniumUtil.selectByVisibleText("name","region","US West (N. California) | us-west-1",SeleniumUtilities.OBJWAITTIMEOUT);
+// Thread.sleep(5000);
+// SeleniumUtil.waitForElementIsClickable("xpath","(//span[text()='Select Region'])[2]",8, SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.click("xpath","(//span[text()='Select Region'])[2]",SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.waitForElementIsClickable("xpath","//option[contains(text(),'"+region+"')]",8, SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.click("xpath","//option[contains(text(),'"+region+"')]",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("selectRegion");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectKeyPair(String keyPair) {
+ try {
+ SeleniumUtil.selectByVisibleText("name","keyPairName",keyPair, SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.waitForElementIsClickable("xpath","//*[text()='Select Key Pair:']/following-sibling::div",8, SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.click("xpath","//*[text()='Select Key Pair:']/following-sibling::div",SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.waitForElementIsClickable("xpath","//*[text()='"+keyPair+"']",8, SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.click("xpath","//*[text()='"+keyPair+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("selectKeyPair");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void browsePemFileForProvider() {
+ try {
+ WebDriver driver=SeleniumUtil.getWebDriver();
+ WebElement element = driver.findElement(By.name("fileObject"));
+ LocalFileDetector detector = new LocalFileDetector();
+ String path = new String(new File(".").getCanonicalPath() + "/src/test/resources/Upload/bootstrapncal.pem");
+ File f = detector.getLocalFile(path);
+ ((RemoteWebElement)element).setFileDetector(detector);
+ element.sendKeys(f.getAbsolutePath());
+// element.sendKeys(path);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("selectKeyPair");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyProvidersName(String providerName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//*[contains(text(),'Azure')]", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.waitUntilElementContainsText("xpath","//*[contains(text(),'Azure')]",providerName,8,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("verifyProvidersName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyMessage(String actMsg) {
+ try {
+ SeleniumUtil.waitUntilElementContainsText("xpath",".//*[contains(./text(),'"+actMsg+"')]",actMsg,SeleniumUtilities.OBJWAITTIMEOUT);
+ WebDriverWait wait = new WebDriverWait(BrowserDriver.getCurrentDriver(), 500);
+ wait.until(ExpectedConditions.textToBePresentInElement(By.tagName("*"), actMsg));
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//*[contains(text(),'"+actMsg+"')]", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("xpath",".//*[contains(./text(),'"+actMsg+"')]",actMsg,SeleniumUtilities.OBJWAITTIMEOUT));{
+ logger.info("Verified : " +actMsg);
+ }
+// else{
+// logger.info("Not Verified"+actMsg);
+// }
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("verifyProvidersName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+ public static void browseAzurePemFile() {
+ try {
+ WebDriver driver=SeleniumUtil.getWebDriver();
+ WebElement element = driver.findElement(By.id("azurepem"));
+ LocalFileDetector detector = new LocalFileDetector();
+ String path = new String(new File(".").getCanonicalPath() + "/src/test/resources/Upload/rlcatalyst.pem");
+ File f = detector.getLocalFile(path);
+ ((RemoteWebElement)element).setFileDetector(detector);
+ element.sendKeys(f.getAbsolutePath());
+// element.sendKeys(path);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("selectKeyPair");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void browseAzurePrivateKeyFile() {
+ try {
+ WebDriver driver=SeleniumUtil.getWebDriver();
+ WebElement element = driver.findElement(By.id("azurekey"));
+ LocalFileDetector detector = new LocalFileDetector();
+ String path = new String(new File(".").getCanonicalPath() + "/src/test/resources/Upload/rlcatalyst.key");
+ File f = detector.getLocalFile(path);
+ ((RemoteWebElement)element).setFileDetector(detector);
+ element.sendKeys(f.getAbsolutePath());
+// element.sendKeys(path);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("selectKeyPair");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void browseOpenStackPemFile(String openStackpemFile) {
+ try {
+ WebDriver driver=SeleniumUtil.getWebDriver();
+ WebElement element = driver.findElement(By.id("openstackinstancepem"));
+ LocalFileDetector detector = new LocalFileDetector();
+ String path = new String(new File(".").getCanonicalPath() + "/src/test/resources/Upload/"+ openStackpemFile);
+ File f = detector.getLocalFile(path);
+ ((RemoteWebElement)element).setFileDetector(detector);
+ element.sendKeys(f.getAbsolutePath());
+// element.sendKeys(path);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("browseOpenStackPemFile");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyProviderName(String providerName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+providerName+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue (SeleniumUtil.verifyTextValue("xpath",".//*[@id='envtable']//*[text()='"+providerName+"']",providerName,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Verified : "+providerName);
+// } else {
+// logger.info("Not verified:" +providerName);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyProvideDetails");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifySelProviderTypeisDisabled() {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("id","s2id_providertype",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ WebElement wb=SeleniumUtil.getElement("id","s2id_providertype",SeleniumUtilities.OBJWAITTIMEOUT);
+ String actClassValOfElement=wb.getAttribute("class");
+ String expClassValWhenEleIsDisabled="select2-container select2-container-disabled chooseOrganization width-100";
+ assertTrue(actClassValOfElement.equals(expClassValWhenEleIsDisabled));{
+ logger.info("Select provider type is disbled");
+// } else {
+// logger.info("Select provider type is enabled");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifySelProviderTypeIsDisabled");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ } }
+
+ public static void verifyCredentialsAccessKeyIsDisabled(String credentialsAccessKeys) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("id",credentialsAccessKeys,5, SeleniumUtilities.OBJWAITTIMEOUT);
+ WebElement wb=SeleniumUtil.getElement("id",credentialsAccessKeys,SeleniumUtilities.OBJWAITTIMEOUT);
+ assertFalse(wb.isEnabled());{
+ logger.info("Credentials Access Keys is enabled");
+// } else {
+// logger.info("Credentials Access Keys is disabled");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyCredentialsAccessKeyisDisabled");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ } }
+
+
+ public static void verifySelectOrgIsDisabled() {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("id","s2id_orgId",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ WebElement wb=SeleniumUtil.getElement("id","s2id_orgId",SeleniumUtilities.OBJWAITTIMEOUT);
+ String actClassValOfElement=wb.getAttribute("class");
+ String expClassValWhenEleIsDisabled="select2-container select2-container-disabled chooseOrganization width-100";
+ assertTrue(actClassValOfElement.equals(expClassValWhenEleIsDisabled));{
+ logger.info("Select organization type is disabled");
+// } else {
+// logger.info("Select organization type is enabled");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifySelectOrgIsDisabled");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ } }
+
+ public static void verifySelectRegionIsDisabled() {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath",".//*[@class='select2-container select2-container-disabled region chooseOrganization width-100 secretInfo']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ WebElement wb=SeleniumUtil.getElement("xpath",".//*[@class='select2-container select2-container-disabled region chooseOrganization width-100 secretInfo']",SeleniumUtilities.OBJWAITTIMEOUT);
+ String actClassValOfElement=wb.getAttribute("class");
+ String expClassValWhenEleIsDisabled="select2-container select2-container-disabled region chooseOrganization width-100 secretInfo";
+ assertTrue(actClassValOfElement.equals(expClassValWhenEleIsDisabled));{
+ logger.info("Select region is disabled");
+// } else {
+// logger.info("Select region is enabled");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifySelectRegionIsDisabled");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ } }
+
+ public static void verifySelKeyPairIsDisabled() {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath","//*[@class='select2-container select2-container-disabled chooseOrganization width-100 keyvalue secretInfo']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ WebElement wb=SeleniumUtil.getElement("xpath","//*[@class='select2-container select2-container-disabled chooseOrganization width-100 keyvalue secretInfo']",SeleniumUtilities.OBJWAITTIMEOUT);
+ String actClassValOfElement=wb.getAttribute("class");
+ String expClassValWhenEleIsDisabled="select2-container select2-container-disabled chooseOrganization width-100 keyvalue secretInfo";
+ assertTrue(actClassValOfElement.equals(expClassValWhenEleIsDisabled));{
+ logger.info("Select key pair is disabled");
+// } else {
+// logger.info("Select key pair is enabled");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifySelKeyPairIsDisabled");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ } }
+
+ public static void verifyProviderInfo(String providerName, String providerInfo) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+providerName+"']/../*[text()='"+providerInfo+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue (SeleniumUtil.verifyTextValue("xpath",".//*[@id='envtable']//*[text()='"+providerName+"']/../*[text()='"+providerInfo+"']",providerInfo,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info(providerName+" is available with : "+providerInfo);
+// } else {
+// logger.info(providerName+" is not available with : "+providerInfo);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyProviderInfo");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectOrgInNewAWSPage(String orgName) {
+ try {
+ SeleniumUtil.selectByVisibleText("id","orgId",orgName,SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectOrgInNewAWSPage");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ConfigurePuppetServerViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ConfigurePuppetServerViews.java
new file mode 100755
index 000000000..8885df3dd
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ConfigurePuppetServerViews.java
@@ -0,0 +1,82 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.support.PageFactory;
+
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0372 on 01-08-2016.
+ */
+public class ConfigurePuppetServerViews {
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ public static void clickOnPuppetServerLink() {
+ try{
+ SeleniumUtil.waitForElementIsClickable("linktext","Puppet Server",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("linktext","Puppet Server",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch (Exception ex)
+ {
+ BaseView.takeScreenshot("clickOnPuppetServerLink");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void enterPuppetServerName(String puppetServerName) {
+ try{
+ SeleniumUtil.waitForElementIsClickable("id","puppetservername",8,SeleniumUtil.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id","puppetservername","",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch (Exception ex)
+ {
+ BaseView.takeScreenshot("enterPuppetServerName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void enterUserName(String userName) {
+ try{
+ SeleniumUtil.waitForElementIsClickable("id","username",8,SeleniumUtil.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id","username",userName,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch (Exception ex)
+ {
+ BaseView.takeScreenshot("enterUserName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void enterHostName(String hostName) {
+ try{
+ SeleniumUtil.waitForElementIsClickable("id","hostname",8,SeleniumUtil.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id","hostname",hostName,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch (Exception ex)
+ {
+ BaseView.takeScreenshot("enterHostName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void enterPuppetPassword(String password) {
+ try{
+ SeleniumUtil.waitForElementIsClickable("id","puppetpassword",8,SeleniumUtil.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id","puppetpassword",password,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch (Exception ex)
+ {
+ BaseView.takeScreenshot("enterPuppetPassword");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+}
+
+
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelBGroupViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelBGroupViews.java
new file mode 100755
index 000000000..13131cd64
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelBGroupViews.java
@@ -0,0 +1,204 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.LoginSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+import static junit.framework.Assert.assertTrue;
+import static junit.framework.TestCase.assertFalse;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0372 on 20-07-2016.
+ */
+public class CreateEditDelBGroupViews {
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ public static void clickBGroupLink()throws InterruptedException {
+ try {
+ SeleniumUtil.waitForElementIsClickable("linktext", "Business Groups", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("linktext","Business Groups",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickBGroupLink");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+ public static void clickOnNewBGroup() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id","newProd", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("id","newProd",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnNewBGroup");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void enterBGroupName(String bGroupName) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id","productgroupname", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id","productgroupname",bGroupName,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("enterBGroupName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void enterOrgName(String org_Name) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath",".//*[@id='select2-drop']/div/input", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath",".//*[@id='select2-drop']/div/input",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("enterOrgName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+
+ public static void clickOnEditBGroup(String bGroup) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath",".//*[@id='envtable']/tbody/tr/td[text()='"+bGroup+"']/../td/div/a",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath",".//*[@id='envtable']/tbody/tr/td[text()='"+bGroup+"']/../td/div/a",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnEditBGroup");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clearField() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id","productgroupname",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.clear("id","productgroupname",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clearField");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void enterNewBGrpName(String newBGrpName) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id","productgroupname",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id","productgroupname",newBGrpName,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("enterNewBGrpName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void delEditedBGroup(String editedBGrp) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath",".//*[@id='envtable']/tbody/tr/td[text()='"+editedBGrp+"']/../td/div/button",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath",".//*[@id='envtable']/tbody/tr/td[text()='"+editedBGrp+"']/../td/div/button",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("delEditedBGroup");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void clickOnOrgLinkInSettTree() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("linktext","Organizations",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("linktext","Organizations",SeleniumUtilities.OBJWAITTIMEOUT);
+
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnOrgLinkInSettTree");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyAssignedOrg(String bGroup,String org) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//td[text()='"+bGroup+"']/../td[text()='"+org+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue (SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//td[text()='"+bGroup+"']/../td[text()='"+org+"']",org,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Verified assigned organization:"+org);
+// } else {
+// logger.info("Assigned Organization not found:" +org);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyAssignedOrg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void verifyCreatedBGroup(String businessGroup) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+businessGroup+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//*[text()='"+businessGroup+"']",businessGroup,SeleniumUtilities.OBJWAITTIMEOUT));
+ logger.info("Verified created Business Group :"+businessGroup);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyCreatedOrg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyEditedBGroup(String editedBGroup) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath",".//*[@id='envtable']//*[text()='"+editedBGroup+"']",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.waitUntilElementContainsText("xpath",".//*[@id='envtable']//*[text()='"+editedBGroup+"']",editedBGroup,5,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Verified edited Business Group :" +editedBGroup);
+// } else {
+// logger.info("Edited Business Group : "+ editedBGroup+ " does not exist");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyEditedBGroup");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyDeletedBGroup(String bGroup) {
+ try {
+// SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+bGroup+"']", 1, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertFalse(SeleniumUtil.isElementExist("xpath", ".//*[@id='envtable']//*[text()='"+bGroup+"']")); {
+ logger.info("Business Group does not exists : Deleted");
+// } else {
+// logger.info("Business Group does not exists : Business Group deleted");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyDeletedBGroup");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectBusinessGroup(String orgName) {
+ try {
+ SeleniumUtil.click("xpath","//span[text()='Select an Organization']",SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath","//div[text()='"+orgName+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ //SeleniumUtil.selectByVisibleText("id","orgname",orgName,SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectBusinessGroup");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+}
+
+
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelDesignerViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelDesignerViews.java
new file mode 100755
index 000000000..16b2566a5
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelDesignerViews.java
@@ -0,0 +1,383 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.CreateEditDelDesignerSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.apache.log4j.Logger;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.PageFactory;
+
+import static junit.framework.Assert.assertTrue;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by rle0346 on 3/8/16.
+ */
+public class CreateEditDelDesignerViews {
+ private static final Logger logger = Logger.getLogger(CreateEditDelDesignerSteps.class.getName());
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+
+ public static void clickOnUsersSetupLink(String strUserSetupLink) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath", "//a[text()='" + strUserSetupLink + "']", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath", "//a[text()='" + strUserSetupLink + "']", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnUsersSetupLink");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+
+ public static void clickOnUsersLink(String strUserLink) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath", "//a[text()='" + strUserLink + "']", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath", "//a[text()='" + strUserLink + "']", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnUsersLink");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+
+ }
+
+
+ public static void clickOnNewButton() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id", "newUser", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("id", "newUser", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnNewButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void enterLoginName(String strDesignerName) {
+ try {
+ //SeleniumUtil.waitForElementVisibilityOf("loginname", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id", "loginname", strDesignerName, SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("enterLoginName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void enterEmailAddress(String strEmailAddress) {
+ try {
+ //SeleniumUtil.waitForElementVisibilityOf("loginname", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.clear("id" ,"email", 8);
+ SeleniumUtil.type("id", "email", strEmailAddress, SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("enterEmailAddress");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void enterPassword(String strPassword) {
+ try {
+ //SeleniumUtil.waitForElementVisibilityOf("loginname", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id", "password", strPassword, SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("enterPassword");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void enterConfirmPassword(String strconfPassword) {
+ try {
+ //SeleniumUtil.waitForElementVisibilityOf("loginname", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id", "cnfPassword", strconfPassword, SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("enterConfirmPassword");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+
+ }
+
+
+ public static void selectOrganization(String strOrganization) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//span[text()='All']", 8);
+ SeleniumUtil.click("xpath", "//span[text()='All']", 8);
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//div[text()='"+strOrganization+"']", 8);
+ SeleniumUtil.click("xpath", "//div[text()='"+strOrganization+"']", 8);
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectOrganization");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+
+ }
+
+ public static void selectRole(String strRole) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//label[text()='" + strRole + "']/input/../i", 8);
+ SeleniumUtil.click("xpath", "//label[text()='" + strRole + "']/input/../i", 8);
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectRole");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+
+ }
+
+ public static void selectTeam(String strOrganization) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//label[text()='" + strOrganization + "_Admins']/input/../i", 8);
+ SeleniumUtil.click("xpath", "//label[text()='" + strOrganization + "_Admins']/input/../i", 8);
+
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//label[text()='" + strOrganization + "_Admins']/input/../i", 8);
+ SeleniumUtil.click("xpath", "//label[text()='" + strOrganization + "_DEV']/input/../i", 8);
+
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//label[text()='" + strOrganization + "_Admins']/input/../i", 8);
+ SeleniumUtil.click("xpath", "//label[text()='" + strOrganization + "_QA']/input/../i", 8);
+
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//label[text()='" + strOrganization + "_Admins']/input/../i", 8);
+ SeleniumUtil.click("xpath", "//label[text()='" + strOrganization + "_DevOps']/input/../i", 8);
+
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectTeam");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+
+ }
+
+ public static void clickSaveButton() {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//button[@class='btn btn-primary btn-mini']", 8);
+ SeleniumUtil.click("xpath", "//button[@class='btn btn-primary btn-mini']", 8);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickSaveButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickEditDesignerButton(String strDesigner) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']/tbody/tr/td[text()='"+strDesigner+"']/../td[5]/div/a[@title='Edit']", 8);
+ SeleniumUtil.click("xpath", ".//*[@id='envtable']/tbody/tr/td[text()='"+strDesigner+"']/../td[5]/div/a[@title='Edit']", 8);
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickEditDesignerButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+
+ public static void verifyDesignerUserCreation(String strDesignerUser) {
+ try {
+ //WebElement wb= SeleniumUtil.getElement("xpath", "//td[text()='" +strDesignerUser+"'][1]", 8, 8);
+ //logger.info(wb);
+ //SeleniumUtil.waitForElementVisibilityOf(wb, 8, 8);
+ SeleniumUtil.waitUntilElementContainsText("xpath", "//td[text()='"+strDesignerUser+"'][1]", strDesignerUser, 0, 10);
+ logger.info("User is verfified");
+ assertTrue (SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']/tbody/tr//td[4][text()='"+strDesignerUser+"']/../td[1][text()='Admin']",strDesignerUser,SeleniumUtilities.OBJWAITTIMEOUT));
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyDesignerUserCreation");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+
+
+ public static void VerifyEmailAddress(String strDesigner, String strEmailAddress) {
+ try {
+ //WebElement wb= SeleniumUtil.getElement("xpath", "//td[text()='" +strDesignerUser+"'][1]", 8, 8);
+ //logger.info(wb);
+ //SeleniumUtil.waitForElementVisibilityOf(wb, 8, 8);
+ SeleniumUtil.waitUntilElementContainsText("xpath", "//td[text()='"+strDesigner+"']/../td[text()='"+strEmailAddress+"']", strEmailAddress , 0, 10);
+ logger.info("Designer user Email Address is verfified");
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("VerifyEmailAddress");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+
+ public static void VerifyDesignerRoleInTable(String strDesigner, String strRole) {
+ try {
+ //WebElement wb= SeleniumUtil.getElement("xpath", "//td[text()='" +strDesignerUser+"'][1]", 8, 8);
+ //logger.info(wb);
+ //SeleniumUtil.waitForElementVisibilityOf(wb, 8, 8);
+ SeleniumUtil.waitUntilElementContainsText("xpath", "//td[text()='"+strDesigner+"']/../td[text()='"+strRole+"']", strRole , 0, 10);
+ logger.info("Designer user Email Address is verfified");
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("VerifyDesignerRoleInTable");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+
+ public static void VerifyOrganizationInTable(String strDesigner, String strOrganization) {
+ try {
+ //WebElement wb= SeleniumUtil.getElement("xpath", "//td[text()='" +strDesignerUser+"'][1]", 8, 8);
+ //logger.info(wb);
+ //SeleniumUtil.waitForElementVisibilityOf(wb, 8, 8);
+ SeleniumUtil.waitUntilElementContainsText("xpath", "//td[text()='"+strDesigner+"']/../td[text()='"+strOrganization+"']", strOrganization , 0, 10);
+ logger.info("Designer user Email Address is verfified");
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("VerifyOrganizationInTable");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+
+
+ public static void VerifyLoginNameDisabled() {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//input[@disabled]", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.getAttributeValue("xpath", "//input[@disabled]", "disabled", 8);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("VerifyLoginNameDisabled");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+
+
+ }
+ }
+
+
+
+ public static void clickOnUpdatePasswordCheckbox()
+ {
+ try
+ {
+ SeleniumUtil.click("id", "chkadduserldap", 8);
+
+ }
+ catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnUpdatePasswordCheckbox");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+
+
+ }
+ }
+
+
+ public static void clickOnDeleteButton(String strDesigner)
+ {
+ try
+ {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']/tbody/tr/td[text()='"+strDesigner+"']/../td[5]/div/a[@title='Delete']/i", 8);
+ SeleniumUtil.click("xpath", ".//*[@id='envtable']/tbody/tr/td[text()='"+strDesigner+"']/../td[5]/div/a[@title='Delete']/i", 8);
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnDeleteButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+
+
+ }
+ }
+
+ public static void clickOnOkButton(String strOk)
+ {
+ try
+ {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//button[text()='"+strOk+"']", 8);
+ SeleniumUtil.click("xpath", "//button[text()='"+strOk+"']", 8);
+
+ }
+ catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnOkButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+
+
+ }
+ }
+
+
+ public static void verfiyEmailAddressUpdated(String strEmailAddress) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//td[text()='"+strEmailAddress+"']", 8);
+ SeleniumUtil.waitUntilElementContainsText("xpath", "//td[text()='"+strEmailAddress+"']", strEmailAddress , 0, 10);
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyDesignerUserCreation");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+
+
+ public static void selectDefaultTeam(String strDefaultTeam) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//label[text()='"+strDefaultTeam+"']/input/../i", 8);
+ SeleniumUtil.click("xpath", "//label[text()='"+strDefaultTeam+"']/input/../i", 8);
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectTeam");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+
+ public static void verifyButtonIsEnabled(String org, String edit) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//td[text()='"+org+"']/following-sibling::td//*[@title='"+edit+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ WebElement wb=SeleniumUtil.getElement("xpath",".//*[@id='envtable']//td[text()='"+org+"']/following-sibling::td//*[@title='"+edit+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.assertNotNull(wb));{
+ logger.info(edit +" is Enabled");
+// } else {
+// logger.info(edit +" is disbled");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyButtonIsEnabled");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ } }
+
+ public static void verifyDeletedUser(String strDesigner) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+strDesigner+"']/following-sibling::td[2]",1, SeleniumUtilities.OBJWAITTIMEOUT);
+ if (SeleniumUtil.isElementExist("xpath", ".//*[@id='envtable']//*[text()='"+strDesigner+"']")) {
+ logger.info("This User exists : Not deleted");
+ } else {
+ logger.info("This User does not exists : Org deleted");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyDeletedUser");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+}
+
+
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelDockerViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelDockerViews.java
new file mode 100755
index 000000000..ac8cb3013
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelDockerViews.java
@@ -0,0 +1,206 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.LoginSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+import static junit.framework.TestCase.assertTrue;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0372 on 01-08-2016.
+ */
+public class CreateEditDelDockerViews {
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+
+ public static void clickOnDevopsSetup(String linkText) {
+ try {
+ //SeleniumUtil.waitForElementIsClickable("linktext",,8, SeleniumUtilities.OBJWAITTIMEOUT);
+ Thread.sleep(2000);
+ SeleniumUtil.click("xpath","//a[text()='"+linkText+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ Thread.sleep(2000);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnDevopsSetup");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+
+
+ public static void clickonChefServer(String linkText) {
+ try {
+ //SeleniumUtil.waitForElementIsClickable("linktext",,8, SeleniumUtilities.OBJWAITTIMEOUT);
+ Thread.sleep(2000);
+ SeleniumUtil.click("xpath","//a[text()='"+linkText+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ Thread.sleep(2000);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickonChefServer");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+
+// public static void clickOnDockerLink(String linktext) {
+// try {
+// SeleniumUtil.waitForElementIsClickable("linktext",linktext,8, SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.click("linktext",linktext,SeleniumUtilities.OBJWAITTIMEOUT);
+// }
+// catch(Exception ex){
+// BaseView.takeScreenshot("clickOnDockerLink");
+// SeleniumUtil.Log.info("Error :" + ex.getMessage());
+// fail(ex.getMessage());
+// }
+// }
+
+ public static void enterDockerName(String dockerName) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id","dockerreponame",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id","dockerreponame",dockerName,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("enterDockeName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void enterDockerHubRegistry(String dockerName, String dockerreponame) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id",dockerreponame,8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id",dockerreponame,dockerName,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("enterDockerHubRegistry");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void enterUserID(String userId) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id","dockerreponame",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id","dockerreponame",userId,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("enterDockerHubRegistry");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void enterDockerHubRegistryName(String docerHubRegName) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id","dockerrepopath",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id","dockerrepopath",docerHubRegName,SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("enterDockerHubRegistryName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyDocker(String dockerName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+dockerName+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue (SeleniumUtil.verifyTextValue("xpath",".//*[@id='envtable']//*[text()='"+dockerName+"']",dockerName,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info(dockerName+"is available");
+// } else {
+// logger.info(dockerName+"is not available");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyDockerDetails");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifySelOrgIsDisabled() {
+
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("id","s2id_orgname",5, SeleniumUtilities.OBJWAITTIMEOUT);
+// WebElement wb=SeleniumUtil.getElement("id","s2id_orgname",SeleniumUtilities.OBJWAITTIMEOUT);
+ String actClassValOfElement=SeleniumUtil.getAttributeValue("id","s2id_orgname","class",SeleniumUtilities.OBJWAITTIMEOUT);
+ String expClassValWhenEleIsDisabled="select2-container select2-container-disabled chooseOrganization width-100";
+ assertTrue(actClassValOfElement.equals(expClassValWhenEleIsDisabled));{
+ System.out.print(actClassValOfElement);
+ logger.info("Select organization type is disabled");
+// } else {
+// logger.info("Select organization type is enabled");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifySelectOrgIsDisabled");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ } }
+
+ public static void verifyDockerInfo(String dockerName, String dockerDetails) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+dockerName+"']/../*[text()='"+dockerDetails+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue (SeleniumUtil.verifyTextValue("xpath",".//*[@id='envtable']//*[text()='"+dockerName+"']/../*[text()='"+dockerDetails+"']",dockerDetails,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info(dockerName+" with "+dockerDetails+" is available");
+// } else {
+// logger.info(dockerName+" with "+dockerDetails+" is available");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyDockerDetails");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickTemplateLink(String linkText) {
+ try {
+ //SeleniumUtil.waitForElementIsClickable("linktext",,8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath","//a[text()='"+linkText+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ Thread.sleep(2000);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickonGallerySetup");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickGallerySetuplink(String linkText) {
+ try {
+ //SeleniumUtil.waitForElementIsClickable("linktext",,8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath","//a[text()='"+linkText+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ Thread.sleep(2000);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickonGallerySetup");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void addCookbooksRunlist(String strCookbooks) {
+ try {
+ //SeleniumUtil.waitForElementIsClickable("linktext",,8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id", "textbox","apache2", 10);
+ SeleniumUtil.click("xpath",".//*[@id='cookbooksrecipesList']/option[text()='"+strCookbooks+"']",10);
+ SeleniumUtil.click("id","btnaddToRunlist",10);
+
+ Thread.sleep(2000);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("AddCookbooks");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelEnvViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelEnvViews.java
new file mode 100755
index 000000000..970c683d6
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelEnvViews.java
@@ -0,0 +1,330 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.LoginSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.Random;
+import java.util.logging.Logger;
+
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.TestCase.assertTrue;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0372 on 26-07-2016.
+ */
+public class CreateEditDelEnvViews {
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ public static WebElement PagesFrame;
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ public static String envName = "";
+
+ public static void clickOnEnvironmentsLink() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("linktext", "Environments", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("linktext", "Environments", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnEnvironmentsLink");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void clickOnChefServerSelButton(String serverName) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath", ".//*[@id='s2id_environmentname']/a//b", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath", ".//*[@id='s2id_environmentname']/a//b", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("xpath", ".//*[@id='select2-drop']//input", serverName, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.hitEnterKey("xpath", "//span[text()='" + serverName + "']", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnChefServerSelButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void enterChefEnvName(String chefEnvName) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id", "chefenvname", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id", "chefenvname", chefEnvName, SeleniumUtil.OBJWAITTIMEOUT);
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnAddChefEnvButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnAddChefEnvButtonOnEnvPage() {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath","(//a[text()='Add'])[1]",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath", "(//a[text()='Add'])[1]", SeleniumUtil.OBJWAITTIMEOUT);
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnAddChefEnvButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void checkElementIsDisabled(String idOfElement) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id", idOfElement, 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtilities.assertNull(SeleniumUtil.getElement("id", idOfElement, 5, SeleniumUtilities.OBJWAITTIMEOUT));
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnAddChefEnvButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static String enterRandomEnvName(String idOfEditBox) {
+ try {
+ int max = 100000;
+ int min = 10000;
+ Random r = new Random();
+ int ranNumber = r.nextInt((max - min) + 1) + min;
+ envName = "QA" + ranNumber;
+ SeleniumUtil.type("id", idOfEditBox,envName, SeleniumUtil.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnAddChefEnvButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ return envName;
+ }
+
+ public static void verifyEnvName() {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+envName+"']", 5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue (SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//*[text()='"+envName+"']",envName, SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Verified created environment:" + envName);
+// } else {
+// logger.info("environment not found:" + envName);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyEnvName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void verifyAssignedOrgName(String arg0, String org) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//td[text()='" + envName + "']/../td[text()='" + org + "']", 5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue (SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//td[text()='" + envName + "']/../td[text()='" + org + "']", org, SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Verified " + org + " assigned to " + envName);
+// } else {
+// logger.info("assigned org to environment not found:" + org);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyAssignedOrgNametoEnv");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyEditIsEnabled(String s, String edit) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//td[text()='" + envName + "']/following-sibling::td//*[@title='" + edit + "']", 5, SeleniumUtilities.OBJWAITTIMEOUT);
+ WebElement wb = SeleniumUtil.getElement("xpath", ".//*[@id='envtable']//td[text()='" + envName + "']/following-sibling::td//*[@title='" + edit + "']", SeleniumUtilities.OBJWAITTIMEOUT);
+ if (wb.isEnabled()) {
+ logger.info(edit + " is Enabled");
+ } else {
+ logger.info(edit + " is disbled");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyEditIsEnabled");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifySelectChefServerisDisabled() {
+ try {
+// SeleniumUtil.waitForElementVisibilityOf("id", "s2id_configname", 5, SeleniumUtilities.OBJWAITTIMEOUT);
+ WebElement wb = SeleniumUtil.getElement("id", "s2id_configname", SeleniumUtilities.OBJWAITTIMEOUT);
+ String actClassValOfElement = wb.getAttribute("class");
+ String expClassValWhenEleIsDisabled = "select2-container select2-container-disabled chooseOrganization width-100";
+ assertTrue (actClassValOfElement.equals(expClassValWhenEleIsDisabled));
+ logger.info("Select chef server is disbled");
+// } else {
+// logger.info("Select chef server is enabled");
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifySelectChefServerisDisabled");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyEnvIsDeleted() {
+ try {
+// SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='" + envName + "']/following-sibling::td[2]", 1, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertFalse(SeleniumUtil.isElementExist("xpath", ".//*[@id='envtable']//*[text()='" + envName + "']")); {
+ logger.info(envName + "Environment does not exists : Deleted");
+// } else {
+// logger.info(envName + "Chef server does not exists : deleted");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyEnvIsDeleted");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectExistingEnv(String cheEnvName) {
+ try {
+// SeleniumUtil.waitForElementIsClickable("xpath", "//*[@id='s2id_environmentname']/a", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+// Thread.sleep(2000);
+// SeleniumUtil.click("xpath", "//*[@id='s2id_environmentname']/a", SeleniumUtil.OBJWAITTIMEOUT);
+// Thread.sleep(2000);
+// SeleniumUtil.waitForElementIsClickable("xpath", "//*[text()='" + cheEnvName + "']", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.click("xpath", "//*[text()='" + cheEnvName + "']", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.selectByVisibleText("id","environmentname",cheEnvName,SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectExistingEnv");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void verifyEnvInWorkZone() {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//span[text()='" + envName + "']", 5, SeleniumUtilities.OBJWAITTIMEOUT);
+ if (SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//*[text()='" + envName + "']", envName, SeleniumUtilities.OBJWAITTIMEOUT)) {
+ logger.info("Verified created environment:" + envName);
+ } else {
+ logger.info("environment not found:" + envName);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyEnvName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void clickOnEnv() {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//span[text()='" + envName + "']", 5, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath", "//span[contains(text(),'QA')]", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnEnv");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyAndSelectCreatedEnv() {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//span[text()='"+envName+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+// assertTrue(SeleniumUtil.verifyTextValue("xpath", "//span[text()='"+envName+"']",envName,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ SeleniumUtil.click("xpath", "//span[text()='"+envName+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ logger.info("Verified created environment:" + envName);
+// } else {
+// logger.info("environment not found:" + envName);
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyAndSelectCreatedEnv");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void assigntheProject(String projectName)
+ {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='projectname']/label/input[@value='"+projectName+"']/../i",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath",".//*[@id='projectname']/label/input[@value='"+projectName+"']/../i",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("assignporject");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void verifySelectedEnvNameFromChef(String environmentName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+environmentName+"']", 5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue (SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//*[text()='"+environmentName+"']",environmentName, SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Verified created environment:" + envName);
+// } else {
+// logger.info("environment not found:" + envName);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyEnvName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyAssignedDetailsOfEnv(String environmentName, String org) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath",".//*[@id='envtable']//td[text()='"+environmentName +"']/../td[text()='"+org+"']", 5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue (SeleniumUtil.verifyTextValue("xpath",".//*[@id='envtable']//td[text()='"+environmentName+"']/../td[text()='"+org+"']",org,SeleniumUtilities.OBJWAITTIMEOUT));
+ logger.info("Verified " +org+ "with" +environmentName);
+// } else {
+// logger.info("environment not found:" + envName);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyEnvName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyEditPageIsDisplayed(String pageName) {
+ try {
+ assertTrue (SeleniumUtil.verifyTextValue("xpath","//*[text()='"+pageName+"']",pageName,SeleniumUtilities.OBJWAITTIMEOUT));
+ logger.info("Verified "+pageName);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyEnvName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnAddButton() {
+ try {
+ SeleniumUtil.click("cssselector",".btn.btn-default.btn-primary.createchefenvbtn",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnAddButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectNewlyAddedEnv() {
+ try {
+ SeleniumUtil.selectByVisibleText("id","environmentname",envName,SeleniumUtil.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectNewlyAddedEnv");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+
+ }
+
+ public static void verifyEnvironmentIsDeleted(String environmentName) {
+ try {
+ assertFalse(SeleniumUtil.isElementExist("xpath", ".//*[@id='envtable']//*[text()='" + environmentName + "']"));
+ logger.info(envName + "Environment does not exists : Deleted");
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyEnvIsDeleted");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+}
+
+
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelJenkinsViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelJenkinsViews.java
new file mode 100755
index 000000000..56e8cfec5
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelJenkinsViews.java
@@ -0,0 +1,66 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.LoginSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+import static junit.framework.TestCase.assertTrue;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0372 on 01-08-2016.
+ */
+public class CreateEditDelJenkinsViews {
+
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ public static WebElement PagesFrame;
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ public static void enterJenkinsName(String name,String idOfEditBox){
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("id",idOfEditBox,8,SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id",idOfEditBox,name,SeleniumUtilities.OBJWAITTIMEOUT);
+ logger.info("Value entered "+name);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("enterJenkinsName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyJenkins(String jenkinsPara) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+jenkinsPara+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue (SeleniumUtil.verifyTextValue("xpath",".//*[@id='envtable']//*[text()='"+jenkinsPara+"']",jenkinsPara,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Verified : "+jenkinsPara);
+// } else {
+// logger.info("Not verified:" +jenkinsPara);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyJenkinsDetails");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+ public static void verifyJenkinsDetails(String jenkinsRefName,String jenkinsPara) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//td[text()='"+jenkinsRefName+"']/../*[text()='"+jenkinsPara+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue (SeleniumUtil.verifyTextValue("xpath",".//*[@id='envtable']//td[text()='"+jenkinsRefName+"']/../*[text()='"+jenkinsPara+"']",jenkinsPara,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info(jenkinsRefName+" with "+jenkinsPara+" is available");
+// } else {
+// logger.info(jenkinsRefName+" with "+jenkinsPara+" is not available");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyJenkinsDetails");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+}
+
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelOrgViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelOrgViews.java
new file mode 100755
index 000000000..a953742f8
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelOrgViews.java
@@ -0,0 +1,309 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.LoginSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+import static junit.framework.Assert.assertTrue;
+import static junit.framework.TestCase.assertFalse;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0372 on 18-07-2016.
+ */
+public class CreateEditDelOrgViews {
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+
+
+ public static void clickOnSettings() throws InterruptedException {
+ try {
+ SeleniumUtil.waitForElementIsClickable("linktext", "SETTINGS", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("linktext", "SETTINGS", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("settingsNew");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void clickOnOrganizations() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("linktext", "ORGANIZATIONS", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("linktext", "ORGANIZATIONS", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("ORGANIZATIONS");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnNewButton(String newButtonId) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id", newButtonId, 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("id", newButtonId, SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("newOrg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void saveOrg() {
+ try {
+ SeleniumUtil.click("cssselector", "button[class='btn btn-primary btn-mini']", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("saveOrg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void editOrg(String Organization) throws InterruptedException {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath", ".//*[@id='envtable']/tbody/tr/td[text()='" + Organization + "']/../td[4]//a[@title='Edit']", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath", ".//*[@id='envtable']/tbody/tr/td[text()='" + Organization + "']/../td[4]//a[@title='Edit']", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("editOrg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clearTheField(String idOfEditbox) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id", idOfEditbox, 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.clear("id", idOfEditbox, SeleniumUtilities.OBJWAITTIMEOUT);
+ logger.info("Field cleared :" + idOfEditbox);
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clearTheField");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void enterNewOrgName(String New_Organization) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id", "orgname", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.clear("id", "orgname", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id", "orgname", New_Organization, SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("editOrg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void delOrg(String New_Organization) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath", ".//*[@id='envtable']/tbody/tr/td[text()='" + New_Organization + "']/../td[4]/div/button", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath", ".//*[@id='envtable']/tbody/tr/td[text()='" + New_Organization + "']/../td[4]/div/button", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("delOrg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnOK() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath", "//button[text()='OK']", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath", "//button[text()='OK']", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnOK");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnSettingsFromOrgPage() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id", "settingsNew", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("id", "settingsNew", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnOK");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void seeWorkzone(String idOfElement) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id", idOfElement, 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("id", idOfElement, "WORKZONE", SeleniumUtilities.OBJWAITTIMEOUT));
+ {
+ SeleniumUtil.Log.info("Workzone is displayed");
+// } else {
+// SeleniumUtil.Log.info("Workzone is not displayed");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("seeWorkzone");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void verifyEditedOrg(String editedOrg) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='" + editedOrg + "']", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.waitUntilElementContainsText("xpath", ".//*[@id='envtable']//*[text()='" + editedOrg + "']", editedOrg, 5, SeleniumUtilities.OBJWAITTIMEOUT));
+ {
+ logger.info("Verified edited Organization :" + editedOrg);
+// } else {
+// logger.info("Edited Organization" + editedOrg + " does not exist");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyEditedOrg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyLoginPage() {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("id", "login-form", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.waitUntilElementContainsText("id", "login-form", "Login", 0, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("id", "login-form", "Login", SeleniumUtilities.OBJWAITTIMEOUT));
+ {
+ logger.info("Verified : LoginPage");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyLoginPage");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyStatusOfOrg(String status, String orgName) {
+ try {
+ Thread.sleep(2000);
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//td[text()='" + orgName + "']/../td[text()='" + status + "']", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//td[text()='" + orgName + "']/../td[text()='" + status + "']", status, 5));
+ logger.info("Verified : staus is Active");
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyStatusOfOrg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void verifyDeletedOrg(String orgName) {
+ try {
+// SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+orgName+"']/following-sibling::td[2]",1, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertFalse(SeleniumUtil.isElementExist("xpath", ".//*[@id='envtable']//*[text()='" + orgName + "']"));
+ logger.info("Organization does not exists :deleted");
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyDeletedOrg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyCreatedOrg(String organizationName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='" + organizationName + "']", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//*[text()='" + organizationName + "']", organizationName, SeleniumUtilities.OBJWAITTIMEOUT));
+ logger.info("Verified created organization:" + organizationName);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyCreatedOrg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyDomainName(String domainName, String orgName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//td[text()='" + orgName + "']/../td[text()='" + domainName + "']", 5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//td[text()='" + orgName + "']/../td[text()='" + domainName + "']", domainName, SeleniumUtilities.OBJWAITTIMEOUT));
+ {
+ logger.info("Verified Domain Name:" + domainName);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyDomainName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnStatusButton() {
+ try {
+ SeleniumUtil.click("xpath", ".//*[@name='checkbox-toggle']/following-sibling::i", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnStatusButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectAllInShowDropDown(String expectedValFromDropdown) {
+ try {
+ SeleniumUtil.selectByVisibleText("id", "filteractive", expectedValFromDropdown, SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectAllInShowDropDown");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnOkOnAlertPopUp() {
+ try {
+ SeleniumUtil.handleParticularAlert("You have selected to change the status of this organization. Proceed?");
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectAllInShowDropDown");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnCloseToast() {
+ try {
+ SeleniumUtil.click("cssselector", ".toast-close-button", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnCloseToast");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void moveCursorOnMenu() {
+ try {
+ Thread.sleep(2000);
+ SeleniumUtil.mouseOver("xpath", "//strong[text()='Menu']", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("moveCursorOnMenu");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void checkAndDecide() {
+ try {
+ Thread.sleep(2000);
+ boolean value = SeleniumUtil.waitForElementVisibilityOf("xpath", "//span[text()='Instances']", 2, SeleniumUtilities.OBJWAITTIMEOUT);
+ if (value == true){
+ System.out.println("Instances Element is visible");
+ logger.info("Instances Element is visible");
+ SeleniumUtil.click("xpath", ".//*[@id='settings']/a", 8);
+
+ }
+ else {
+ logger.info("Instances Element is NOT visible Its In the Settings Page");
+ System.out.println("Its In the Settings Page");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("moveCursorOnMenu");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+}
+
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelProjectViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelProjectViews.java
new file mode 100755
index 000000000..2d7a146c7
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDelProjectViews.java
@@ -0,0 +1,142 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.LoginSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+import static junit.framework.TestCase.assertFalse;
+import static junit.framework.TestCase.assertTrue;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0372 on 20-07-2016.
+ */
+public class CreateEditDelProjectViews {
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ public static void clickOnProLink() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("linktext","Projects",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("linktext","Projects", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnProLink");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+ public static void clickOnNewProButton() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id","newProj",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("id","newProj", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnNewProButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnOrg(String proOrg) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath",".//*[@id='select2-drop']//div[text()='"+proOrg+"']",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath",".//*[@id='select2-drop']//div[text()='"+proOrg+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnOrg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clearProNameField() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id","projectname",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.clear("id","projectname",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clearProNameField");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void typeNewProj(String newProName) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id","projectname",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id","projectname",newProName,SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("typeNewProj");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void delProject(String proName) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath",".//*[@id='envtable']/tbody/tr/td[text()='"+proName+"']/../td/div/button[@title='Delete']",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath",".//*[@id='envtable']/tbody/tr/td[text()='"+proName+"']/../td/div/button[@title='Delete']",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("typeNewProj");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyCreatedProject(String proName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+proName+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue (SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//*[text()='"+proName+"']",proName,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Verified created Project:"+proName);
+// } else {
+// logger.info("Project not found:" +proName);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyCreatedProject");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyDeletedPro(String proName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+proName+"']", 1, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertFalse (SeleniumUtil.isElementExist("xpath", ".//*[@id='envtable']//*[text()='"+proName+"']")); {
+ logger.info("Project does not exists :deleted");
+// } else {
+// logger.info("Project does not exists :"+proName+"deleted");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyDeletedProject");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnEnv() {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@data-swchon-text='YES']",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath",".//*[@data-swchon-text='YES']",SeleniumUtilities.OBJWAITTIMEOUT);
+ logger.info("Clicked on environment");
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyDeletedProject");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyProjectInfo(String projectName, String projectDetails) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//td[text()='"+projectName+"']/../td[text()='"+projectDetails+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue (SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//td[text()='"+projectName+"']/../td[text()='"+projectDetails+"']",projectDetails,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Verified Project with:"+projectDetails);
+// } else {
+// logger.info("Project not found:" +assignedOrg);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyProjectInfo");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+}
\ No newline at end of file
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDeleteTeamViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDeleteTeamViews.java
new file mode 100755
index 000000000..4d77c83f7
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/CreateEditDeleteTeamViews.java
@@ -0,0 +1,127 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.LoginSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+import static junit.framework.TestCase.assertFalse;
+import static junit.framework.TestCase.assertTrue;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0372 on 16-08-2016.
+ */
+public class CreateEditDeleteTeamViews {
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+
+ public static void verifyTeamName(String teamName) {
+ try {
+ while(true) {
+ if (SeleniumUtil.isElementExist("xpath", ".//*[@id='envtable']//*[text()='" + teamName + "']")) {
+ assertTrue(SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//*[text()='" + teamName + "']", teamName, SeleniumUtilities.OBJWAITTIMEOUT));
+ logger.info("Verified created Team:" + teamName);
+ break;
+ }
+ if(SeleniumUtil.getAttributeValue("id","envtable_next","class",SeleniumUtilities.OBJWAITTIMEOUT).equals("paginate_button next disabled")){
+ assertTrue(SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//*[text()='" + teamName + "']", teamName, SeleniumUtilities.OBJWAITTIMEOUT));
+ break;
+ }
+ else {
+ SeleniumUtil.click("id", "envtable_next", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.waitForElementVisibilityOf("id", "newTeam", SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ }
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyTeamName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyTeamDetails(String teamName, String teamDetails) {
+ try {
+ while(true) {
+ if (SeleniumUtil.isElementExist("xpath", ".//*[@id='envtable']//td[text()='" + teamName + "']/../td[text()='" + teamDetails + "']")) {
+ assertTrue(SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//td[text()='" + teamName + "']/../td[text()='" + teamDetails + "']", teamDetails, SeleniumUtilities.OBJWAITTIMEOUT));
+ logger.info("Verified created Team:" + teamName + "with " + teamDetails);
+ break;
+ }
+ if(SeleniumUtil.getAttributeValue("id","envtable_next","class",SeleniumUtilities.OBJWAITTIMEOUT).equals("paginate_button next disabled")){
+ break;
+ }
+ else {
+ SeleniumUtil.click("id", "envtable_next", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.waitForElementVisibilityOf("id", "newTeam", SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyTEamDetails");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void checkTheCheckBox(String value) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath","//input[@value='"+value+"']/following-sibling::i",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath","//input[@value='"+value+"']/following-sibling::i",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("checkTheCheckBox");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void searchAndEditTheTeam(String teamName, String edit) {
+ try {
+ while(true) {
+ if (SeleniumUtil.isElementExist("xpath", ".//*[@id='envtable']//*[text()='" + teamName + "']")) {
+ SeleniumUtil.click("xpath",".//*[@id='envtable']//td[text()='"+teamName+"']/following-sibling::td//*[@title='"+edit+"']",SeleniumUtilities.OBJWAITTIMEOUT);
+ logger.info("Verified created Team:" + teamName);
+ break;
+ }
+ if(SeleniumUtil.getAttributeValue("id","envtable_next","class",SeleniumUtilities.OBJWAITTIMEOUT).equals("paginate_button next disabled")){
+ break;
+ }
+ else {
+ SeleniumUtil.click("id", "envtable_next", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.waitForElementVisibilityOf("id", "newTeam", SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ }
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyTeamName");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyTeamIsDeleted(String teamName) {
+ try {
+ SeleniumUtil.click("id","envtable_first",SeleniumUtilities.OBJWAITTIMEOUT);
+ while(true) {
+ assertFalse(SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//*[text()='"+teamName+"']", teamName, SeleniumUtilities.OBJWAITTIMEOUT));
+ if(SeleniumUtil.getAttributeValue("id","envtable_next","class",SeleniumUtilities.OBJWAITTIMEOUT).equals("paginate_button next disabled")){
+ logger.info("Verified Team is deleted : " + teamName);
+ break;
+ }
+ else {
+ SeleniumUtil.click("id", "envtable_next", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.waitForElementVisibilityOf("id", "newTeam", SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ }
+
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyTeamIsDeleted");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ImportNodesFromChefViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ImportNodesFromChefViews.java
new file mode 100755
index 000000000..2bed7dec7
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/ImportNodesFromChefViews.java
@@ -0,0 +1,356 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.LoginSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.PageFactory;
+
+import java.io.File;
+import java.util.logging.Logger;
+
+import static junit.framework.TestCase.assertTrue;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0372 on 10-08-2016.
+ */
+public class ImportNodesFromChefViews {
+
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+ public static String awsid = "";
+ public static String IpAddress="";
+
+ public static void clickOnAWSProvider() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath", ".//*[@id='blueprints']//div[@title='AWS']", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath", ".//*[@id='blueprints']//div[@title='AWS']", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnAWSProvider");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectBlueprintType(String blueprintType) {
+ try {
+ Thread.sleep(2000);
+ SeleniumUtil.waitForElementIsClickable("xpath", "//*[text()='"+blueprintType+"']", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath", "//*[text()='"+blueprintType+"']", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectBlueprintType");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnNext() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("linktext", "Next", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("linktext", "Next", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnNext");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectTemplate(String tempName) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath", ".//*[text()='" + tempName + "']", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath", ".//*[text()='" + tempName + "']", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectTemplate");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void selectValues(String valueToSelect, String idOfSelectBox) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id", idOfSelectBox, 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.selectByVisibleText("id", idOfSelectBox, valueToSelect, SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectTemplate");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectRegion(String region) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id", "region", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("id", "region", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.waitForElementIsClickable("xpath", "//*[contains(text(),'" + region + "')]", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ WebElement wb = SeleniumUtil.getElement("xpath", "//*[contains(text(),'" + region + "')]", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.sendEnterKeyToElement(wb);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectTemplate");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectSecurityGrp() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath", "//*[text()='sg-eeff688b | default']", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath", "//*[text()='sg-eeff688b | default']", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectSecurityGrp");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyEnvDetails(String envDetails) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath", "", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.waitForElementContainText("xpath", "//span[contains(text(),'" + envDetails + "')]", envDetails));
+ logger.info(envDetails + " is present");
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyEnvDetails");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnLaunchBlueprint() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("xpath", "//span[@title='Launch BluePrint']", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath", "//span[@title='Launch BluePrint']", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnLaunchBlueprint");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnWorkzone() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id","workZoneNew", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("id","workZoneNew",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnWorkzone");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnLaunchBlueprintPopUp() {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("id", "blueprintLaunch",8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("id","blueprintLaunch",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnWorkzone");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnLaunchOnSelBlueprintPopUp() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("cssselector", ".btn.btn-default.btn-primary.launchBlueprintBtn", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("cssselector", ".btn.btn-default.btn-primary.launchBlueprintBtn", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnLaunchOnSelBlueprintPopUp");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void captureIpAddress(String bluePrintName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//div[div[text()='"+bluePrintName+"']]/following-sibling::div/strong", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ IpAddress=SeleniumUtil.getElementText("xpath", "//div[div[text()='"+bluePrintName+"']]/following-sibling::div/strong", SeleniumUtilities.OBJWAITTIMEOUT);
+ System.out.println("Captured IP address "+IpAddress);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("captureIpAddress");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void captureAwsId(String bluePrintName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", "//div[div[text()='" +bluePrintName +"']]/../div[contains(text(),'AWS Id')]", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ String capturedText = SeleniumUtil.getElementText("xpath", "//div[div[text()='"+bluePrintName+"']]/../div[contains(text(),'AWS Id')]", SeleniumUtilities.OBJWAITTIMEOUT);
+ String[] parts = capturedText.split(":");
+ String awsTitle = parts[0];
+ awsid = parts[1].trim();
+ System.out.println("AWS title"+awsTitle);
+ System.out.println("AWS id "+awsid);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("captureAwsId");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+ public static void checkTheCheckBoxOfCorrespondingAWSID() {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath",".//*[@id='nodeListTable_filter']//input", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("xpath",".//*[@id='nodeListTable_filter']//input",awsid,SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='nodeListTable']//*[text()='"+awsid+"']/..//*[@type='checkbox']", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath", ".//*[@id='nodeListTable']//*[text()='"+awsid+"']/..//*[@type='checkbox']", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnLaunchOnSelBlueprintPopUp");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnImportNodesButton() {
+ try {
+ SeleniumUtil.waitForElementIsClickable("id", "buttonForIP", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("id","buttonForIP", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnImportNodesButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectBGroupInImportPopUp(String businessGroup,String idOfDropDown) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("id", idOfDropDown, 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.selectByVisibleText("id",idOfDropDown,businessGroup,SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectBGroupInImportPopUp");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void enterUserNameInPopup(String userName, String idOfEditBox) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("id", idOfEditBox, 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.type("id",idOfEditBox,userName,SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("enterUserNameInPopup");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void importPemFileInPopupWindow() {
+ try{
+ String path = new String(new File(".").getCanonicalPath() + "\\src\\test\\resources\\Upload\\bootstrapncal.pem");
+ WebDriver driver=SeleniumUtil.getWebDriver();
+ driver.findElement(By.id("importPemfileInput")).sendKeys(path);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("importPemFileInPopupWindow");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickOnImportButton() {
+ try{
+ SeleniumUtil.click("xpath","//button[text()='Import']",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnImportButtonPopupWindow");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void verifyImportingNodesPopUp() {
+ try{
+ SeleniumUtil.waitForElementVisibilityOf("xpath","//h4[text()='Importing Nodes']",SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("xpath","//h4[text()='Importing Nodes']","Importing Nodes",SeleniumUtilities.OBJWAITTIMEOUT));
+ logger.info("Importing Nodes is displayed");
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("verifyImportingNodesPopUp");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void clickOnCloseButtonOnPopup() {
+ try{
+ SeleniumUtil.click("cssselector",".btn.btn-default",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickOnCloseButtonOnPopup");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+
+ }
+
+ public static void verifyNodeImportedMessage() {
+ try{
+ SeleniumUtil.waitForElementPresent("xpath","//div[contains(text(),'Node Imported : "+awsid+"')]");
+ SeleniumUtil.verifyTextValue("xpath","//div[contains(text(),'Node Imported : "+awsid+"')]","Node Imported : "+awsid+"",SeleniumUtilities.OBJWAITTIMEOUT);
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("verifyNodeImportedMessage");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ } catch (Throwable throwable) {
+ throwable.printStackTrace();
+ }
+ }
+ // public static void browsePemFile() {
+// try{
+// //SeleniumUtil.waitForElementIsClickable("xpath","//*[@for='userpemfile']",8, SeleniumUtilities.OBJWAITTIMEOUT);
+// //SeleniumUtil.click("xpath","//*[@for='userpemfile']",SeleniumUtilities.OBJWAITTIMEOUT);
+// Thread.sleep(5000);
+// String path = new String(new File(".").getCanonicalPath() + "/src/test/resources/Upload/mycatqa.pem");
+// SeleniumUtil.uploadPemFile(path);
+//
+//
+// //original
+// //String path="catalyst\\src\\test\\resources\\Upload";
+// // String path = new String(new File(".").getCanonicalPath() + "/src/test/resources/Upload/mycatqa.pem");
+// Thread.sleep(5000);
+// }
+// catch(Exception ex){
+// BaseView.takeScreenshot("clickOnPemFileBrowse");
+// SeleniumUtil.Log.info("Error :" + ex.getMessage());
+// fail(ex.getMessage());
+// }
+// }
+ public static void selectEnv(String envName) {
+ try {
+ SeleniumUtil.selectByVisibleText("id", "chefEnv",envName,SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectEnv");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void deleteInstance() {
+ try {
+ SeleniumUtil.click("xpath", "//*[@class='card-btns']//button",SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath","//span[@ng-click='operationSet.deleteInstance(inst, $index);']",SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("cssselector",".btn.cat-btn-delete",SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectEnv");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyConfirmationMsg(String confirmationMsg) {
+ try {
+ assertTrue(SeleniumUtil.verifyTextValue("xpath","//*[text()='"+confirmationMsg+"']",confirmationMsg,SeleniumUtilities.OBJWAITTIMEOUT));
+ SeleniumUtil.waitUntilElementDisappers("xpath","//*[text()='"+confirmationMsg+"']",3,SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyConfirmationMsg");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+}
\ No newline at end of file
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/LoginViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/LoginViews.java
new file mode 100755
index 000000000..c76390166
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/LoginViews.java
@@ -0,0 +1,234 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.By;
+import org.openqa.selenium.Keys;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.PageFactory;
+
+import static junit.framework.Assert.assertTrue;
+import static junit.framework.TestCase.fail;
+
+
+/**
+ * Created by RLE0097 on 21-06-2016.
+ */
+public class LoginViews {
+ public static String gmail,yahoo;
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ //Actions act = new Actions(driver);
+
+ public static void enterUsername(String strUserName){
+ try {
+ SeleniumUtil.type("id","Email", strUserName, SeleniumUtilities.OBJWAITTIMEOUT);
+ Thread.sleep(8000);
+ WebElement wb=SeleniumUtil.getElement("id","Email",10);
+ wb.sendKeys(Keys.TAB);
+ Thread.sleep(3000);
+ wb.sendKeys(Keys.ENTER);
+// SeleniumUtil.findWebElement("name","signIn",10);
+ Thread.sleep(8000);
+ System.out.println("I Entered the Gmail Email Address");
+
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("enterUsername");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void enterYahooUsername(String strUserName){
+ try {
+// SeleniumUtil.click("xpath","//*[@title='Sign in']",10);
+ SeleniumUtil.type("id","login-username", strUserName, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("id","login-signin",10);
+ System.out.println("I Entered the Yahoo Email Address");
+
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("enterUsername");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+
+ public static void enterPassword(String strPassword){
+ try {
+ Thread.sleep(8000);
+ SeleniumUtil.type("id", "Passwd", strPassword, SeleniumUtilities.OBJWAITTIMEOUT);
+ System.out.println("I Entered the Gmail Password");
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("enterPassword");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void enterYahooPassword(String strPassword){
+ try {
+ Thread.sleep(1000);
+ SeleniumUtil.findWebElement(".//*[@id='login-passwd']");
+ SeleniumUtil.type("xpath",".//*[@id='login-passwd']", strPassword, SeleniumUtilities.OBJWAITTIMEOUT);
+ System.out.println("I Entered the Yahoo Password");
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("enterPassword");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+
+ public static void clickLoginButton(){
+ try {
+ Thread.sleep(4000);
+ SeleniumUtil.click("xpath", ".//*[@id='signIn']", SeleniumUtilities.OBJWAITTIMEOUT);
+ System.out.println("I Clicked on Gmail login button");
+ Thread.sleep(8000);
+ //SeleniumUtil.click("css",".T-I.J-J5-Ji.T-I-KE.L3",8);
+ //SeleniumUtil.waitForElementVisibilityOf("xpath","//*[@title='Starred']",8, 10);
+ //assertTrue(SeleniumUtil.verifyTextValue("xpath", "//*[@title='Starred']", "Starred" , SeleniumUtilities.OBJWAITTIMEOUT));
+ //assertTrue(SeleniumUtil.verifyTextValue("xpath", "//*[@title='Starred']", "Starred" , SeleniumUtilities.OBJWAITTIMEOUT));
+ //assertTrue(SeleniumUtil.isElementPresent(By.xpath("//div[text()='COMPOSE']")));
+ assertTrue(SeleniumUtil.isElementPresent(By.xpath("//*[@title='Starred']")));
+ System.out.println("I am able to see the starred button now");
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickLoginButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void clickYahooLoginButton(){
+ try {
+ SeleniumUtil.click("id", "login-signin", SeleniumUtilities.OBJWAITTIMEOUT);
+ System.out.println("I Clicked on Yahoo login button");
+ Thread.sleep(4000);
+ //assertTrue(SeleniumUtil.verifyTextValue("xpath", "//b[text()='Home']", "Home" , SeleniumUtilities.OBJWAITTIMEOUT));
+ assertTrue(SeleniumUtil.isElementPresent(By.xpath("//*[@id='uh-logo']")));
+ System.out.println("I am able to see Home button");
+
+ }
+ catch(Exception ex){
+ BaseView.takeScreenshot("clickLoginButton");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void signOutGmail(){
+ try {
+ Thread.sleep(4000);
+ //SeleniumUtil.click("xpath","//div[@class='gb_uc gb_hb gb_yf gb_R']",SeleniumUtilities.OBJWAITTIMEOUT);
+ //SeleniumUtil.waitForElementIsClickable("xpath","//span[@class='gb_8a gbii']",8,SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.click("cssselector", "a[title='Sign Out']", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath","//span[@class='gb_8a gbii']",SeleniumUtilities.OBJWAITTIMEOUT);
+ Thread.sleep(3000);
+ SeleniumUtil.waitForElementIsClickable("xpath","//a[text()='Sign out']",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath","//a[text()='Sign out']",SeleniumUtilities.OBJWAITTIMEOUT);
+ Thread.sleep(5000);
+ assertTrue(SeleniumUtil.isElementPresent(By.xpath("//*[@value='Sign in']")));
+ }
+
+ catch(Exception ex){
+ BaseView.takeScreenshot("signOut");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void signOutYahoo(){
+ try {
+ Thread.sleep(4000);
+ SeleniumUtil.click("xpath","//li[@id='uh-profile']",10);
+ Thread.sleep(2000);
+ SeleniumUtil.click("xpath","//*[@id='uh-signout']",SeleniumUtilities.OBJWAITTIMEOUT);
+ Thread.sleep(3000);
+ assertTrue(SeleniumUtil.isElementPresent(By.xpath("//*[@id='uh-signin']")));
+
+
+ //SeleniumUtil.waitForElementIsClickable("xpath","//span[@class='gb_8a gbii']",8,SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.click("cssselector", "a[title='Sign Out']", SeleniumUtilities.OBJWAITTIMEOUT);
+ //SeleniumUtil.click("xpath","//span[@class='gb_8a gbii']",SeleniumUtilities.OBJWAITTIMEOUT);
+ //Thread.sleep(2000);
+ //SeleniumUtil.waitForElementIsClickable("xpath","//a[text()='Sign out']",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ //SeleniumUtil.click("xpath","//a[text()='Sign out']",SeleniumUtilities.OBJWAITTIMEOUT);
+
+ }
+
+ catch(Exception ex){
+ BaseView.takeScreenshot("signOut");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void signOut(){
+ try {
+ Thread.sleep(2000);
+ SeleniumUtil.waitForElementIsClickable("id","logout",8,SeleniumUtilities.OBJWAITTIMEOUT);
+// SeleniumUtil.click("cssselector", "a[title='Sign Out']", SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("id","logout",SeleniumUtilities.OBJWAITTIMEOUT);
+ Thread.sleep(2000);
+ SeleniumUtil.waitForElementIsClickable("xpath","//button[text()=' Yes']",8,SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("xpath","//button[text()=' Yes']",SeleniumUtilities.OBJWAITTIMEOUT);
+
+ }
+
+ catch(Exception ex){
+ BaseView.takeScreenshot("signOut");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+
+ public static void checkURLForApplication()
+ {
+
+ }
+
+
+ public static void whichApplicationToLaunch(String strEmailAppName)
+ {
+ try
+ {
+ if(strEmailAppName == gmail)
+ {
+ System.out.println("Its an Gmail application");
+
+
+
+ }
+ else if (strEmailAppName == yahoo)
+ {
+ System.out.println("Its an Yahoo application");
+
+ }
+ else
+ {
+ System.out.println("Nonoe of the gmail or yahoo application will be opened");
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+
+ }
+
+ }
+
+
+ public static void loggedout()
+ {
+ System.out.println("Logged out of application successfully");
+ }
+
+
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/TemplateViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/TemplateViews.java
new file mode 100755
index 000000000..22f772032
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/TemplateViews.java
@@ -0,0 +1,136 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.LoginSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.remote.LocalFileDetector;
+import org.openqa.selenium.remote.RemoteWebElement;
+import org.openqa.selenium.support.PageFactory;
+
+import java.io.File;
+import java.util.logging.Logger;
+
+import static junit.framework.TestCase.*;
+
+/**
+ * Created by RLE0372 on 11-08-2016.
+ */
+public class TemplateViews {
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+
+ public static void clickOnLink(String linkText) {
+ try {
+ SeleniumUtil.waitForElementIsClickable("linktext", "Gallery Setup", 8, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.click("linktext", "Gallery Setup", SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("clickOnProLink");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectTempType(String tempType) {
+ try {
+ SeleniumUtil.selectByVisibleText("id","templatetypename",tempType,SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectTempType");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyTempDetails(String templateName, String tempDetails) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='" + templateName + "']//*[text()='" + tempDetails + "']", 5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//*[text()='" + templateName + "']/following-sibling::td[text()='" + tempDetails + "']", tempDetails, SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Verified :" + tempDetails);
+// } else {
+// logger.info("Not found:" + tempDetails);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyTempDetails");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyDeletedTemp(String tempName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='" + tempName + "']", 1, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertFalse(SeleniumUtil.isElementExist("xpath", ".//*[@id='envtable']//*[text()='" + tempName + "']")); {
+ logger.info("Template does not exists :deleted");
+// } else {
+// logger.info("Template does not exists : deleted");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyDeletedTemp");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyChefFactory(String idOfChkBox) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("id", idOfChkBox,5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.isElementExist("id", idOfChkBox)); {
+ logger.info("Chef Factory is displayed");
+// } else {
+// logger.info("Chef factory is displayed");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyChefFactory");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyTempName(String tempName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+tempName+"']",4, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//*[text()='"+tempName+"']",tempName,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info(tempName + " Created Template is available");
+// } else {
+// logger.info(tempName + " Craeted Template is not available");
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyDeletedTemp");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectOrgInTemplatePage(String orgName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("id","orgname",1, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.selectByVisibleText("id","orgname",orgName, SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectOrgInTemplatePage");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void browseAndUploadTemplateFile(String fileName) {
+ try {
+ WebDriver driver=SeleniumUtil.getWebDriver();
+ WebElement element = driver.findElement(By.id("template"));
+ LocalFileDetector detector = new LocalFileDetector();
+ String path = new String(new File(".").getCanonicalPath() + "/src/test/resources/Upload/"+fileName);
+ File f = detector.getLocalFile(path);
+ ((RemoteWebElement)element).setFileDetector(detector);
+ element.sendKeys(f.getAbsolutePath());
+// element.sendKeys(path);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectOrgInTemplatePage");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+}
+
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/VMImageViews.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/VMImageViews.java
new file mode 100755
index 000000000..7980a9b89
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/java/com/rl/qa/views/VMImageViews.java
@@ -0,0 +1,88 @@
+package com.rl.qa.views;
+
+import com.rl.qa.browsers.BrowserDriver;
+import com.rl.qa.steps.LoginSteps;
+import com.rl.qa.utils.BaseView;
+import com.rl.qa.utils.SeleniumUtilities;
+import org.openqa.selenium.support.PageFactory;
+
+import java.util.logging.Logger;
+
+import static junit.framework.Assert.assertTrue;
+import static junit.framework.TestCase.fail;
+
+/**
+ * Created by RLE0372 on 11-08-2016.
+ */
+public class VMImageViews {
+ private static final SeleniumUtilities SeleniumUtil = PageFactory.initElements(BrowserDriver.getCurrentDriver(), SeleniumUtilities.class);
+ private static final Logger logger = Logger.getLogger(LoginSteps.class.getName());
+
+
+ public static void selectOS(String osType) {
+ try {
+ SeleniumUtil.selectByVisibleText("id","osType",osType,SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectOS");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyCreatedImage(String imageName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+imageName+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//*[text()='"+imageName+"']",imageName,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Verified created VMImage:"+imageName);
+// } else {
+// logger.info("VMImage not found:" +imageName);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyCreatedImage");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void verifyVMImageDetails(String imageName, String imageDetail) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+imageName+"']/following-sibling::td[text()='"+imageDetail+"']",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue (SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//*[text()='"+imageName+"']/following-sibling::td[text()='"+imageDetail+"']",imageDetail,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Verified VMImage details:"+imageDetail);
+// } else {
+// logger.info("VMImage details not found:" +imageDetail);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyCreatedImage");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+
+ }
+
+ public static void verifyImageId(String imageName, String imageDetail) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("xpath", ".//*[@id='envtable']//*[text()='"+imageName+"']/following-sibling::td/span",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ assertTrue(SeleniumUtil.verifyTextValue("xpath", ".//*[@id='envtable']//*[text()='"+imageName+"']/following-sibling::td/span",imageDetail,SeleniumUtilities.OBJWAITTIMEOUT)); {
+ logger.info("Verified VMImage details:"+imageDetail);
+// } else {
+// logger.info("VMImage details not found:" +imageDetail);
+ }
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("verifyCreatedImage");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+
+ public static void selectOrgInVMImagePage(String orgName) {
+ try {
+ SeleniumUtil.waitForElementVisibilityOf("id", "orgId",5, SeleniumUtilities.OBJWAITTIMEOUT);
+ SeleniumUtil.selectByVisibleText("id","orgId",orgName,SeleniumUtilities.OBJWAITTIMEOUT);
+ } catch (Exception ex) {
+ BaseView.takeScreenshot("selectOrgInVMImagePage");
+ SeleniumUtil.Log.info("Error :" + ex.getMessage());
+ fail(ex.getMessage());
+ }
+ }
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/IEDriverServer.exe b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/IEDriverServer.exe
new file mode 100755
index 000000000..ff6e0dcc5
Binary files /dev/null and b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/IEDriverServer.exe differ
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/JSErrorCollector-0.6.jar b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/JSErrorCollector-0.6.jar
new file mode 100755
index 000000000..a3b159bd0
Binary files /dev/null and b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/JSErrorCollector-0.6.jar differ
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/chromedriver.exe b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/chromedriver.exe
new file mode 100755
index 000000000..c312e1bab
Binary files /dev/null and b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/chromedriver.exe differ
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/firebug/firebug-1.9.2.xpi b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/firebug/firebug-1.9.2.xpi
new file mode 100755
index 000000000..39294c5f2
Binary files /dev/null and b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/firebug/firebug-1.9.2.xpi differ
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/log4j.properties b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/log4j.properties
new file mode 100755
index 000000000..7872524aa
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/log4j.properties
@@ -0,0 +1,16 @@
+# Root logger option
+log4j.rootLogger=INFO,stdout,file
+
+# Redirect log messages to console
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
+
+# Redirect log messages to a log file, support file rolling.
+log4j.appender.file=org.apache.log4j.RollingFileAppender
+log4j.appender.file.File=${user.dir}\\target\\log4j-application.log
+log4j.appender.file.MaxFileSize=5MB
+log4j.appender.file.MaxBackupIndex=10
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
\ No newline at end of file
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/lx-selenium.properties b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/lx-selenium.properties
new file mode 100755
index 000000000..30383a546
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/lx-selenium.properties
@@ -0,0 +1,11 @@
+# The specified maven profile will provide values for the properties below that
+# are surrounded by the ${} tokens.
+
+# IWMS web-ui properties
+browser=${browser}
+iwms.url=${iwms.url}
+iwms.username=${iwms.username}
+iwms.password=${iwms.password}
+selenium.hub=${selenium.hub}
+
+iwms.firm=${iwms.firm}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/Administrator.properties b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/Administrator.properties
new file mode 100755
index 000000000..9fd25f1d0
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/Administrator.properties
@@ -0,0 +1,3 @@
+username=rootDev
+firmname=qa2
+password=DES:21GK+y5lCqiLqU3m0cjjejq+YIWfE2Wu
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/Broker.properties b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/Broker.properties
new file mode 100755
index 000000000..232989a71
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/Broker.properties
@@ -0,0 +1,6 @@
+username=a-broker
+firmname=2338
+password=DES:6bshieViClWfoVfxtDwpVQc0kmvGj21N
+
+
+
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/Delete.properties b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/Delete.properties
new file mode 100755
index 000000000..71a259259
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/Delete.properties
@@ -0,0 +1,3 @@
+username=delUser
+firmname=QA2
+password=DES:M/Ac8cUOQcoaz01kiBIEY+YrsGsMQs35
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/Edit.properties b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/Edit.properties
new file mode 100755
index 000000000..3c580424d
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/Edit.properties
@@ -0,0 +1,3 @@
+username=editUser
+firmname=QA2
+password=DES:M/Ac8cUOQcoaz01kiBIEY+YrsGsMQs35
\ No newline at end of file
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/NoAccessInAdminDash.properties b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/NoAccessInAdminDash.properties
new file mode 100755
index 000000000..51f33c6c4
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/NoAccessInAdminDash.properties
@@ -0,0 +1,3 @@
+username=noAccessInAdminDash
+firmname=QA2
+password=DES:M/Ac8cUOQcoaz01kiBIEY+YrsGsMQs35
\ No newline at end of file
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/No_Access.properties b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/No_Access.properties
new file mode 100755
index 000000000..7e6678be5
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/No_Access.properties
@@ -0,0 +1,3 @@
+username=noAccessUser
+firmname=QA2
+password=DES:M/Ac8cUOQcoaz01kiBIEY+YrsGsMQs35
\ No newline at end of file
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/View.properties b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/View.properties
new file mode 100755
index 000000000..11809657f
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/main/resources/users/View.properties
@@ -0,0 +1,3 @@
+username=viewUser
+firmname=QA2
+password=DES:M/Ac8cUOQcoaz01kiBIEY+YrsGsMQs35
\ No newline at end of file
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/CreateOrganizationRunner.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/CreateOrganizationRunner.java
new file mode 100755
index 000000000..cbe996206
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/CreateOrganizationRunner.java
@@ -0,0 +1,22 @@
+import cucumber.api.CucumberOptions;
+import cucumber.api.junit.Cucumber;
+import org.junit.runner.RunWith;
+
+/**
+ * Created by RLE0372 on 05-10-2016.
+ */
+
+
+
+@RunWith(Cucumber.class)
+@CucumberOptions(
+ features = {
+ "src/test/resources/catalyst/settings/orgsetup/1CreateOrganization.feature",
+ },
+ tags={"@One"},
+ glue={"com.rl.qa"},
+ format = {"pretty", "html:target/cucumber", "json:target/reports/json/CreateOrganizationRunner.json"}
+)
+
+public class CreateOrganizationRunner {
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/DeleteOrganizationRunner.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/DeleteOrganizationRunner.java
new file mode 100755
index 000000000..945284526
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/DeleteOrganizationRunner.java
@@ -0,0 +1,20 @@
+import cucumber.api.CucumberOptions;
+import cucumber.api.junit.Cucumber;
+import org.junit.runner.RunWith;
+
+/**
+ * Created by RLE0372 on 05-10-2016.
+ */
+
+@RunWith(Cucumber.class)
+@CucumberOptions(
+ features = {
+ "src/test/resources/catalyst/settings/orgsetup/DeleteOrganization.feature",
+ },
+ tags={"@Delete"},
+ glue={"com.rl.qa"},
+ format = {"pretty", "html:target/cucumber", "json:target/reports/json/DeleteOrganizationRunner.json"}
+)
+
+public class DeleteOrganizationRunner {
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/Mail.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/Mail.java
new file mode 100755
index 000000000..332eb5618
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/Mail.java
@@ -0,0 +1,24 @@
+
+import cucumber.api.CucumberOptions;
+import cucumber.api.junit.Cucumber;
+import org.junit.runner.RunWith;
+
+/**
+ * Created by rle0346 on 15/11/16.
+ */
+@RunWith(Cucumber.class)
+@CucumberOptions(
+ features = {
+
+ "src/test/resources/mailApplication/EmailLoginAndLogout.feature"
+ },
+
+ tags={"@Application"},
+ glue={"com.rl.qa"},
+ format = {"pretty", "html:target/cucumber", "json:target/reports/json/Application.json"})
+
+
+
+public class Mail {
+
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner1.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner1.java
new file mode 100755
index 000000000..b19b2ce62
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner1.java
@@ -0,0 +1,52 @@
+//package com.rl.qa.steps;
+
+import cucumber.api.CucumberOptions;
+import cucumber.api.junit.Cucumber;
+import org.junit.runner.RunWith;
+
+/**
+ * Created by RLE0372 on 26-07-2016.
+ **/
+
+@RunWith(Cucumber.class)
+@CucumberOptions(
+ features = {
+ "src/test/resources/catalyst/settings/orgsetup"
+ //"src/test/resources/catalyst/settings/orgsetup/CreateOrganization.feature",
+ //"src/test/resources/catalyst/settings/orgsetup/CreateBusinessGroup.feature",
+ //"src/test/resources/catalyst/settings/orgsetup/CreateProject.feature",
+ //"src/test/resources/catalyst/settings/userssetup/CreateSuperadmin.feature",
+
+
+
+
+ // "src/test/resources/catalyst/settings/orgsetup/CreateEditDelOrg.feature",
+ // "src/test/resources/catalyst/settings/orgsetup/CreateEditDelBGroup.feature",
+ // "src/test/resources/catalyst/settings/orgsetup/CreateEditDelProject.feature",
+ // "src/test/resources/catalyst/settings/configsetup/ChefServerSetup.feature",
+// "src/test/resources/catalyst/settings/orgsetup/CreateEnvUsingEnvFromChefServer.feature",
+// "src/test/resources/catalyst/settings/orgsetup/CreateEditDelEnvByCreatingNewEnv.feature",
+// "src/test/resources/catalyst/settings/devopssetup/ConfigureNexusServer.feature",
+// "src/test/resources/catalyst/settings/devopssetup/ConfigAWSProviderWithInvalidKey.feature",
+// "src/test/resources/catalyst/settings/devopssetup/ConfigureAWSProviderUsingAccessKey.feature",
+// "src/test/resources/catalyst/settings/devopssetup/ConfigureAzureProvider.feature",
+// "src/test/resources/catalyst/settings/devopssetup/ConfigureOpenStackProvider.feature",
+// "src/test/resources/catalyst/settings/devopssetup/ConfigureVMWareProvider.feature",
+// "src/test/resources/catalyst/settings/devopssetup/CreateEditDelDocker.feature",
+// "src/test/resources/catalyst/settings/devopssetup/CreateEditDelJenkins.feature",
+// "src/test/resources/catalyst/settings/userssetup/CreateEditDelDesigner.feature",
+// "src/test/resources/catalyst/settings/userssetup/CreateEditDelSuperadmin.feature",
+// "src/test/resources/catalyst/settings/userssetup/CreateEditDeleteTeams.feature",
+// "src/test/resources/catalyst/settings/userssetup/CreateEditDelOrgAdmin.feature",
+ },
+
+ tags={"@One,@Two,@Three"},
+ glue={"com.rl.qa"},
+ format = {"pretty", "html:target/cucumber", "json:target/reports/json/TestRunner1.json", "junit:target/test-report.xml"})
+
+
+public class TestRunner1 {
+
+
+
+}
\ No newline at end of file
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner2.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner2.java
new file mode 100755
index 000000000..64888212e
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner2.java
@@ -0,0 +1,24 @@
+import cucumber.api.CucumberOptions;
+import cucumber.api.junit.Cucumber;
+import org.junit.runner.RunWith;
+
+/**
+ * Created by RLE0372 on 23-08-2016.
+ */
+@RunWith(Cucumber.class)
+@CucumberOptions(
+ features = {
+
+ "src/test/resources/catalyst/settings/userssetup",
+
+ // "src/test/resources/catalyst/settings/configsetup/CreateEnvUsingEnvFromChefServer.feature",
+ //"src/test/resources/catalyst/settings/configsetup/CreateEditDelEnvByCreatingNewEnv.feature",
+ //"src/test/resources/catalyst/settings/userssetup/CreateEditDeleteTeams.feature",
+ //"src/test/resources/catalyst/settings/userssetup/CreateOrgAndVerifyFourAutoCreatedTeams.feature",
+ },
+ tags={"@Four,@Five"},
+ glue={"com.rl.qa"},
+ format = {"json:target/reports/json/TestRunner2.json"})
+public class TestRunner2 {
+
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner3.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner3.java
new file mode 100755
index 000000000..95d8fac30
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner3.java
@@ -0,0 +1,22 @@
+import cucumber.api.CucumberOptions;
+import cucumber.api.junit.Cucumber;
+import org.junit.runner.RunWith;
+
+/**
+ * Created by RLE0372 on 23-08-2016.
+ */
+ @RunWith(Cucumber.class)
+ @CucumberOptions(
+ features = {
+ "src/test/resources/catalyst/settings/configsetup",
+ //"src/test/resources/catalyst/settings/devopssetup/ConfigureAWSProviderUsingAccessKey.feature",
+// "src/test/resources/catalyst/settings/devopssetup/ConfigureAzureProvider.feature",
+ //"src/test/resources/catalyst/settings/devopssetup/ConfigureOpenStackProvider.feature",
+ //"src/test/resources/catalyst/settings/devopssetup/ConfigureVMWareProvider.feature",
+ },
+ tags={"@Six,@Seven,@Eight"},
+ glue={"com.rl.qa"},
+ format = {"json:target/reports/json/TestRunner3.json"})
+ public class TestRunner3 {
+
+ }
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner4.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner4.java
new file mode 100755
index 000000000..69ce0f138
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner4.java
@@ -0,0 +1,25 @@
+import cucumber.api.CucumberOptions;
+import cucumber.api.junit.Cucumber;
+import org.junit.runner.RunWith;
+
+/**
+ * Created by RLE0372 on 23-08-2016.
+ */
+@RunWith(Cucumber.class)
+@CucumberOptions(
+ features = {
+
+ "src/test/resources/catalyst/settings/gallerysetup"
+
+ //"src/test/resources/catalyst/settings/userssetup/CreateEditDelDesigner.feature",
+ //"src/test/resources/catalyst/settings/userssetup/CreateEditDelSuperadmin.feature",
+ //"src/test/resources/catalyst/settings/userssetup/CreateEditDelOrgAdmin.feature",
+ //"src/test/resources/catalyst/settings/devopssetup/ConfigAWSProviderWithInvalidKey.feature",
+ },
+ glue={"com.rl.qa"},
+ tags={"@Nine,@Ten"},
+ format = {"json:target/reports/json/TestRunner4.json"})
+public class TestRunner4 {
+
+
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner5.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner5.java
new file mode 100755
index 000000000..28dfdef92
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner5.java
@@ -0,0 +1,24 @@
+import cucumber.api.CucumberOptions;
+import cucumber.api.junit.Cucumber;
+import org.junit.runner.RunWith;
+
+/**
+ * Created by RLE0372 on 25-08-2016.
+ */
+
+@RunWith(Cucumber.class)
+@CucumberOptions(
+ features = {
+
+ "src/test/resources/catalyst/settings/devopssetup"
+ // "src/test/resources/catalyst/settings/gallerysetup/CreateEditDelCloudFormationTemp.feature",
+ //"src/test/resources/catalyst/settings/gallerysetup/CreateEditDelDockerTemplate.feature",
+ //"src/test/resources/catalyst/settings/gallerysetup/CreateEditDeleteARMTemplate.feature",
+ //"src/test/resources/catalyst/settings/gallerysetup/CreateEditDelSoftwareStackTemp.feature"
+ },
+ glue={"com.rl.qa"},
+ tags={"@Eleven,@Twelve"},
+ format = {"json:target/reports/json/TestRunner5.json"})
+public class TestRunner5 {
+
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner6.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner6.java
new file mode 100755
index 000000000..ec9b5d413
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner6.java
@@ -0,0 +1,21 @@
+import cucumber.api.CucumberOptions;
+import cucumber.api.junit.Cucumber;
+import org.junit.runner.RunWith;
+
+/**
+ * Created by RLE0372 on 29-08-2016.
+ */
+
+@RunWith(Cucumber.class)
+@CucumberOptions(
+ features = {
+ "src/test/resources/catalyst/settings/gallerysetup/CreateEditDeleteVMImageUsingProviderTypeAzure.feature",
+ "src/test/resources/catalyst/settings/gallerysetup/CreateEditDelVMImageUsingProviderTypeOpenStack.feature",
+ "src/test/resources/catalyst/settings/gallerysetup/CreateEditDelVMImageUsingProviderTypeAWS.feature",
+ "src/test/resources/catalyst/settings/gallerysetup/CreateEditDelVMImageUsingProviderTypeVMware.feature"
+ },
+ glue={"com.rl.qa"},
+ format = {"json:target/reports/json/TestRunner6.json"})
+public class TestRunner6 {
+
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner7.java b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner7.java
new file mode 100755
index 000000000..7b90a0eab
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/java/TestRunner7.java
@@ -0,0 +1,22 @@
+import cucumber.api.CucumberOptions;
+import cucumber.api.junit.Cucumber;
+import org.junit.runner.RunWith;
+
+/**
+ * Created by RLE0372 on 06-09-2016.
+ */
+
+@RunWith(Cucumber.class)
+@CucumberOptions(
+ features = {
+ "src/test/resources/catalyst/settings/devopssetup/CreateEditDelDocker.feature",
+ "src/test/resources/catalyst/settings/devopssetup/CreateEditDelJenkins.feature",
+ "src/test/resources/catalyst/settings/devopssetup/ConfigureNexusServer.feature",
+// "src/test/resources/catalyst/settings/devopssetup/ConfigAWSProviderWithInvalidKey.feature",
+ "src/test/resources/catalyst/settings/devopssetup/ConfigureAzureProvider.feature",
+ },
+ glue={"com.rl.qa"},
+ format = {"json:target/reports/json/TestRunner7.json"})
+public class TestRunner7 {
+
+}
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/resources/Design/ConfigBlueprintForCFTUsingProAWS.feature b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/resources/Design/ConfigBlueprintForCFTUsingProAWS.feature
new file mode 100755
index 000000000..b2354c16e
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/resources/Design/ConfigBlueprintForCFTUsingProAWS.feature
@@ -0,0 +1,201 @@
+@All
+Feature: As a super user I Configure Blueprint for Cloud Formation Template using provider type AWS
+ Scenario Outline: As a super user I create a organization
+ Given I Login to catalyst using "" access credentials
+ And I see the catalyst "workzone"
+ And I click on "SETTINGS" link
+ And I click on Organizations link in main page
+ And I click on "newOrg" button
+ And I enter "" in "orgname" Edit box
+ And I click on save button
+ And I verify the created "" in list
+
+ Examples:
+ | Login User | Organization |
+ | superadmin | UAT_RL1 |
+
+ Scenario Outline: As a super user I create a Business group
+ And I click on Business Groups Link
+ And I click on New BGroup button
+ And I enter the "" name in Business Group name
+ And I select "" from the select box
+ And I click on save button
+ And I verify the created "" in Business group table
+
+ Examples:
+ | Business Group | Organization |
+ | Cat_UAT | UAT_RL1 |
+
+ Scenario Outline: As a super user I create a Project
+ And I click on Projects link
+ And I click on "newProj" button
+ And I enter "" in "projectname" Edit box
+ And I enter "" in "description" Edit box
+ And I select "" from the select box
+ And I click on save button
+ And I verify the created "" in project table
+ Examples:
+ |Project name|Organization |Description |
+ | Catalyst |UAT_RL1 | Catalyst_UAT_RL|
+
+ Scenario Outline: As a super user I create a chef server
+ And I click on "Config Setup" link
+ And I click on "Chef Server" link
+ And I click on "newConfig" button
+ And I enter "" in "configname" Edit box
+ And I enter "" in "loginname" Edit box
+ And I enter "" in "url" Edit box
+ And I select "" from the select box
+ And I click on user pem file browse button
+ And I click on knife file browse button
+# And I upload pem file ""
+# And I upload knife file ""
+ And I click on save button
+ And I verify created "" in chef server table
+
+ Examples:
+ | Chef Server | User Name | URL | Organization |
+ | Cat_Chef_Server | mycatqa |https://api.opscode.com/organizations/cattest | UAT_RL1 |
+
+ Scenario Outline: As a super user I create environment
+ And I click on Environments link
+ And I click on "newENV" button
+ And I select "" from the select box
+ And I select "" from the select box
+ And I select existing chef "" from chef server
+ And I check the "" check box
+# And I check the "" check box
+ And I click on save button
+ And I verify created "" in environments table
+
+ Examples:
+ | Organization |environment |Organization_1|Project |
+ | UAT_RL1 |QA957 |Smoke_Rel_Org |Catalyst|
+
+ Scenario Outline: As a super user I create a Team
+ And I click on the "Users Setup" link
+ And I click on the "Teams" link
+ And I click on "newTeam" button
+ And I enter "" in "teamname" Edit box
+ And I enter "" in "description" Edit box
+ And I select "" from the select box
+ And I check the "superadmin" check box
+ And I check the "" check box
+# And I check the "" check box
+ And I click on save button
+ And I verify created "" in the teams table
+
+ Examples:
+ |Team Name |Description |Organization |Project |
+ |UatAutoTeam13 |UAT Automation Team| UAT_RL1 |Catalyst |
+
+ Scenario Outline: As a super user I create a AWS Provider
+ And I click on "DevOps Setup" link
+ And I click on "Providers" link
+ And I click on "addnewitem" button
+ And I select provider type "AWS"
+ And I enter "" in "name" Edit box
+ And I click on "credentials-accessKeys" User Access Key
+ And I enter "" in "accessKey" Edit box
+ And I enter "" in "secretKey" Edit box
+ And I enter "" in "s3BucketName" Edit box
+ And I select "" from the select box in new provider page
+ And I enter "" in "plannedCost" Edit box
+ And I select "" from the region select box
+ And I select "" from the key pair select box
+ And I click on user pem file browse button and select pem file
+ And I click on save button
+ And I verify "" in the provider table
+ Examples:
+ |AWS service name |Access Key |Secret Key |S3 Bucket Name|Organization|Region |Key Pair |Planned cost|
+ |RL_AWS | AKIAIIK5APRNV54QAVQA |bz6Hl4wtjXi5Mg2EaZxLR1I/7y0bmYXEiYINDBSp | RLBilling | UAT_RL1 |US West (N. California)| bootstrapncal|10000|
+
+ Scenario Outline: As a super user I create VMImage
+ And I click on "Gallery Setup" link
+ And I click on "VMImage" link
+ And I click on "addnewitem" button
+ And I enter "" in "name" Edit box
+ And I select "" from the select box in VMImage page
+ And I select "" type
+ And I enter "" in "imageidentifire" Edit box
+ And I enter "" in "UserName" Edit box
+ And I click on save button
+ And I verify created "" in the Images table
+
+ Examples:
+ |VMImage Name|Organization|Operating System|Image ID |Admin User Name|
+ | RL_VM | UAT_RL1 | Ubuntu |ami-06116566|ubuntu |
+
+ Scenario Outline: As a super user I create Cloud Formation Template
+ And I click on "Templates" link
+ And I click on "newTemplate" button
+ And I enter "" in "templatename" Edit box
+ And I select "CloudFormation" from select box
+ And I select "" from the select box in create template page
+ And I browse "JavaStack.template" Template file
+ And I click on save button
+ And I verify "" is available in templates table
+
+ Examples:
+ |Template Name | Organization |
+ | RL_Cloud | UAT_RL1 |
+
+ Scenario Outline: As a super user I create a Cloud Formation blueprint
+ And I navigate to the "Workzone"
+ And I click on the "DESIGN" link
+ And I click on AWS provider
+ And I click on "New" link
+ And I select the "" from drop down
+ And I select type of blueprint "CloudFormation"
+ And I click on next button
+ And I click on the ""
+ And I click on next button
+ And I enter "" in "blueprintNameInput" Edit box
+ And I select "" in "bgListInput" select box
+ And I select "" in "projectListInput" select box
+ And I click on "Configure Stack Parameters" to expand it
+ And I select "" in "cftRegionInput" select box
+ And I select "" in "cftProviderInput" select box
+ And I enter "" in the "JavaStack" edit box
+ And I enter "" in the "KeyName" edit box
+ And I enter "" in the "Subnet" edit box
+ And I enter "" in the "SecurityGroup" edit box
+ And I enter "" in the "AMImageID" edit box
+ And I enter "" in the "InstanceType" edit box
+ And I click on "Configure Resource : Java" to expand it
+ And I enter "" in Username Input edit box
+ And I click on next button
+ And I click on OK button
+ And I click on launch blueprint on the pop-up menu
+ And I click on launch on select blueprint parameter pop-up menu
+ And I click on OK button
+ And I enter "" on popup window
+ And I click on the submit button
+ And I verify the following message "Your Created Blueprint is being Launched, kindly check Workzone to view your instance." on "Launching Blueprint" popup window
+ And I click on the "Close" button on confirmation popup
+
+ Examples:
+ |Organization|Blueprint Name|Business Grp|Project |Template |Provider |Region |Java Stack|Key Name |Subnet |Security Group|AMImage ID |Instance UserName|Instance Type|Unique Stack Name|
+ | UAT_RL1 | RL_Blueprint | Cat_UAT |Catalyst |RL_Cloud | RL_AWS |US West (N. California)|java-test | bootstrapncal| subnet-d7df258e| sg-eeff688b|ami-06116566 | RL_Catalyst |t2.micro | RL2995 |
+
+ Scenario Outline: As a super user I verify the launched blueprint in workzone
+ And I navigate to the "Workzone"
+ And I select the "" and click on assigned ""
+ And I click on the "Infrastructure" link
+ And I click on the "Blueprints" link
+ And I expand "Cloud Formation"
+ Then I verify "" present in "Blueprint" page
+ And I click on the "Infrastructure" link
+ And I click on the "CloudFormation" link
+ And I verify the "" stack name and status CREATE_IN_PROGRESS in CFT Stacks
+ And I click on Refresh button
+ And I verify the "" stack name and status CREATE_COMPLETE in CFT Stacks
+
+ Examples:
+ |Blueprint Name|environment|Project |environment|stackName|
+ | RL_Blueprint | QA957 |Catalyst | QA957 |RL2995 |
+
+
+
+
+
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/resources/Design/ConfigBlueprintForOSImageUsingProAWS.feature b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/resources/Design/ConfigBlueprintForOSImageUsingProAWS.feature
new file mode 100755
index 000000000..12c9544f0
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/resources/Design/ConfigBlueprintForOSImageUsingProAWS.feature
@@ -0,0 +1,34 @@
+@All
+Feature: As a super user I Configure Blueprint for OSImage using provider type AWS
+ Scenario Outline: As a super user I create a Cloud Formation blueprint
+ And I click on the "DESIGN" link
+ And I click on AWS provider
+ And I click on "New" link
+ And I select the "" from drop down
+ And I select type of blueprint "OSImage"
+ And I click on next button
+ And I click on the ""
+ And I click on next button
+ And I see Choose Operating System is disabled
+ And I see Choose Provider is disabled
+ And I see Choose Available Images is disabled
+ And I select "" in select box
+ And I select "" in "vpcId" select box
+ And I select "" in "subnetId" select box
+ And I select "" in "keypairId" select box
+ And I select "" in "instancesize" select box
+ And I select security group
+ And I select "" in "instanceCount" select box
+ And I click on the "Configure Organization Parameters" link
+ And I see Choose Organization is disabled
+ And I enter "" in "blueprintNameInput" Edit box
+ And I select "" in "bgListInput" select box
+ And I select "" in "projectListInput" select box
+ And I click on next button
+ And I click on OK button
+ Then I verify launch blueprint button is dispalyed
+
+ Examples:
+ |Organization|Blueprint Name|Business Grp|Project |Image |Provider |Region |Java Stack|Key Name |Subnet |Security Group|AMImage ID |Instance UserName|Instance Type|Unique Stack Name|
+ | UAT_RL1 | RL_Blueprint | Cat_UAT |Catalyst |RL_VM | RL_AWS |US West (N. California)|java-test | bootstrapncal| subnet-d7df258e| sg-eeff688b|ami-06116566 | RL_Catalyst |t2.micro | RL2995 |
+
diff --git a/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/resources/Design/ConfigBlueprintForSSTempUsingProAWS.feature b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/resources/Design/ConfigBlueprintForSSTempUsingProAWS.feature
new file mode 100755
index 000000000..819ec2981
--- /dev/null
+++ b/server/undefined58da62749a03cc310995d810/RLIndia-botsfactory-f9147731953d936b21e1c6bf4fd0d2a85ad55c18/Code/UI_BOTs/Gmail_UserCreation/src/test/resources/Design/ConfigBlueprintForSSTempUsingProAWS.feature
@@ -0,0 +1,349 @@
+@All
+Feature: As a super user I Configure Blueprint for Software Stack Template using provider type AWS
+ Scenario Outline: As a super user I create a organization
+ Given I Login to catalyst using "" access credentials
+ And I see the catalyst "workzone"
+ And I click on "SETTINGS" link
+ And I click on Organizations link in main page
+ And I click on "newOrg" button
+ And I enter "" in "orgname" Edit box
+ And I click on save button
+ And I verify the created "" in list
+
+ Examples:
+ | Login User | Organization |
+ | superadmin | UAT_RL1 |
+
+ Scenario Outline: As a super user I create a Business group
+ And I click on Business Groups Link
+ And I click on New BGroup button
+ And I enter the "" name in Business Group name
+ And I select "" from the select box
+ And I click on save button
+ And I verify the created "" in Business group table
+
+ Examples:
+ | Business Group | Organization |
+ | Cat_UAT | UAT_RL1 |
+
+ Scenario Outline: As a super user I create a Project
+ And I click on Projects link
+ And I click on "newProj" button
+ And I enter "" in "projectname" Edit box
+ And I enter "" in "description" Edit box
+ And I select "" from the select box
+ And I click on save button
+ And I verify the created "" in project table
+ Examples:
+ |Project name|Organization |Description |
+ | Catalyst |UAT_RL1 | Catalyst_UAT_RL|
+
+ Scenario Outline: As a super user I create a chef server
+ And I click on "Config Setup" link
+ And I click on "Chef Server" link
+ And I click on "newConfig" button
+ And I enter "" in "configname" Edit box
+ And I enter "" in "loginname" Edit box
+ And I enter "" in "url" Edit box
+ And I select "" from the select box
+ And I click on user pem file browse button
+ And I click on knife file browse button
+# And I upload pem file ""
+# And I upload knife file ""
+ And I click on save button
+ And I verify created "" in chef server table
+
+ Examples:
+ | Chef Server | User Name | URL | Organization |
+ | Cat_Chef_Server | mycatqa |https://api.opscode.com/organizations/cattest | UAT_RL1 |
+
+ Scenario Outline: As a super user I create environment
+ And I click on Environments link
+ And I click on "newENV" button
+ And I select "" from the select box
+ And I select "" from the select box
+ And I select existing chef "" from chef server
+ And I check the "" check box
+# And I check the "" check box
+ And I click on save button
+ And I verify created "" in environments table
+
+ Examples:
+ | Organization |environment |Organization_1|Project |Project1 |
+ | UAT_RL1 |QA957 |Phoenix |Catalyst|CatalystTest |
+
+ Scenario Outline: As a super user I create a Team
+ And I click on the "Users Setup" link
+ And I click on the "Teams" link
+ And I click on "newTeam" button
+ And I enter "" in "teamname" Edit box
+ And I enter "" in "description" Edit box
+ And I select "" from the select box
+ And I check the "superadmin" check box
+ And I check the "" check box
+# And I check the "" check box
+ And I click on save button
+ And I verify created "" in the teams table
+
+ Examples:
+ |Team Name |Description |Organization |Project |Project1|
+ |UatAutoTeam8 |UAT Automation Team| UAT_RL1 |Catalyst | CatalystTest|
+
+ Scenario Outline: As a super user I create a AWS Provider
+ And I click on "DevOps Setup" link
+ And I click on "Providers" link
+ And I click on "addnewitem" button
+ And I select provider type "AWS"
+ And I enter "" in "name" Edit box
+ And I click on "credentials-accessKeys" User Access Key
+ And I enter "" in "accessKey" Edit box
+ And I enter "" in "secretKey" Edit box
+ And I enter "" in "s3BucketName" Edit box
+ And I select "" from the select box in new provider page
+ And I enter "" in "plannedCost" Edit box
+ And I select "" from the region select box
+ And I select "" from the key pair select box
+ And I click on user pem file browse button and select pem file
+ And I click on save button
+ And I verify "" in the provider table
+ Examples:
+ |AWS service name |Access Key |Secret Key |S3 Bucket Name|Organization|Region |Key Pair |Planned cost|
+ |RL_AWS | AKIAIIK5APRNV54QAVQA |bz6Hl4wtjXi5Mg2EaZxLR1I/7y0bmYXEiYINDBSp | RLBilling | UAT_RL1 |US West (N. California)| bootstrapncal|10000|
+
+ Scenario Outline: As a super user I create another AWS Provider
+ And I click on "addnewitem" button
+ And I select provider type "AWS"
+ And I enter "" in "name" Edit box
+ And I click on "credentials-accessKeys" User Access Key
+ And I enter "" in "accessKey" Edit box
+ And I enter "" in "secretKey" Edit box
+ And I enter "" in "s3BucketName" Edit box
+ And I select "" from the select box in new provider page
+ And I enter "" in "plannedCost" Edit box
+ And I select "" from the region select box
+ And I select "" from the key pair select box
+ And I click on user pem file browse button and select pem file
+ And I click on save button
+ And I verify "" in the provider table
+ Examples:
+ |AWS service name |Access Key |Secret Key |S3 Bucket Name|Organization|Region |Key Pair |Planned cost|
+ |RL_AWS_Demo | AKIAIIK5APRNV54QAVQA |bz6Hl4wtjXi5Mg2EaZxLR1I/7y0bmYXEiYINDBSp | RLBilling | UAT_RL1 |US West (N. California)| bootstrapncal|20000 |
+
+ Scenario Outline: As a super user I create VMImage
+ And I click on "Gallery Setup" link
+ And I click on "VMImage" link
+ And I click on "addnewitem" button
+ And I enter "" in "name" Edit box
+ And I select "" from the select box in VMImage page
+ And I select "" type
+ And I enter "" in "imageidentifire" Edit box
+ And I enter "" in "UserName" Edit box
+ And I click on save button
+ And I verify created "" in the Images table
+
+ Examples:
+ |VMImage Name|Organization|Operating System|Image ID |Admin User Name|
+ | RL_VM | UAT_RL1 | Ubuntu |ami-06116566|ubuntu |
+
+ Scenario Outline: As a super user I create another VMImage
+ And I click on "addnewitem" button
+ And I enter "" in "name" Edit box
+ And I select "" from the select box in VMImage page
+ And I select "" type
+ And I enter "" in "imageidentifire" Edit box
+ And I enter "" in "UserName" Edit box
+ And I click on save button
+ And I verify created "" in the Images table
+
+ Examples:
+ |VMImage Name|Organization|Operating System|Image ID |Admin User Name|
+ | RL_VM_Demo | UAT_RL1 | Ubuntu |ami-06116566|ubuntu |
+
+ Scenario Outline: As a super user I create software stack template
+ And I click on "Templates" link
+ And I click on "newTemplate" button
+ And I enter "" in "templatename" Edit box
+ And I select "SoftwareStack" from select box
+ And I select "" from the select box in create template page
+ And I verify "chefFactory" is displayed
+ And I click on save button
+ And I verify "" is available in templates table
+
+ Examples:
+ |Template Name|Organization|
+ | UAT_Template | UAT_RL1 |
+
+ Scenario Outline: As a super user I create a blueprint and launch it
+ And I click on the "DESIGN" link
+ And I click on AWS provider
+ And I click on "New" link
+ And I select type of blueprint "SoftwareStack"
+ And I click on next button
+ And I click on the ""
+ And I click on next button
+ And I select "