???????????????????Selenium??VSTT
???????????? ???????[ 2012/9/10 16:31:03 ] ????????
?????SCRUM???????????????ASP.NET?????????????Spring???????????????????????????????б??????ε????????????£?????????Spring???????Щ???????????
????????????????????????????SCRUM???????????????????????????????????е????·?????????VSTT??Selenium?????????????????????顣
????Selenium???
????Selenium????????????????????????????????????????????????Selenium IDE(???Firefox????????????????????????)???????????Selenium Remote Control??????????????????????????л???Selenium???????????????????????????в??????μ????????????????????Linux?????konqueror??gnome??????????????????????Selenium???????????????????????μ??????????????????Selenium???????Selenium Grid???????????????????????л???????????
????????Selenium??????????÷????????????????????????????????????????????????????ɡ?
????Selenium??VSTT??????
????Selenium???????????????????????NUnit??????C#??????Щ????????????????VSTT????????????Щ????????????????[TestFixture]???[TestClass]??[Test]???[TestMethod]??????????????Selenium-RC???????????VSTT???浱???????????????????????
????Selenium???????
?????????????????????????????????????????????????????????У????????????????????????????????????Selenium????????????????????????????????????????????????????£?????????????????д????????????δ?????????????????????????????
	
	????[TestMethod]
????public void TheTestTest()
????{
????selenium.Open("/");
????selenium.Click("link=???");
	
	????selenium.WaitForPageToLoad("30000");
	
	????selenium.Type("tbUserName"?? "donjuan");
????selenium.Type("tbPassword"?? "");
????selenium.Click("btnLogin");
	
	????selenium.WaitForPageToLoad("30000");
????selenium.Click("link=donjuan");
????selenium.WaitForPageToLoad("30000");
	
	????selenium.Click("link=????");
	
	????selenium.WaitForPageToLoad("30000");
	
	????}
	
	?????????????沼???????Html?????Id???????????????????????????????????ж????????????μ????(Bug)???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ???ж????????
	
	????1. ???????????????????????????????????????????????????????????????????б???????????????????檔
	
	????2. ??????????????????????????????LogOn()???????????????????????(????????????????)???????????????????????????????????? ?????????e????????????????????????????LogOn(string username?? string password)?????????
	
	??????????????????????????????????????????????????????????????????????????????????????????????
	
	??????????????????????????????
????using System;
	
	????//
	
	????// ??????????????????????????????????????з????????
????//
????public class CaseErrorException : Exception
	
	????{
	
	????public CaseErrorException(string message)
	
	????: base()
	
	????{
	
	????}
????public CaseErrorException(Exception inner)
	
	????: this(null?? inner)
	
	????{
	
	????}
????public CaseErrorException(string message?? Exception inner)
????: base(message == null ? "????????????????????????InnerException????!" :
	
	????string.Format("??????????????????????????????????{0};?????InnerException????!"?? message)??
	
	????inner)
	
	????{
????}
????}
????public class UserOperationsHelper
????{
????public void LogOn(string username?? string password)
????{
????// string.Empty????????????????
????if (username == null)
	
	????throw new CaseErrorException(new ArgumentNullException("username"));
????if (password == null)
????throw new CaseErrorException(new ArgumentNullException("password"));
????selenium.Open("/");
????selenium.Click("link=???");
????selenium.WaitForPageToLoad(Consts.TimeToWaitForPageLoad);
????selenium.Type("tbUserName"?? username);
	
	????selenium.Type("tbPassword"?? password);
	
	????selenium.Click("btnLogin");
????selenium.WaitForPageToLoad(Consts.TimeToWaitForPageLoad);
	
	????}
????}
????public static class Consts
	
	????{
	
	????// ????????????????????????????????????????????
????// ?????У?????????????????????????У??????????????
??????
					
					???·???
App??С????H5?????????????????Щ??
2024/9/11 15:34:34?????????????????????????
2024/9/10 11:13:49P-One ???????????????????????????????????????
2024/9/10 10:14:12???????????????????????????
2024/9/9 18:04:26??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44
					
			
								
								
								
								
								
								
								
								
								
								
				
sales@spasvo.com