private void sb_gotoDetail(IWebElement elementDetail, webpage pageDetail, bool getDetail, bool download, int startPageIndex , By controlLoadDataBy) { elementDetail.Click(); SharedFunctions.sb_waitForReady(this.prp_webBrowser); int i; for (i = 0; i <= pageDetail.prp_controls.Count - 1; i++) { if (pageDetail.prp_controls[i] is webpageCombo) { ((webpageCombo)pageDetail.prp_controls[i]).sb_setListItems(); ((webpageCombo)pageDetail.prp_controls[i]).sb_setValue(); } else if (pageDetail.prp_controls[i] is webpageGrid) { ((webpageGrid)pageDetail.prp_controls[i]).prp_controlLoadDataBy = controlLoadDataBy; ((webpageGrid)pageDetail.prp_controls[i]).sb_setDataSource(getDetail, download, startPageIndex); } else if (pageDetail.prp_controls[i] is webpageControl) { pageDetail.prp_controls[i].sb_setValue(); } } if (pageDetail.prp_controlBack != null) { pageDetail.prp_controlBack.fnc_getHtmlElement().Click(); SharedFunctions.sb_waitForReady(this.prp_webBrowser); } }
//public webpageCombo(ChromeDriver webbrowser, string name, string alias, string controlId // , enumControlType controlType) : this(webbrowser, name, alias, controlId, controlType) //{ //} //public webpageCombo(ChromeDriver webbrowser, string name, string alias, string controlId // , enumControlType controlType) // : this(webbrowser, name, alias, controlId, controlType, null) //{ //} /// <summary> /// /// </summary> /// <param name="webbrowser"></param> /// <param name="name"></param> /// <param name="alias"></param> /// <param name="controlId">controlId or xpath should be specified</param> /// <param name="xpath">controlId or xpath should be specified</param> /// <param name="controlAtt">text or value</param> /// <param name="controlType"></param> /// <param name="tableSource"></param> public webpageCombo(ChromeDriver webbrowser, webpage page, string name, string alias, By controlBy , string controlAtt, enumControlType controlType , Model.htmlTable tableSource) : base(webbrowser, page, name, alias, controlBy, controlAtt, controlType) { this.prp_tableSource = tableSource; }
public object fnc_getValue(webpage wbpg) { wbpg.prp_controls.IndexOf(this.prp_pageControl); object value = Convert.ChangeType(this.prp_pageControl.prp_value, this.DataType); return(value); }
//public webpageControl(ChromeDriver webbrowser, string name, string alias, string controlId // , enumControlType controlType) : this(webbrowser, name, alias, controlId, controlType) //{ //} /// <summary> /// /// </summary> /// <param name="webbrowser"></param> /// <param name="name"></param> /// <param name="alias"></param> /// <param name="controlId">controlId or xpath should be specified</param> /// <param name="xpath">controlId or xpath should be specified</param> /// <param name="controlAtt"></param> /// <param name="controlType"></param> public webpageControl(ChromeDriver webbrowser, webpage page, string name, string alias, By controlBy, string controlAtt, enumControlType controlType) { if (controlBy == null) { throw new Exception("controlBy is not specified"); } this.prp_controlBy = controlBy; this.prp_controlType = controlType; this.prp_name = name; this.prp_alias = alias; this.prp_controlAtt = controlAtt; this.prp_webBrowser = webbrowser; this.prp_webpage = page; }
public webpageGrid(ChromeDriver webbrowser, webpage page, string name, string alias, By controlBy , enumControlType controlType, Model.htmlTable tableSource) : this(webbrowser, page, name, alias, controlBy, "", controlType, tableSource) { this.prp_tableSource = tableSource; }
public webpageGrid(ChromeDriver webbrowser, webpage page, string name, string alias, By controlBy , enumControlType controlType) : this(webbrowser, page, name, alias, controlBy, "", controlType, null) { }