本文整理汇总了C#中OpenQA.Selenium.Interactions.Actions.DoubleClick方法的典型用法代码示例。如果您正苦于以下问题:C# Actions.DoubleClick方法的具体用法?C# Actions.DoubleClick怎么用?C# Actions.DoubleClick使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenQA.Selenium.Interactions.Actions
的用法示例。
在下文中一共展示了Actions.DoubleClick方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InPutSearchStringAndPressEnter
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);
}
示例2: PerformClick
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();
}
示例3: ShouldAllowDoubleClickThenNavigate
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;
}
示例4: ShouldAllowDoubleClick
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"));
}
示例5: EditCollateral
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");
}
开发者ID:borisstoyanov,项目名称:FinancialRegulation-Selenium-Csharp,代码行数:12,代码来源:PO_EditEmirCollateralPage.cs
示例6: EditConfirmation
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");
}
开发者ID:borisstoyanov,项目名称:FinancialRegulation-Selenium-Csharp,代码行数:22,代码来源:PO_EditEmirTransactionPage.cs
示例7: EditClearing
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");
}
开发者ID:borisstoyanov,项目名称:FinancialRegulation-Selenium-Csharp,代码行数:22,代码来源:PO_EditEmirTransactionPage.cs
示例8: IfNoObjectInClipboardCtrlVRevertsToBrowserBehaviour
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"));
}
示例9: TestDoubleClick
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();
}
示例10: DoubleClick
//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();
}
示例11: DoubleClick
public void DoubleClick(string locator)
{
Actions action = new Actions(_driver);
var element = _driver.FindElement(ByLocator(locator));
IsElementPresent(locator);
action.DoubleClick(element).Build().Perform();
}
示例12: navigate_folders_with_crumb_trail_should_update_table_and_crumb_trail
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"));
}
示例13: DoubleClick
public void DoubleClick(IWebDriver driver, IWebElement objectName)
{
Actions actionProvider = new Actions(driver);
actionProvider.DoubleClick(this.objectName);
}
示例14: EditCounterparty
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");
}
开发者ID:borisstoyanov,项目名称:FinancialRegulation-Selenium-Csharp,代码行数:33,代码来源:PO_EditEmirTransactionPage.cs
示例15: ClickApproach
public void ClickApproach()
{
// AboutVerify();
Actions action = new Actions(TestRunner.Driver);
action.DoubleClick(ApproachLink()).Build().Perform();
ApproachVerify();
}