This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.Serialization; | |
namespace OpenQA.Selenium.Support.UI | |
{ | |
[Serializable] | |
public class UnexpectedTagNameException : Exception | |
{ | |
/// <summary> | |
/// Initializes a new instance of the <see cref="UnexpectedTagNameException"/> class with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
namespace OpenQA.Selenium.Support.UI | |
{ | |
public class Select | |
{ | |
private readonly IWebElement element; | |
public bool Multiple { get; private set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void SearchForTest() | |
{ | |
IWebElement searchbox = _driver.FindElement(By.Name("q")); | |
searchbox.SendKeys("Test"); | |
searchbox.SendKeys(Keys.Enter); //send [enter] key to the control. | |
Assert.AreEqual("Test - Google Search", _driver.Title); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void GooglePageTitle() | |
{ | |
Assert.AreEqual("Google", _driver.Title); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using NUnit.Framework; | |
using OpenQA.Selenium; | |
using OpenQA.Selenium.Chrome; | |
namespace selenium_examples | |
{ | |
[TestFixture] | |
public class GoogleTests | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Wait until the test condition is true or a timeout occurs. Useful for waiting | |
* on a server response or for a ui change (fadeIn, etc.) to occur. | |
* | |
* @param testFx javascript condition that evaluates to a boolean, | |
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or | |
* as a callback function. | |
* @param onReady what to do when testFx condition is fulfilled, | |
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or | |
* as a callback function. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QUnit.moduleStart = function (name, testEnvironment) { | |
console.log("##teamcity[testSuiteStarted name='" + name + "']"); | |
}; | |
QUnit.moduleDone = function (name, failures, total) { | |
console.log("##teamcity[testSuiteFinished name='" + name + "']"); | |
}; | |
QUnit.testStart = function (name, testEnvironment) { | |
console.log("##teamcity[testStarted name='" + name + "']"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Set the first day of the week to monday | |
SET DATEFIRST 1 | |
-- Set the first day of the week to tuesday | |
SET DATEFIRST 2 | |
-- Set the first day of the week to sunday | |
SET DATEFIRST 7 |
NewerOlder