public void InPutSearchStringAndPressEnter(string text) { Actions action = new Actions(TestRunner.Driver); action.DoubleClick(SearchInput()).Build().Perform(); SearchInput().Clear(); SearchInput().SendKeys(text + OpenQA.Selenium.Keys.Enter); }
public void DoubleClick() { LOG.Information("Double clicking on element: {0}", WebElement); var action = new OpenQA.Selenium.Interactions.Actions(WebDriver); action.DoubleClick(WebElement).Perform(); }
protected void ChooseFirstRowOfLookup(string lookupFullName, string searchCondition = "") { var byEle = By.Id(string.Format("{0}_LookupBtn", lookupFullName)); ClickElement(byEle); if (!string.IsNullOrEmpty(searchCondition)) { string inputField = string.Format("{0}_Lookup-ConditionManager-SearchCondition0-TextValue", lookupFullName); SetFieldValue(inputField, searchCondition); } byEle = By.Id(string.Format("{0}_Lookup-ConditionManager-Search_label", lookupFullName)); myDriver.FindElement(byEle).Click(); byEle = By.XPath(string.Format("//div[@id='{0}_Lookup-Grid']/div[2]/div/div/div/div/div/table/tbody/tr/td[2]", lookupFullName)); WaitForElement(byEle); var element = myDriver.FindElement(byEle); var action = new OpenQA.Selenium.Interactions.Actions(myDriver); action.DoubleClick(element); action.Perform(); byEle = By.Id(string.Format("{0}_Lookup-Dialog", lookupFullName)); var wait = new WebDriverWait(myDriver, TimeSpan.FromSeconds(DriverDefaultTimeout)); wait.Until((d) => { return(IsElementVisible(byEle) == false); }); }
public static void PerformClick(By @locator) { var element = ObjectRepository.Driver.FindElement(locator); var action = new Actions(ObjectRepository.Driver); var perform = action.DoubleClick(element) .Build(); perform.Perform(); }
public void ShouldAllowDoubleClick() { driver.Url = javascriptPage; IWebElement toDoubleClick = driver.FindElement(By.Id("doubleClickField")); Actions actionProvider = new Actions(driver); IAction dblClick = actionProvider.DoubleClick(toDoubleClick).Build(); dblClick.Perform(); Assert.AreEqual("DoubleClicked", toDoubleClick.GetAttribute("value")); }
public void EditCollateral(String amount) { Browser.Browser.ClickByXPath("//div[text()='Collateral']"); IWebElement natAmount = Browser.Browser.Instance.FindElement(By.Id("8_Collateral_CollateralValue_ExternalDiv")); Actions action = new Actions(Browser.Browser.Instance); action.DoubleClick(natAmount); action.Perform(); Browser.Browser.Instance.FindElement(By.XPath("//form[@class='form-inline editableform']//input[@type='text']")).Clear(); Browser.Browser.Instance.FindElement(By.XPath("//form[@class='form-inline editableform']//input[@type='text']")).SendKeys(amount); Browser.Browser.ClickByXPath("//button[@class='editable-submit ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only EMIRButtonStyle']"); Browser.Browser.ClickByID("EditValidateButton"); }
public void ShouldAllowDoubleClickThenNavigate() { driver.Url = javascriptPage; IWebElement toDoubleClick = driver.FindElement(By.Id("doubleClickField")); Actions actionProvider = new Actions(driver); IAction dblClick = actionProvider.DoubleClick(toDoubleClick).Build(); dblClick.Perform(); driver.Url = droppableItems; }
public void EditConfirmation(String amount) { Browser.Browser.ClickByXPath("//div[text()='Confirmation']"); IWebElement natAmount = Browser.Browser.Instance.FindElement(By.Id("50_Confirmation_ConfirmationMeans_InternalDiv")); Actions action = new Actions(Browser.Browser.Instance); action.DoubleClick(natAmount); action.Perform(); Thread.Sleep(1000); Browser.Browser.Instance.FindElement(By.XPath("//form[@class='form-inline editableform']//input[@type='text']")).Clear(); Thread.Sleep(1000); Browser.Browser.Instance.FindElement(By.XPath("//form[@class='form-inline editableform']//input[@type='text']")).SendKeys(amount + Keys.Return); Thread.Sleep(1000); IWebElement submitBtn= Browser.Browser.Instance.FindElement(By.XPath("//button[@type='submit']")); action.DoubleClick(submitBtn); action.DoubleClick(submitBtn); action.Perform(); Thread.Sleep(10000); Browser.Browser.ClickByID("EditValidateButton"); }
public void EditClearing(String amount) { Browser.Browser.ClickByXPath("//div[text()='Clearing']"); IWebElement natAmount = Browser.Browser.Instance.FindElement(By.Id("60_Clearing_CentralCounterparty_ExternalDiv")); IWebElement DateTimeStamp = Browser.Browser.Instance.FindElement(By.Id("60_Clearing_ClearingTimestamp_ExternalDiv")); Actions action = new Actions(Browser.Browser.Instance); action.DoubleClick(natAmount); action.Perform(); Thread.Sleep(1000); Browser.Browser.Instance.FindElement(By.XPath("//form[@class='form-inline editableform']//input[@type='text']")).SendKeys(amount); Thread.Sleep(1000); Browser.Browser.ClickByXPath("//button[@class='editable-submit ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only EMIRButtonStyle']"); Thread.Sleep(1000); IWebElement submitBtn = Browser.Browser.Instance.FindElement(By.XPath("//button[@type='submit']")); action.DoubleClick(submitBtn); action.DoubleClick(submitBtn); action.Perform(); Browser.Browser.ClickByID("EditValidateButton"); }
public virtual void IfNoObjectInClipboardCtrlVRevertsToBrowserBehaviour() { GeminiUrl("home?m1=EmployeeRepository&d1=CreateNewEmployeeFromContact&f1_contactDetails=null"); WaitForView(Pane.Single, PaneType.Home); var home = WaitForCss(".title"); Actions action = new Actions(br); action.DoubleClick(home); //Should put "Home"into browser clipboard action.SendKeys(Keys.Control + "c"); action.Perform(); Thread.Sleep(500); //home.SendKeys(Keys.Control + "c"); string selector = "input.value"; var target = WaitForCss(selector); Assert.AreEqual("", target.GetAttribute("value")); target.Click(); target.SendKeys(Keys.Control + "v"); Assert.AreEqual("Home", target.GetAttribute("value")); }
public void TestDoubleClick() { IWebDriver driver = new ChromeDriver(@"C:\ChromeDriver\"); driver.Navigate().GoToUrl("http://dl.dropbox.com/u/55228056/DoubleClickDemo.html"); IWebElement message = driver.FindElement(By.Id("message")); //Verify color is Blue Assert.AreEqual("rgba(0, 0, 255, 1)",message.GetCssValue("background-color").ToString()); Actions builder = new Actions(driver); builder.DoubleClick(message).Build().Perform(); //Verify Color is Yellow Assert.AreEqual("rgba(255, 255, 0, 1)",message.GetCssValue("background-color").ToString()); driver.Close(); }
public IMouseActions DoubleClick() { actions.DoubleClick(); return(this); }
public void DoubleClick(string locator) { Actions action = new Actions(_driver); var element = _driver.FindElement(ByLocator(locator)); IsElementPresent(locator); action.DoubleClick(element).Build().Perform(); }
public void DoubleClick(IWebDriver driver, IWebElement objectName) { Actions actionProvider = new Actions(driver); actionProvider.DoubleClick(this.objectName); }
//Double click on the element public void DoubleClick(String locator) { this.WaitForElementPresent(locator, 20); Boolean x = isElementPresent(locator); Assert.IsTrue(isElementPresent(locator)); IWebElement el = driver.FindElement(ByLocator(locator)); Actions builder = new Actions(driver); builder.DoubleClick(el).Perform(); }
public void navigate_subfolders_should_work_with_double_click() { // Arrange string sitePath = TestConstants.WEB_PATH; string folderPath = Path.Combine(sitePath, "App_Data", "Attachments", "folder"); Directory.CreateDirectory(folderPath); string subfolderPath = Path.Combine(folderPath, "subfolder"); Directory.CreateDirectory(subfolderPath); LoginAsEditor(); // Act Driver.FindElement(By.CssSelector("a[href='/filemanager']")).Click(); IWebElement td = Driver.FindElement(By.CssSelector("table#files tbody tr td+td")); Actions action = new Actions(Driver); action.DoubleClick(td).Perform(); WaitForAjaxToComplete(); td = Driver.FindElement(By.CssSelector("table#files tbody tr td+td")); action = new Actions(Driver); action.DoubleClick(td).Perform(); WaitForAjaxToComplete(); // Assert Assert.That(Driver.FindElements(By.CssSelector("table#files tbody tr")).Count(), Is.EqualTo(0)); Assert.That(Driver.FindElements(By.CssSelector("#path-navigator li"))[0].Text, Is.EqualTo("/")); Assert.That(Driver.FindElements(By.CssSelector("#path-navigator li"))[1].Text, Is.EqualTo("folder")); Assert.That(Driver.FindElements(By.CssSelector("#path-navigator li"))[2].Text, Is.EqualTo("subfolder")); }
public void navigate_folders_with_crumb_trail_should_update_table_and_crumb_trail() { // Arrange string sitePath = TestConstants.WEB_PATH; string folderPath = Path.Combine(sitePath, "App_Data", "Attachments", "folder"); Directory.CreateDirectory(folderPath); string subfolderPath = Path.Combine(folderPath, "subfolder"); Directory.CreateDirectory(subfolderPath); LoginAsEditor(); // Act Driver.FindElement(By.CssSelector("a[href='/filemanager']")).Click(); IWebElement td = Driver.FindElement(By.CssSelector("table#files tbody tr td+td")); Actions action = new Actions(Driver); action.DoubleClick(td).Perform(); // go to 1st folder WaitForAjaxToComplete(); td = Driver.FindElement(By.CssSelector("table#files tbody tr td+td")); action = new Actions(Driver); action.DoubleClick(td).Perform(); // go to 2nd folder WaitForAjaxToComplete(); Thread.Sleep(500); Driver.FindElements(By.CssSelector("#path-navigator li"))[1].Click(); WaitForAjaxToComplete(); // Assert Assert.That(Driver.FindElements(By.CssSelector("table#files tbody tr")).Count(), Is.EqualTo(1)); Assert.That(Driver.FindElement(By.CssSelector("table#files tbody tr td+td")).Text, Is.EqualTo("subfolder")); Driver.FindElements(By.CssSelector("#path-navigator li"))[1].Click(); // use the current node, just to be sure it does nothing Driver.FindElements(By.CssSelector("#path-navigator li"))[0].Click(); WaitForAjaxToComplete(); Assert.That(Driver.FindElements(By.CssSelector("table#files tbody tr")).Count(), Is.EqualTo(1)); Assert.That(Driver.FindElement(By.CssSelector("table#files tbody tr td+td")).Text, Is.EqualTo("folder")); }
public void DoubleClick(string locator) { Actions builder = new Actions(GetWebDriver()); IWebElement el = GetWebDriver().FindElement(ByLocator(locator)); Assert.IsTrue(IsElementPresent(locator)); builder.DoubleClick(el).Build().Perform(); }
public void ClickCareers() { Actions action = new Actions(TestRunner.Driver); action.DoubleClick(CareersLink()).Build().Perform(); CareersVerify(); }
private void doubleclick(IWebElement el, IWebDriver dr) { Actions acn = new Actions(dr); acn.DoubleClick(el); }
public void EditCounterparty(String directlyLinked, string clearingMember) { Browser.Browser.ClickByXPath("//div[text()='Counterparty']"); IWebElement natAmount = Browser.Browser.Instance.FindElement(By.Id("10_Counterparty_DirectlyLinkedtoCommercialActivity_ExternalDiv")); IWebElement clearingMemberCtrl = Browser.Browser.Instance.FindElement(By.Id("10_Counterparty_ClearingMember_DerivedDiv")); Actions action = new Actions(Browser.Browser.Instance); action.DoubleClick(natAmount); action.Perform(); Thread.Sleep(1000); Browser.Browser.Instance.FindElement(By.XPath("//form[@class='form-inline editableform']//input[@type='text']")).SendKeys(directlyLinked); Thread.Sleep(1000); IWebElement submitBtn1 = Browser.Browser.Instance.FindElement(By.XPath("//button[@type='submit']")); action.DoubleClick(submitBtn1); action.DoubleClick(submitBtn1); action.Perform(); Thread.Sleep(10000); action.DoubleClick(clearingMemberCtrl); action.Perform(); Thread.Sleep(1000); Browser.Browser.Instance.FindElement(By.XPath("//form[@class='form-inline editableform']//input[@type='text']")).SendKeys(clearingMember); Thread.Sleep(1000); IWebElement submitBtn = Browser.Browser.Instance.FindElement(By.XPath("//button[@type='submit']")); action.DoubleClick(submitBtn); action.DoubleClick(submitBtn); action.Perform(); Thread.Sleep(10000); Browser.Browser.ClickByID("EditValidateButton"); }
public static void doubleClick(this IWebDriver driver, string When, string How) { IWebElement ele = driver._FindElement(When, How); Actions action = new Actions(driver); action.DoubleClick(); action.Perform(); }
public void ClickFooterNews() { Actions action = new Actions(TestRunner.Driver); action.DoubleClick(FooterNews()).Build().Perform(); newsVerify(); }
public void ClickContact() { Actions action = new Actions(TestRunner.Driver); action.DoubleClick(ContactLink()).Build().Perform(); ContactVerify(); }
public bool WaitAndDoubleClick(By by) { WaitForElement(by); IWebElement rowrecord = _d.FindElement(by); Actions actionProvider = new Actions(_d); IAction doubleClick = actionProvider.DoubleClick(rowrecord).Build(); doubleClick.Perform(); return true; }
/// <summary> /// Double click an element /// </summary> /// <param name="element">Page element</param> public static void ClickDouble(this IBrowser browser, PageElement element) { var action = new Actions(browser.IWebDriver); action.DoubleClick(browser.Find(element)).Build().Perform(); }
public void DoubleClick(NgWebDriver driver) { Actions action = new Actions(driver.WrappedDriver); action.DoubleClick(_ele).Build().Perform(); }
public void ClickApproach() { // AboutVerify(); Actions action = new Actions(TestRunner.Driver); action.DoubleClick(ApproachLink()).Build().Perform(); ApproachVerify(); }
public void VerifyEditingNotPossible() { Browser.Browser.ClickByXPath("//div[text()='Trade']"); IWebElement natAmount = Browser.Browser.Instance.FindElement(By.Id("30_Trade_NotionalAmount_ExternalDiv")); Actions action = new Actions(Browser.Browser.Instance); action.DoubleClick(natAmount); action.Perform(); if (!Util.IsElementVisible(By.XPath("//form[@class='form-inline editableform']//input[@type='text']"))) { } else { Assert.Fail("Trade can be edited"); } }
public void ClickAboutLink() { Actions action = new Actions(TestRunner.Driver); action.DoubleClick(AboutLink()).Build().Perform(); AboutTest(); }
public void ClickFooterOurStory() { Actions action = new Actions(TestRunner.Driver); action.DoubleClick(FooterOurStory()).Build().Perform(); }
public void DoubleClick() { LogProvider.DefaultLogger.Log("Going to double-click on " + _controlName); Actions action = new Actions(Driver); action.DoubleClick(this).Build().Perform(); LogProvider.DefaultLogger.Log("Double clicked successfully on" + _controlName); }
/// <summary> /// Double click on element /// </summary> /// <param name="element">Target</param> /// <returns></returns> public static IWebElement DoubleClick(this IWebElement element) { OpenQA.Selenium.Interactions.Actions action = new OpenQA.Selenium.Interactions.Actions(Browser.Driver); action.DoubleClick().Build().Perform(); return(element); }
public void ClickServices() { Actions action = new Actions(TestRunner.Driver); action.DoubleClick(ServicesLink()).Build().Perform(); ServicesVerify(); }