本文整理匯總了C#中OpenQA.Selenium.Firefox.FirefoxDriver.FindElementByText方法的典型用法代碼示例。如果您正苦於以下問題:C# FirefoxDriver.FindElementByText方法的具體用法?C# FirefoxDriver.FindElementByText怎麽用?C# FirefoxDriver.FindElementByText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類OpenQA.Selenium.Firefox.FirefoxDriver
的用法示例。
在下文中一共展示了FirefoxDriver.FindElementByText方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: AssertPaymentFailed
private static void AssertPaymentFailed(FirefoxDriver seleniumInstance)
{
//should move to a thanks page
var thanksElement = seleniumInstance.FindElementByText("This card was declined");
Assert.IsNotNull(thanksElement);
}
示例2: AssertPaymentSuccess
private static void AssertPaymentSuccess(FirefoxDriver seleniumInstance)
{
//should move to a thanks page
var thanksElement = seleniumInstance.FindElementByText("Thanks");
Assert.IsNotNull(thanksElement);
}
示例3: CheckOrderSummary
private void CheckOrderSummary(FirefoxDriver seleniumInstance)
{
//should charge vat
var vatEl = seleniumInstance.FindElementByText("VAT");
Assert.IsNotNull(vatEl);
var totalEl = seleniumInstance.FindElementByText("£5.04");
Assert.IsNotNull(totalEl,"Should have total cost of £5.04 on page");
var continueButton = seleniumInstance.FindElementById("btnConfirmAndPay") as IWebElement;
continueButton.ClickWithJavascript(seleniumInstance);
}