Last active
December 20, 2015 06:28
-
-
Save dapngn/6085522 to your computer and use it in GitHub Desktop.
This C# does not need to be compiled into a .dll, it's a .csx file that is compiled at runtime by the Roslyn api. The expression lambda is populated by Selenium webdriver code.
This file contains 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
ExpectedResult = true; | |
ScriptResult = (new WebInteraction( | |
WithBrowser: WebInteraction.FireFox, | |
Script: (w) => | |
{ | |
// Selenium webdriver code | |
w.Driver.Navigate().GoToUrl("https://duckduckgo.com/"); | |
w.Wait | |
.Until(p => p.FindElement(By.Name("q"))); | |
w.Driver | |
.FindElement(By.Name("q")) | |
.SendKeys("I don't wanna be a playa no mo"); | |
w.Result = true; | |
})) | |
.Execute() | |
.Result; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment