Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Experitest
- {
- using System;
- using System.Management.Instrumentation;
- using System.Text;
- using System.Collections.Generic;
- using System.Linq;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using experitestClient;
- [TestClass]
- public class LoginAll
- {
- //fields
- #region
- private string host = "localhost";
- private int port = 8889;
- private string projectBaseDirectory = "D:\\Projects\\Project\\ProjectTests\\ProjectSvnRepository\\ProjectSEETESTStudio";
- protected Client client = null;
- #endregion
- //properties
- #region
- public string LoginZone
- {
- get {return "Login_Zone";}
- }
- public string ServicesLoginZone
- {
- get { return "ServicesLogin_Zone"; }
- }
- #endregion
- //methods
- #region
- [TestInitialize()]
- public void SetupTest()
- {
- client = new Client(host, port);
- client.SetProjectBaseDirectory( projectBaseDirectory);
- client.SetReporter("xml", "reports", "LoginAll");
- }
- [TestMethod]
- public void TestLoginAll()
- {
- client.SetDevice("wp:Windows Phone 8S by HTC");
- client.Sleep(1000);
- client.VerifyElementFound(LoginZone, "Wellcome_label", 0);
- client.VerifyElementFound(LoginZone, "Login_link", 0);
- client.Click(LoginZone, "Login_link", 0, 1);
- client.Sleep(1000);
- if (client.WaitForElement(ServicesLoginZone, "form_login", 0, 30000) == false)
- {
- throw new InstanceNotFoundException("Not loaded ServicesLogin Zone");
- }
- client.VerifyElementFound(ServicesLoginZone, "Services label", 0);
- client.ElementSendText(ServicesLoginZone, "Number_Input", 0, "");
- client.ElementSendText(ServicesLoginZone, "Number_Input", 0, "3211610");
- client.ElementSendText("NATIVE", "xpath=//*[@name='form_pin']", 0, "0593");
- client.Click(ServicesLoginZone, "LoginViaPIN_Btn", 0, 1);
- }
- [TestCleanup()]
- public void TearDown()
- {
- client.GenerateReport();
- }
- #endregion
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement