private void SearchTBox_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Enter) { SearchBtn.PerformClick(); } }
public void SearchAvailbleTimeFromTreatmentApplication() { SearchBtn.ClickOn(); FirstFreeTime.ClickOn(); FirstFreeTimeSetMeeting.ClickOn(); softAssert.VerifyElementPresentInsideWindow(Pages.Meeting_Page.ApproveMeeting, Pages.Meeting_Page.CancelMeeting); }
private void SearchEnterKey(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { SearchBtn.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); } }
internal SearchPg SearchFunctionalityValidation(string searchKeyword) { SearchField.SendKeys(searchKeyword); SearchBtn.Click(); _logger.Info($"Searched for an item in the search bar=>{searchKeyword}"); return(new SearchPg(Driver)); }
private void WebSearch_Recognized(object sender, SpeechRecognizedEventArgs e) { string speech = e.Result.Text; int i = 0; try { foreach (string line in ArrayWebSearchCommands) { if (line == speech) { Decca.SpeakAsync(ArrayWebKeywordSearch[i]); keywordstxt.Text = ArrayWebKeywordSearch[i]; SearchBtn.PerformClick(); } i += 1; } } catch (Exception ex) { i += 1; Decca.SpeakAsync("Please check the " + speech + " web command on line " + i + ". It appears to be missing a proper response or web key words. " + ex.Message); } }
void textBox1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { if (e.KeyCode == Keys.Enter) { SearchBtn.PerformClick(); } }
public SearchResultsPage SearchText(string searchText) { SearchBtn.Click(); TextBoxHelper.TypeInTextBox(SearchTextBox, searchText); Searchbox.Click(); return(new SearchResultsPage(driver)); }
private void searchBox_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Return) { SearchBtn.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); } }
/// <summary> /// Seaching from page /// </summary> /// <param name="Anything"> what you searching for</param> public void Search(string Anything) { SearchTxt.Clear(); SearchTxt.SendKeys(Anything); Browser.WaitForElement(Bys.AMAPage.LoadIcon, ElementCriteria.IsNotVisible); SearchBtn.Click(); Browser.WaitForElement(Bys.AMAPage.LoadIcon, ElementCriteria.IsNotVisible); }
private async void Confirm() { SearchBtn.Focus(); await GetSuggestAsync("", 0); SuggestList.Visibility = Visibility.Hidden; Search?.Invoke(this, InputBox.Text); }
internal InventoryPage Search() { Wait.MLSeconds(200); Wait.UntilClickAble(SearchBtn); Wait.Second(1); SearchBtn.Click(); Wait.AM_Loaging_ShowAndHide(); return(this); }
public AccountsPage SearchForAccount(string AccountNumber) { Thread.Sleep(500); GetAccountsField.Clear(); GetAccountsField.SendKeys(AccountNumber); Thread.Sleep(500); SearchBtn.Click(); return(new AccountsPage(WebDriver)); }
private void TotalSalesInquiry_KeyDown(object sender, KeyEventArgs e) { if (e.Control && e.KeyCode == Keys.F) { SearchBtn.PerformClick(); } else if (e.Control && e.KeyCode == Keys.P) { PrintBtn.PerformClick(); } }
/// <summary> /// Enters text into the top left hand Search field, clicks Go, then waits for the Search Results page to load /// </summary> /// <param name="textToEnter">The text you want to enter into the Search field</param> /// <returns></returns> public SearchResultsPage Search(string textToEnter) { SearchTxt.Clear(); SearchTxt.SendKeys(textToEnter); SearchBtn.Click(); SearchResultsPage page = new SearchResultsPage(Browser); page.WaitForInitialize(); return(page); }
public void ClickOnSearchButton() { if (SearchBtn.Displayed) { SearchBtn.Click(); Thread.Sleep(3000); } else { throw new Exception("Element is not found or not clickable"); } }
public void Search() { IWebElement SearchBox; SearchBox = Driver.Instance.FindElement(By.Id("searchData")); SearchBox.SendKeys(search); IWebElement SearchBtn; SearchBtn = Driver.Instance.FindElement(By.ClassName("searchBtn")); SearchBtn.Click(); WebDriverWait wait8 = new WebDriverWait(Driver.Instance, new TimeSpan(0, 0, 30)); wait8.Until(ExpectedConditions.ElementToBeClickable(By.LinkText("2"))).Click(); }
private void AddSearchTerm(PropsalModel Data) { this.OpenTermDialog(Data.InventoryType); this.FillSerachTerms(Data); SearchBtn.Click(); Wait.UntilLoading(TableRecords); Wait.Second(1); if (!TermsModal.FindElements(By.CssSelector("tr[data-ng-repeat='inventory in $data']"))[0].FindElement(By.TagName("input")).Enabled) { Modal.Close(); throw new Exception(String.Format("Inventory is not available on given search Terms = {0}", Data.SearchTerms[0])); } else { TermsModal.FindElements(By.CssSelector("tr[data-ng-repeat='inventory in $data']"))[0].FindElement(By.TagName("input")).Click(); } Wait.MLSeconds(100); AdToProposalBtn.Click(); }
/// <summary> /// Clicks the user-specified button or link and then waits for a window to close or open, or a page to load, /// depending on the button that was clicked /// </summary> /// <param name="buttonOrLinkElem">The element to click on</param> public dynamic ClickToAdvance(IWebElement buttonOrLinkElem) { if (Browser.Exists(Bys.GCEPLibraryPage.SearchBtn)) { if (buttonOrLinkElem.GetAttribute("outerHTML") == SearchBtn.GetAttribute("outerHTML")) { SearchBtn.Click(); // Browser.WaitForElement(Bys.EducationCenterPage.MyCoursesTtl, TimeSpan.FromSeconds(60), ElementCriteria.IsVisible, ElementCriteria.IsEnabled); //Browser.WaitForElement(Bys.EducationCenterPage.GcepLnk, TimeSpan.FromSeconds(60), ElementCriteria.IsEnabled); new WebDriverWait(Browser, TimeSpan.FromSeconds(15)).Until(ExpectedConditions.UrlContains("Courses.aspx")); return(new EducationCenterPage(Browser)); // } } } if (Browser.Exists(Bys.GCEPLibraryPage.BeginCourseBtn)) { if (buttonOrLinkElem.GetAttribute("outerHTML") == BeginCourseBtn.GetAttribute("outerHTML")) { BeginCourseBtn.Click(); return(new CourseTestPage(Browser)); } } if (Browser.Exists(Bys.GCEPLibraryPage.TranscriptLnk)) { if (buttonOrLinkElem.GetAttribute("outerHTML") == TranscriptLnk.GetAttribute("outerHTML")) { TranscriptLnk.Click(); Browser.WaitForElement(Bys.GCEPTranscriptPage.CompletedTestTbl, TimeSpan.FromSeconds(60), ElementCriteria.IsVisible, ElementCriteria.IsEnabled); return(new GCEPTranscriptPage(Browser)); } } else { throw new Exception("No button or link was found with your passed parameter. You either need to add this button to a new If statement, or if the button is already added, then the page you were on did not contain the button."); } return(null); }
private void DeleteBtn_Click(object sender, EventArgs e) { var item = OrdersLV.SelectedItems[0]; OrdersLV.Items.Clear(); int countrows = 0; for (; ; countrows++) { if (worksheet.Cells[countrows + 1, 1].Value == null) { break; } } int index = -1; for (int i = 1; i <= countrows; i++) { DateTime datecur = (DateTime)worksheet.Cells[i, 5].Value; string datestr = $"{datecur.Day}.{datecur.Month}.{datecur.Year}"; ListViewItem row = new ListViewItem(worksheet.Cells[i, 1].Value.ToString()); //name row.SubItems.AddRange(new[] { new ListViewItem.ListViewSubItem(row, worksheet.Cells[i, 2].Value.ToString()), //from new ListViewItem.ListViewSubItem(row, worksheet.Cells[i, 3].Value.ToString()), //to new ListViewItem.ListViewSubItem(row, worksheet.Cells[i, 4].Value.ToString()), //num new ListViewItem.ListViewSubItem(row, datestr) //date }); OrdersLV.Items.Add(row); bool pure = true; for (int j = 0; j < 5; j++) { pure = item.SubItems[j].Text == row.SubItems[j].Text; } if (pure) { index = OrdersLV.Items.Count - 1; } } worksheet.DeleteRow(index + 1); SearchBtn.PerformClick(); changed = true; }
/// <summary> /// Clicks search icon /// </summary> private void ClickSearch() { try { if (IsWebElementPresent(SearchBtn)) { SearchBtn.Click(); waitForResultsPanelLoad(); Reporter.Pass("ClickSearch", "Search is hit successfully"); } else { Reporter.Fail("ClickSearch", "Failed to hit search"); } } catch (Exception ClickSearchException) { throw ClickSearchException; } }
public void SearchAvailbleTimeApplication() { try { ExpertiseSelect.SendKeys(Keys.ArrowDown); ExpertiseSelect.SendKeys(Keys.ArrowDown); Thread.Sleep(500); var durationTest = Browser.Driver.FindElement(By.XPath("//*[@id='findTimeSlotForm']/div/div[2]/div[1]/div[1]/div[7]/div/div/span[5]/span/input[1]")).GetAttribute("aria-valuenow"); SearchBtn.ClickOn(); FirstFreeTime.ClickOn(); FirstFreeTimeSetMeeting.ClickOn(); softAssert.VerifyElementPresentInsideWindow(Pages.Meeting_Page.ApproveMeeting, Pages.Meeting_Page.CancelMeeting); softAssert.VerifyElementHasEqual(Pages.Meeting_Page.MeetingDuration.GetAttribute("aria-valuenow"), durationTest); } catch (ElementNotVisibleException) { CloseWindow.ClickOn(); Log.Error("bug with searching availble time"); } }
/// <summary> /// Selecting a value from the Status dropdown, Entering text in the name text box and clicking search /// </summary> /// <param name="UserStatus">Select user status from dropdown</param> /// <param name="UserName">passing username</param> public void SearchForUserByStatusAndName(String UserStatus, String UserName) { Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(180), ElementCriteria.IsNotVisible); StatusSelElem.SelectByValue(UserStatus); SearchTxt.Clear(); SearchTxt.SendKeys(UserName); Browser.WaitForElement(Bys.AMAPage.SearchBtn, TimeSpan.FromSeconds(180), ElementCriteria.IsEnabled, ElementCriteria.IsVisible); try { Thread.Sleep(0500); SearchBtn.Click(); } catch (InvalidOperationException) { SearchTxt.SendKeys(Keys.Enter); SearchTxt.SendKeys(Keys.Enter); } // StatusSelElem.SelectByValue(UserStatus); Browser.WaitForElement(Bys.AMAPage.LoadIcon, ElementCriteria.IsNotVisible); }
private void Process_OutputDataReceived() { var script = @"-u C:\Users\DECCACLONE\source\repos\Voice\Voice\Voice.py"; var filename = @"C:\Users\DECCACLONE\AppData\Local\Programs\Python\Python37-32\python.exe"; Process proc = new Process(); proc.StartInfo = new ProcessStartInfo(filename, script) { RedirectStandardOutput = true, UseShellExecute = false, CreateNoWindow = true }; proc.Start(); keywordstxt.Text = proc.StandardOutput.ReadToEnd(); SearchBtn.PerformClick(); //webbrowser1.Dock = DockStyle.Fill; //webbrowser1.Dock = DockStyle.None; //webbrowser1.Anchor = AnchorStyles.None; //webbrowser1.MaximumSize = new Size(800, 640); //Process.Start("https://www.google.com/search?q=" + keywordstxt.Text); }
public PageViewerCommandBar() { this.InitializeComponent(); _showSettings = new Subject <Unit>(); _scrollToTop = new Subject <Unit>(); _printPdf = new Subject <Unit>(); _edit = new Subject <Unit>(); _search = new Subject <Unit>(); _showHistory = new Subject <Unit>(); _toggleFullscreen = new Subject <Unit>(); _import = new Subject <Unit>(); _export = new Subject <Unit>(); _navigateToPage = new Subject <string>(); this.WhenActivated(disposable => { this.OneWayBind(ViewModel, vm => vm.DevOptsEnabled, view => view.DevOptBtn.Visibility) .DisposeWith(disposable); SettingsBtn.Events().Click .Select(x => Unit.Default) .Subscribe(x => { _showSettings.OnNext(x); }).DisposeWith(disposable); ToTopBtn.Events().Click .Select(x => Unit.Default) .Subscribe(x => { _scrollToTop.OnNext(x); }).DisposeWith(disposable); PdfBtn.Events().Click .Select(x => Unit.Default) .Subscribe(x => { _printPdf.OnNext(x); }).DisposeWith(disposable); SearchBtn.Events().Click .Select(x => Unit.Default) .Subscribe(x => { _search.OnNext(x); }).DisposeWith(disposable); HistoryBtn.Events().Click .Select(x => Unit.Default) .Subscribe(x => { _showHistory.OnNext(x); }).DisposeWith(disposable); FullscreenBtn.Events().Click .Select(x => Unit.Default) .Subscribe(x => { _toggleFullscreen.OnNext(x); }).DisposeWith(disposable); ImportBtn.Events().Click .Select(x => Unit.Default) .Subscribe(x => { _import.OnNext(x); }).DisposeWith(disposable); ExportBtn.Events().Click .Select(x => Unit.Default) .Subscribe(x => { _export.OnNext(x); }).DisposeWith(disposable); EditBtn.Events().Click .Select(_ => Unit.Default) .Subscribe(x => { _edit.OnNext(Unit.Default); }).DisposeWith(disposable); NewPageBtn.Events().Click .Select(_ => Unit.Default) .InvokeCommand(ViewModel.NewPageClick) .DisposeWith(disposable); DevOptBtn.Events().Click .Select(_ => Unit.Default) .InvokeCommand(ViewModel.DevOptionsClick) .DisposeWith(disposable); BindTextResources(disposable); ShowLastVisitedPages(); }); }
private void engine_Recognized(object sender, SpeechRecognizedEventArgs e) { string speech = e.Result.Text; switch (speech) { case "start reading": CopyScreenBtn.PerformClick(); StartBtn.PerformClick(); break; case "read the result": case "read the resuls": case "whats the result": case "whats the results": GetResult(); break; case "search": SearchBtn.PerformClick(); break; case "pause": PauseBtn.PerformClick(); break; case "resume": PauseBtn.PerformClick(); break; case "back": BackBtn.PerformClick(); break; case "next": ForwardBtn.PerformClick(); break; case "stop": StopBtn.PerformClick(); break; case "close website search": Decca.Speak("Closing Website Reader"); CloseBtn.PerformClick(); break; case "hide website reader": FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Minimized; TopMost = false; break; case "show website reader": case "show website reader again": FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Normal; TopMost = true; break; default: break; } if (speech == "find") { string Speech = e.Result.Text; Qevent = Speech; Speech = string.Empty; Decca.SpeakAsync("what do you want to search"); speech = string.Empty; Process_OutputDataReceived(); } }
void EditLabel(int check) { if (check == 0) { label1.Hide(); label2.Hide(); label3.Hide(); label4.Hide(); label5.Hide(); textBox2.Hide(); textBox3.Hide(); textBox4.Hide(); textBox5.Hide(); textBox6.Hide(); button6.Hide(); DeleteBtn.Hide(); SearchBtn.Hide(); SortName.Hide(); SortGroup.Hide(); SortPoint.Hide(); } if (check == 1) { label1.Show(); label2.Show(); label3.Show(); label4.Show(); label5.Show(); textBox2.Show(); textBox3.Show(); textBox4.Show(); textBox5.Show(); textBox6.Show(); button6.Show(); DeleteBtn.Hide(); SortName.Hide(); SortGroup.Hide(); SortPoint.Hide(); } if (check == 2) { DeleteBtn.Show(); label1.Show(); label2.Hide(); label3.Hide(); label4.Hide(); label5.Hide(); textBox2.Show(); textBox3.Hide(); textBox4.Hide(); textBox5.Hide(); textBox6.Hide(); button6.Hide(); SearchBtn.Hide(); SortName.Hide(); SortGroup.Hide(); SortPoint.Hide(); } if (check == 3) { SearchBtn.Show(); label1.Show(); label2.Hide(); label3.Hide(); label4.Hide(); label5.Hide(); textBox2.Show(); textBox3.Hide(); textBox4.Hide(); textBox5.Hide(); textBox6.Hide(); button6.Hide(); DeleteBtn.Hide(); SortName.Hide(); SortGroup.Hide(); SortPoint.Hide(); } if (check == 4) { SearchBtn.Hide(); label1.Hide(); label2.Hide(); label3.Hide(); label4.Hide(); label5.Hide(); textBox2.Hide(); textBox3.Hide(); textBox4.Hide(); textBox5.Hide(); textBox6.Hide(); button6.Hide(); DeleteBtn.Hide(); SortName.Show(); SortGroup.Show(); SortPoint.Show(); } }
public void DoSearch() { SearchBtn.Click(); }
public void Search() { SearchField.SendKeys("Hello"); SearchBtn.Click(); }
public void SearchHotel() { SearchBtn.Click(); }
public void UpdateSearchResult() { SearchBtn.PerformClick(); }