本文整理汇总了C#中PegasusTests.PageHelper.ClientsHelper类的典型用法代码示例。如果您正苦于以下问题:C# ClientsHelper类的具体用法?C# ClientsHelper怎么用?C# ClientsHelper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ClientsHelper类属于PegasusTests.PageHelper命名空间,在下文中一共展示了ClientsHelper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: sendEmailAdmin
//[TestMethod]
public void sendEmailAdmin()
{
string[] username = null;
string[] password = null;
XMLParse oXMLData = new XMLParse();
oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
username = oXMLData.getData("settings/Credentials", "username");
password = oXMLData.getData("settings/Credentials", "password");
//Initializing the objects
LoginHelper loginHelper = new LoginHelper(GetWebDriver());
ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
SendEmailAdminHelper sendEmailAdminHelper = new SendEmailAdminHelper(GetWebDriver());
// Variable
String name = "Testing Subject" + RandomNumber(1,99);
String email = "Test" + RandomNumber(1,999)+ "@gmail.com.com";
//Login with valid username and password
Login(username[0], password[0]);
Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
//Verify Page title
VerifyTitle("Dashboard");
Console.WriteLine("Redirected at Dashboard screen.");
//Click On Admin
sendEmailAdminHelper.RedirectToAdmin();
//################################# SEND E-MAIL #############################################
GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/mails");
VerifyTitle("Mails");
// Click On send Email
sendEmailAdminHelper.ClickElement("ClickOnSendEmail");
//Verify title
VerifyTitle("Compose");
//Enter to
sendEmailAdminHelper.TypeText("To", "[email protected]");
//Enter Name
sendEmailAdminHelper.TypeText("EnterSubjuct", name);
//Click on importance
sendEmailAdminHelper.ClickElement("importance");
//Select Department
sendEmailAdminHelper.TypeText("EnterMsgtxt", "This is testing description notes");
//cLICK on Save
sendEmailAdminHelper.ClickElement("ClickOnSend");
//Wait for text
sendEmailAdminHelper.WaitForText("E-Mail Sent Successfully.", 30);
}
示例2: createUserError1
public void createUserError1()
{
string[] username = null;
string[] password = null;
string[] log = null;
var oXMLData = new XMLParse();
oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
username = oXMLData.getData("settings/Credentials", "username");
password = oXMLData.getData("settings/Credentials", "password");
log = oXMLData.getData("settings/URL", "logout");
//Initializing the objects
var loginHelper = new LoginHelper(GetWebDriver());
var clientHelper = new ClientsHelper(GetWebDriver());
var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver());
//Login with valid username and password
Login(username[0], password[0]);
Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
//Verify Page title
VerifyTitle("Dashboard");
//Go to Create user page
GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/users/create");
//Verify title
VerifyTitle("Create User");
//Select User type
partnerAgentHelperNewSkin.SelectByText("Usertype", "Employee");
//Click on Create new
partnerAgentHelperNewSkin.ClickElement("UserCreate");
//Enter first name
partnerAgentHelperNewSkin.TypeText("UserFirstName", "Aslam");
//Enter last Name
partnerAgentHelperNewSkin.TypeText("UserLastName", "Khan");
//Enter existing user name
partnerAgentHelperNewSkin.TypeText("Userusername", username[0]);
//Enter primary email
partnerAgentHelperNewSkin.TypeText("UserEmail", "[email protected]");
//Click on 'Save' button
partnerAgentHelperNewSkin.ClickElement("UserSave");
//Wait for text
partnerAgentHelperNewSkin.WaitForText("This username already taken", 50);
//Verify error not displayed
partnerAgentHelperNewSkin.VerifyTextNotPresent("Internal server error page");
//Logout from the application
GetWebDriver().Navigate().GoToUrl(log[0]);
}
示例3: createPDFPackage
public void createPDFPackage()
{
string[] username = null;
string[] password = null;
var oXMLData = new XMLParse();
oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
username = oXMLData.getData("settings/Credentials", "username");
password = oXMLData.getData("settings/Credentials", "password");
//Initializing the objects
var loginHelper = new LoginHelper(GetWebDriver());
var clientHelper = new ClientsHelper(GetWebDriver());
var pDFTemplateAdminHelper = new PDFTemplateAdminHelper(GetWebDriver());
//Variable random
var name = "TESTCLIENT" + RandomNumber(1,999);
//Login with valid username and password
Login(username[0], password[0]);
Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
//Verify Page title
VerifyTitle("Dashboard");
Console.WriteLine("Redirected at Dashboard screen.");
//Redirect To Admin
GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/admin");
pDFTemplateAdminHelper.WaitForWorkAround(4000);
//ClickOnPdfTab
pDFTemplateAdminHelper.ClickElement("ClickOnPdfTab");
//Redirect To
GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/pdf_templates");
pDFTemplateAdminHelper.WaitForWorkAround(2000);
//cLICK ON pdf
pDFTemplateAdminHelper.ClickElement("ClickCreatePackage");
pDFTemplateAdminHelper.WaitForWorkAround(2000);
//Enter pakage name
pDFTemplateAdminHelper.TypeText("PackageName","Test Pakage");
//Select Module
pDFTemplateAdminHelper.Select("SelectModule", "20");
pDFTemplateAdminHelper.WaitForWorkAround(3000);
//Select
pDFTemplateAdminHelper.Select("SelectPDFTemplate", "8760");
pDFTemplateAdminHelper.WaitForWorkAround(3000);
//SelectCategoryPackage
pDFTemplateAdminHelper.Select("SelectCategoryPackage", "336");
//Save PDF Package
pDFTemplateAdminHelper.ClickElement("SavePDFPakage");
pDFTemplateAdminHelper.WaitForWorkAround(3000);
}
示例4: createLeadErrrorMessage
public void createLeadErrrorMessage()
{
string[] username = null;
string[] password = null;
var oXMLData = new XMLParse();
oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
username = oXMLData.getData("settings/Credentials", "username");
password = oXMLData.getData("settings/Credentials", "password");
//Initializing the objects
var loginHelper = new LoginHelper(GetWebDriver());
var clientHelper = new ClientsHelper(GetWebDriver());
var leadNewSkinHelper = new LeadNewSkinHelper(GetWebDriver());
//Login with valid username and password
Login(username[0], password[0]);
Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
//Verify Page title
VerifyTitle("Dashboard");
Console.WriteLine("Redirected at Dashboard screen.");
GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/leads/create");
//Verify title
VerifyTitle("Create a Lead");
//Verify no error message displayed
loginHelper.VerifyTextNotAvailable("A Lead already exists with the same Company name/Contact Name/Phone Number. Would you like to Merge or Duplicate the Lead?");
}
示例5: createProcessor
public void createProcessor()
{
// string[] username = null;
// string[] password = null;
var oXMLData = new XMLParse();
oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
// username = oXMLData.getData("settings/Credentials", "username");
// password = oXMLData.getData("settings/Credentials", "password");
//Initializing the objects
var loginHelper = new LoginHelper(GetWebDriver());
var clientHelper = new ClientsHelper(GetWebDriver());
var createProcessorHelper = new CreateProcessorHelper(GetWebDriver());
//Variable
var name = "Test" + GetRandomNumber();
var Test = "New" + GetRandomNumber();
//Login with valid credential Username
createProcessorHelper.TypeText("EnterUsername", "selcorp");
//Login with valid credential password
createProcessorHelper.TypeText("EnterPassword", "seWelcome2");
//Click On Login Button
createProcessorHelper.ClickElement("ClickOnLoginButtojn");
//Verify Page title
VerifyTitle("Dashboard");
Console.WriteLine("Redirected at Dashboard screen.");
//Click on Residual Income tab
createProcessorHelper.ClickElement("ClickMasterTab");
//Click to Import
createProcessorHelper.redirectToPage();
//Click On Create
createProcessorHelper.ClickElement("ClickOnCreate");
//Click On Save Btn
createProcessorHelper.ClickElement("ClickOnSaveBtn");
createProcessorHelper.WaitForWorkAround(3000);
//Enter Processor name
createProcessorHelper.TypeText("ProcessorName", name);
//Enter ProcessorCode
createProcessorHelper.TypeText("ProcessorCode", Test);
//Click On Save Btn
createProcessorHelper.ClickElement("ClickOnSaveBtn");
createProcessorHelper.WaitForWorkAround(3000);
//Verify text present
createProcessorHelper.VerifyPageText("The processor is successfully created!!");
createProcessorHelper.WaitForWorkAround(3000);
}
示例6: merchantTabCorp
public void merchantTabCorp()
{
string[] username = null;
string[] password = null;
var oXMLData = new XMLParse();
oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
username = oXMLData.getData("settings/Credentials", "username2");
password = oXMLData.getData("settings/Credentials", "password2");
//Initializing the objects
var loginHelper = new LoginHelper(GetWebDriver());
var clientHelper = new ClientsHelper(GetWebDriver());
var clientHelperNewSkin = new ClientHelperNewSkin(GetWebDriver());
//VARIABLE
var name = "TestEmployee" + GetRandomNumber();
//Login with valid username and password
Login(username[0], password[0]);
Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
//Verify Page title
VerifyTitle("Dashboard");
Console.WriteLine("Redirected at Dashboard screen.");
//Click on Agent in Topmenu
clientHelperNewSkin.ClickElement("ClickOnMerchnatTab");
//verify
clientHelperNewSkin.VerifyPageText("Merchants");
clientHelperNewSkin.WaitForWorkAround(3000);
}
示例7: pDFImportError
public void pDFImportError()
{
string[] username = null;
string[] password = null;
var oXMLData = new XMLParse();
oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
username = oXMLData.getData("settings/Credentials", "username2");
password = oXMLData.getData("settings/Credentials", "password2");
//Initializing the objects
var loginHelper = new LoginHelper(GetWebDriver());
var clientHelper = new ClientsHelper(GetWebDriver());
var pDFTemplateAdminHelper = new PDFTemplateAdminHelper(GetWebDriver());
//Variable random
var name = "TESTCLIENT" + RandomNumber(1,999);
//Login with valid username and password
Login(username[0], password[0]);
Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
//Verify Page title
VerifyTitle("Dashboard");
Console.WriteLine("Redirected at Dashboard screen.");
//ClickOnPdfTab
pDFTemplateAdminHelper.ClickElement("ClickOnPdfTab");
//Redirect To
GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/pdf_templates");
pDFTemplateAdminHelper.WaitForWorkAround(2000);
//Redirect To Import
GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/pdf_templates/import");
//ChooseModule
pDFTemplateAdminHelper.Select("ChooseModule", "20");
var path = GetPathToFile() + "2.pdf";
//bROWSER
pDFTemplateAdminHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", path);
//Click import
pDFTemplateAdminHelper.ClickElement("ClickOnImport");
pDFTemplateAdminHelper.WaitForWorkAround(10000);
//Select tab
pDFTemplateAdminHelper.SelectByText("Tab", "Business Details");
pDFTemplateAdminHelper.WaitForWorkAround(5000);
//Verify fields availble under section
pDFTemplateAdminHelper.SelectByText("Section", "Merchant Account Data");
pDFTemplateAdminHelper.WaitForWorkAround(5000);
//Verify fields under fields
pDFTemplateAdminHelper.SelectByText("Fields", "Merchant Type");
}
示例8: createAndDeletePDFCategories
public void createAndDeletePDFCategories()
{
string[] username = null;
string[] password = null;
XMLParse oXMLData = new XMLParse();
oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
username = oXMLData.getData("settings/Credentials", "username2");
password = oXMLData.getData("settings/Credentials", "password2");
//Initializing the objects
LoginHelper loginHelper = new LoginHelper(GetWebDriver());
ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
LoginAsCorpHelper loginAsCorpHelper = new LoginAsCorpHelper(GetWebDriver());
CreatePDFCategoriesHelper createPDFCategoriesHelper = new CreatePDFCategoriesHelper(GetWebDriver());
//Variable random
String name = "Test" + RandomNumber(1, 99);
//Login with valid username and password
Login(username[0], password[0]);
Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
//Verify Page title
VerifyTitle("Dashboard");
Console.WriteLine("Redirected at Dashboard screen.");
//Verify Page title
VerifyTitle("Dashboard");
Console.WriteLine("Redirected at Dashboard screen.");
//Redirect To
GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/pdf_templates/categories");
createPDFCategoriesHelper.WaitForWorkAround(6000);
//Click on Click create button
createPDFCategoriesHelper.ClickElement("ClickOnCreateBtn");
createPDFCategoriesHelper.WaitForWorkAround(6000);
//Enter Name
createPDFCategoriesHelper.TypeText("EnterName", name);
//Click on Save Button
createPDFCategoriesHelper.ClickElement("ClickOnSaveBtn");
createPDFCategoriesHelper.WaitForWorkAround(6000);
//Verify text present
createPDFCategoriesHelper.VerifyPageText("Category Created Successfully");
//Clcik on Delete
createPDFCategoriesHelper.SearchAndClick(name);
createPDFCategoriesHelper.AcceptAlert();
createPDFCategoriesHelper.ClickDisplayed("//a[@title='Save']");
createPDFCategoriesHelper.WaitForWorkAround(4000);
// GetWebDriver().Navigate().Refresh();
createPDFCategoriesHelper.VerifyPageText("Category Replaced Successfully.");
}
示例9: createGroups
public void createGroups()
{
string[] username = null;
string[] password = null;
var oXMLData = new XMLParse();
oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
username = oXMLData.getData("settings/Credentials", "username");
password = oXMLData.getData("settings/Credentials", "password");
//Initializing the objects
var loginHelper = new LoginHelper(GetWebDriver());
var clientHelper = new ClientsHelper(GetWebDriver());
var createOfficeGrpAdminHelper = new CreateOfficeGrpAdminHelper(GetWebDriver());
// Variable
var name = "Test" + RandomNumber(1, 99);
var email = "Test" + RandomNumber(1, 999) + "@gmail.com.com";
//Login with valid username and password
Login(username[0], password[0]);
Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
//Verify Page title
VerifyTitle("Dashboard");
Console.WriteLine("Redirected at Dashboard screen.");
//Click On Admin
createOfficeGrpAdminHelper.RedirectToAdmin();
//################## Redirect To Url
//Redirect To URL
createOfficeGrpAdminHelper.RedirectToPage();
//Verify title
VerifyTitle("Groups");
//################################# Create Master Category #############################################
// Click On Create
createOfficeGrpAdminHelper.ClickElement("ClickOnCreate");
//Verify title
VerifyTitle("Create a Group");
//Enter Group Name
createOfficeGrpAdminHelper.TypeText("GrpName", name);
//Enter Description
createOfficeGrpAdminHelper.TypeText("Description", "THIS IS TEST DESCRIPTION");
//cLICK on Save
createOfficeGrpAdminHelper.ClickElement("ClickOnSave");
//Wait for text
createOfficeGrpAdminHelper.WaitForText("Group has been saved.", 30);
}
示例10: pDFTemplatesPerminsions
public void pDFTemplatesPerminsions()
{
string[] username = null;
string[] password = null;
XMLParse oXMLData = new XMLParse();
oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
username = oXMLData.getData("settings/Credentials", "username");
password = oXMLData.getData("settings/Credentials", "password");
//Initializing the objects
var loginHelper = new LoginHelper(GetWebDriver());
var clientHelper = new ClientsHelper(GetWebDriver());
var clientBugsHelper = new ClientBugsHelper(GetWebDriver());
// Variable
var name = "Test" + RandomNumber(1,99);
//Login with valid username and password
Login(username[0], password[0]);
Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
//Verify Page title
VerifyTitle("Dashboard");
Console.WriteLine("Redirected at Dashboard screen.");
//####################### MOVE HOVER TO THE WELCOME
//Click on Move over
// clientBugsHelper.ClickElement("MouserHoverWelcome");
//Click On Admin
GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/admin");
//################################# PDF TEMPLATE TAB #############################################
//Click on Terminal And Equipment Tab
clientBugsHelper.ClickElement("ClickOnPDFTab");
//Redirect
GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/pdf_templates");
//Click on PDF
clientBugsHelper.ClickElement("ClickPDF");
//Click On Permisions
clientBugsHelper.ClickElement("ClickOnPermisions");
clientBugsHelper.WaitForWorkAround(3000);
//Click On None Of These
clientBugsHelper.ClickElement("ClickOnNoneOfThese");
//Click on Updtae
clientBugsHelper.ClickElement("ClickOnUpdate");
clientBugsHelper.WaitForWorkAround(2000);
//Verify Text
clientBugsHelper.VerifyPageText("Pdf Permissions Updated Successfully.");
}
示例11: createLanguage
public void createLanguage()
{
string[] username = null;
string[] password = null;
var oXMLData = new XMLParse();
oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
username = oXMLData.getData("settings/Credentials", "username");
password = oXMLData.getData("settings/Credentials", "password");
//Initializing the objects
var loginHelper = new LoginHelper(GetWebDriver());
var clientHelper = new ClientsHelper(GetWebDriver());
var createLanguageHelper = new CreateLanguageHelper(GetWebDriver());
//Variable
var mail = "Test" + RandomNumber(1, 99) + "@yopmail.com";
var numb = "12345678" + RandomNumber(10, 99);
//Login with valid username and password
Login(username[0], password[0]);
Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
//Verify Page title
VerifyTitle("Dashboard");
Console.WriteLine("Redirected at Dashboard screen.");
//Redirect To Language
createLanguageHelper.redirectToPage();
//Verify title
VerifyTitle("Languages");
//Click On Create Btn
createLanguageHelper.ClickElement("ClickOnCreateBtn");
//Enter Language Name
var lang = "AA_Lang" + RandomNumber(99,999);
createLanguageHelper.WaitForWorkAround(5000);
createLanguageHelper.TypeText("EnterName", lang);
//Clcik on Master Data
createLanguageHelper.ClickElement("ClickSave");
//Clcik on Edit language
createLanguageHelper.ClickElement("ClickOnEditLanguage");
//Enter Language Name
var Elang = "AAA" + RandomNumber(1,99);
createLanguageHelper.TypeText("EnterLanguage", Elang);
//ClickOn Edit Save Button
createLanguageHelper.ClickElement("ClickOnSaveBtn");
//Click On Del Lang
createLanguageHelper.ClickElement("ClickOnDelLang");
}
示例12: importClientsFromCSV
public void importClientsFromCSV()
{
string[] username = null;
string[] password = null;
var oXMLData = new XMLParse();
oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
username = oXMLData.getData("settings/Credentials", "username");
password = oXMLData.getData("settings/Credentials", "password");
//Initializing the objects
var loginHelper = new LoginHelper(GetWebDriver());
var clientHelper = new ClientsHelper(GetWebDriver());
var clientBugsHelper = new ClientBugsHelper(GetWebDriver());
//Variable
var FirstName = "Test" + RandomNumber(1, 99);
var LastName = "Tester" + RandomNumber(1, 99);
var Number = "12345678" + RandomNumber(10, 99);
//Login with valid username and password
Login(username[0], password[0]);
Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
//Verify Page title
VerifyTitle("Dashboard");
Console.WriteLine("Redirected at Dashboard screen.");
//Click on Clients in Topmenu
clientBugsHelper.ClickElement("ClientTab");
clientBugsHelper.WaitForElementPresent("ClickOnImport", 20);
//Click On Import
clientBugsHelper.ClickElement("ClickOnImport");
clientBugsHelper.WaitForWorkAround(2000);
//Upload
var Path = GetPathToFile() + "clientsamples(2).csv";
clientBugsHelper.uploadCSVClient("SelectFile", Path);
clientBugsHelper.WaitForWorkAround(3000);
//Click On Import
clientBugsHelper.ClickElement("ClickOnImportClint");
clientBugsHelper.WaitForWorkAround(3000);
//Select Client Import
// clientBugsHelper.Select("SelectClientImport","47");
clientBugsHelper.WaitForWorkAround(3000);
//Residual Import Sel
//clientBugsHelper.Select("ResidualImportSel", "");
//ClickImprtProcess
clientBugsHelper.ClickElement("ClickImprtProcess");
clientBugsHelper.WaitForWorkAround(10000);
}
示例13: verifyAddAnotherVersionDisplay
public void verifyAddAnotherVersionDisplay()
{
string[] username = null;
string[] password = null;
XMLParse oXMLData = new XMLParse();
oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
username = oXMLData.getData("settings/Credentials", "username");
password = oXMLData.getData("settings/Credentials", "password");
//Initializing the objects
var loginHelper = new LoginHelper(GetWebDriver());
var clientHelper = new ClientsHelper(GetWebDriver());
var equiomentHelperAdmin = new EquiomentHelperAdmin(GetWebDriver());
//Variable
String name = "Test" + RandomNumber(1,99);
String Id = "12345" + RandomNumber(1, 99);
//Login with valid username and password
Login(username[0], password[0]);
Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
//Verify Page title
VerifyTitle("Dashboard");
Console.WriteLine("Redirected at Dashboard screen.");
//####################### MOVE HOVER TO THE WELCOME
//Click on Move over
equiomentHelperAdmin.ClickElement("MoveHover");
//Click On Admin
GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/admin");
//################################# Terminal And Equipment Tab #############################################
//Click on Terminal And Equipment Tab
equiomentHelperAdmin.ClickElement("ClickOnEquipmentTab");
//################## Redirect To Url
//Redirect To URL
GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/equipment");
//################################# Create Equipments #############################################
// Click On Create
equiomentHelperAdmin.ClickElement("ClickOnCreate");
equiomentHelperAdmin.WaitForWorkAround(3000);
//Click on Add Another
equiomentHelperAdmin.ClickElement("ClickAddAnother");
//ClickAddAnother
equiomentHelperAdmin.ClickElement("ClickAddAnother");
equiomentHelperAdmin.WaitForWorkAround(3000);
}
示例14: createOfficeTeams
public void createOfficeTeams()
{
string[] username = null;
string[] password = null;
var oXMLData = new XMLParse();
oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
username = oXMLData.getData("settings/Credentials", "username");
password = oXMLData.getData("settings/Credentials", "password");
//Initializing the objects
var loginHelper = new LoginHelper(GetWebDriver());
var clientHelper = new ClientsHelper(GetWebDriver());
var createOfficeTeamAdmin = new CreateOfficeTeamAdmin(GetWebDriver());
// Variable
var name = "Testing" + RandomNumber(1, 99);
var email = "Test" + RandomNumber(1, 999) + "@gmail.com.com";
//Login with valid username and password
Login(username[0], password[0]);
Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
//Verify Page title
VerifyTitle("Dashboard");
Console.WriteLine("Redirected at Dashboard screen.");
//Click On Admin
createOfficeTeamAdmin.RedirectToAdmin();
//Redirect To URL
createOfficeTeamAdmin.RedirectToPage();
//Verify Title
VerifyTitle("Teams");
//################################# Create Master Category #############################################
// Click On Create
createOfficeTeamAdmin.ClickElement("ClickOnCreate");
//Wait
createOfficeTeamAdmin.WaitForWorkAround(3000);
//Enter Name
createOfficeTeamAdmin.TypeText("TeamName", name);
//Select Department
createOfficeTeamAdmin.Selectbytext("SelectDepartment", "IT");
//cLICK on Save
createOfficeTeamAdmin.ClickElement("ClickOnSave");
//Wait for text
createOfficeTeamAdmin.WaitForText("Team has been saved.", 30);
}
示例15: checkProcessor
public void checkProcessor()
{
string[] username = null;
string[] password = null;
XMLParse oXMLData = new XMLParse();
oXMLData.LoadXML("../../Config/ApplicationSettings.xml");
username = oXMLData.getData("settings/Credentials", "username");
password = oXMLData.getData("settings/Credentials", "password");
//Initializing the objects
LoginHelper loginHelper = new LoginHelper(GetWebDriver());
ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
AddDocumentAdminHelper addDocumentAdminHelper = new AddDocumentAdminHelper(GetWebDriver());
// Variable
var Proname = "Product" + RandomNumber(100, 999);
//Login with valid username and password
Login(username[0], password[0]);
Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]);
//Verify Page title
VerifyTitle("Dashboard");
Console.WriteLine("Redirected at Dashboard screen.");
//Click On Admin
addDocumentAdminHelper.RedirectToAdmin();
//Redirect to the master Processors page
GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/processor_types");
//verify title
VerifyTitle("Master Processors");
//Get all processor count
int processcount = addDocumentAdminHelper.GetProcessorCount("ProcessTable");
//Get all processor
string[] processor = addDocumentAdminHelper.GetAllProcessor("ProcessTable");
//Redirect to the Create client page
GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/clients/create");
//Verify title
VerifyTitle("Create a Client");
//Click on Bussiness details
addDocumentAdminHelper.ClickElement("Bussiness");
//Verify Count
addDocumentAdminHelper.VerifyProcessCount("ProcessDropdown", processcount);
//Verify all processor
addDocumentAdminHelper.VerifyAllProcessor("ProcessDropdown", processor);
}