예제 #1
0
 public void TestDeleteAccount()
 {
     try
     {
         string name = "Test API Account";
         General.Login(_xrmUri, _username, _password, this.GetType().Name);
         if (name == string.Empty)
         {
             Account.Navigate();
             Account.Delete();
         }
         else
         {
             if (Account.Search(name))
             {
                 Account.Delete();
             }
         }
     }
     catch (Exception ex)
     {
         General.LogError(ex.Message, this.GetType().Name);
     }
     finally
     {
         General.Close();
     }
 }
예제 #2
0
        public void TestCreateNewCase()
        {
            Random rnd = new Random();

            try
            {
                General.Login(_xrmUri, _username, _password, this.GetType().Name);
                Account.Navigate();
                Account.OpenFirst();
                Case.OpenRelatedCase();
                string caseName = Case.Create();
                if (Case.Search(caseName))
                {
                    Case.Delete();
                }
            }
            catch (Exception ex)
            {
                General.LogError(ex.Message, this.GetType().Name);
            }
            finally
            {
                General.Close();
            }
        }
        public void TestBPFLeadToOpportunity()
        {
            Random rnd = new Random();

            try
            {
                General.Login(_xrmUri, _username, _password, this.GetType().Name);

                Lead.Navigate();

                string leadName = Lead.CreateBPF();

                Lead.ClickQualify();

                Opportunity.Navigate();

                if (Opportunity.Search(leadName))
                {
                    Logs.LogHTML("Created Lead and converted to opportunity Successfully", Logs.HTMLSection.Details, Logs.TestStatus.Pass);
                    Opportunity.Delete();
                }
            }
            catch (Exception ex)
            {
                General.LogError(ex.Message, this.GetType().Name);
            }
            finally
            {
                General.Close();
            }
        }
예제 #4
0
 public void TestOpenActiveAccount()
 {
     try
     {
         General.Login(_xrmUri, _username, _password, this.GetType().Name);
         Account.Navigate();
         Account.OpenFirst();
     }
     catch (Exception ex)
     {
         General.LogError(ex.Message, this.GetType().Name);
     }
     finally
     {
         General.Close();
     }
 }
예제 #5
0
 public void TestUpdateLead()
 {
     try
     {
         General.Login(_xrmUri, _username, _password, this.GetType().Name);
         Lead.Navigate();
         Lead.Update();
     }
     catch (Exception ex)
     {
         General.LogError(ex.Message, this.GetType().Name);
     }
     finally
     {
         General.Close();
     }
 }
예제 #6
0
 public void TestCreateNewLead()
 {
     try
     {
         General.Login(_xrmUri, _username, _password, this.GetType().Name);
         Lead.Navigate();
         string displayName = Lead.Create();
         if (Lead.Search(displayName))
         {
             Lead.Delete();
         }
     }
     catch (Exception ex)
     {
         General.LogError(ex.Message, this.GetType().Name);
     }
     finally
     {
         General.Close();
     }
 }
예제 #7
0
 public void TestCreateNewAccount()
 {
     try
     {
         General.Login(_xrmUri, _username, _password, this.GetType().Name);
         Account.Navigate();
         string createdAccName = Account.Create();
         if (Account.Search(createdAccName))
         {
             Logs.LogHTML("Created Account Successfully", Logs.HTMLSection.Details, Logs.TestStatus.Pass);
             Account.Delete();
         }
     }
     catch (Exception ex)
     {
         General.LogError(ex.Message, this.GetType().Name);
     }
     finally
     {
         General.Close();
     }
 }
예제 #8
0
        public void TestUpdateContact()
        {
            try
            {
                //var perf = xrmBrowser.PerformanceCenter;

                //if (!perf.IsEnabled)
                //    perf.IsEnabled = true;

                General.Login(_xrmUri, _username, _password, this.GetType().Name);
                Contact.Navigate();
                Contact.Update();
            }
            catch (Exception ex)
            {
                General.LogError(ex.Message, this.GetType().Name);
            }
            finally
            {
                General.Close();
            }
        }