?????????????
?????XiaoTobey ???????[ 2016/11/14 14:48:57 ] ??????????????? ???????
	??????????????Framework?????????????????????μ??Framework????????????????????????????????????????????????????ù???????Product?????????????????????????????
	???????????????
	????????????????????????????????????????????ControlFactory?????????????????????????????????????????????????????????????????????????????JS????????????????????????????????????ID??Xpath????????????????????????????????????????????????в?????IPageAccess??Control??????PageAccess??????????????????webdriver??JS???
	
	????1.1 ????????
	????????Business Logic Layer??
	????BUSIness Logic Layer???????????????????????????????????Page????λControl??????Control??
	????1.????Page????????????????????????Page????Popup????????Iwebdriver????????????????????
	????2.??λControl????????????JS?????????????????????δ??????????????ID??XPath????????л????
	????3.????Coutrol??????????Page???????????????????????????????????????????????????????????????????
	
	????2.1 BLL??????
	????????IPageAccess??
	????IPageAccess??????????????????????????С???????Coutrol????????????????巽???????????????IClickable??IMenu????????С?
	namespace IPageAccess
	{
	public interface IClickable : IControl
	{
	bool Click();
	}
	}
	???????PageAccess??
	????PageAccess????????????????????????????????????????????????????????????webdriver??JS??????????????????????????????????????????????????ID??Name???????Dictionary???????????Dictionnary?????????λ???????????????????
	namespace PageAccess.Portal
	{
	public class CPButton : CPBaseClickable
	{
	public CPButton(Dictionary<string?? string> info) : base(info) { }
	protected override IWebElement Element()
	{
	IWebElement obj = null;
	if (Id != "")
	{
	obj = WebDriverHelper.CurrentDriver.FindElement(By.Id(Id)?? 10);
	}
	else
	{
	if (Name != "")
	{
	obj = WebDriverHelper.CurrentDriver.FindElement(By.Name(Name)?? 10);
	}
	else
	{
	if (Selector != "")
	{
	obj = WebDriverHelper.CurrentDriver.FindElement(Selector?? 10);
	}
	else if (Xpath != "")
	{
	try
	{
	List<IWebElement> buttons = WebDriverHelper.CurrentDriver.FindElements(By.XPath(Xpath)?? 10);
	buttons.Remove(buttons.Find(x => x.GetAttribute("class").Contains("mce_copy")));
	if (buttons.Last().Enabled && buttons.Last().Displayed)
	obj = buttons.Last();
	else
	obj = buttons.First();
	}
	catch
	{
	obj = null;
	}
	}
	}
	}
	if (obj == null)
	{
	throw new Exception(string.Format("Button {0} can't be found."?? this.LabelRepository));
	}
	return obj;
	}
	public override bool Click()
	{
	}
	#endregion
	}
	}
	????4.1 PageAccess??Demo
	?????????????????JS??selenium2???????????????????????Tool??????AutoIT???????Щ????????????????????RemoteWMI?????????
??????
					
					???·???
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