protected void WaitForProgressBarInElement(Unknown cell)//todo { int i = 0; while (cell.FindSingle <Ranorex.ProgressBar>("./progressbar[@classname='ProgressBar']", 7000).Visible) { System.Threading.Thread.Sleep(1000); i++; if (i > 30) { throw new Exception("Proszę czekać jest za długo"); } } }
/// <summary> /// /// </summary> /// <param name="openWebsite"></param> /// <param name="browserId"></param> /// <param name="idOkna"></param> /// <param name="fields"></param> /// <param name="znajdzWKontenerze"></param> /// <param name="lpWierszaDolnego"></param> public SilverlightSimpleEditorWindow(WebDocument openWebsite, int?browserId, string idOkna, SimpleEditorFields[] fields, bool znajdzWKontenerze = true) : base(openWebsite, browserId) { this.znajdzWKontenerze = znajdzWKontenerze; const int waitTime = 30000; WaitForLoad(); if (idOkna != "") { _okno = OpenWebsite.FindSingle <Unknown>(string.Format(".//form/form[@name='{0}' and @visible='true']", idOkna), waitTime); } if (idOkna == "") { _okno = OpenWebsite.FindSingle <Unknown>(string.Format(".//form/form[@visible='true']"), waitTime); } if (znajdzWKontenerze) { _okno = _okno.FindSingle <Unknown>(".//container[@classname='ScrollViewer']", waitTime); } _fields = fields; }