Created
July 2, 2017 18:50
-
-
Save angelovstanton/15fa6374534e48ad8a36cf3d0bb40d1d to your computer and use it in GitHub Desktop.
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
[Test] | |
public void TestWithEdgeDriver() | |
{ | |
using (var driver = new EdgeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location))) | |
{ | |
driver.Navigate().GoToUrl(@"https://automatetheplanet.com/multiple-files-page-objects-item-templates/"); | |
var link = driver.FindElement(By.PartialLinkText("TFS Test API")); | |
var jsToBeExecuted = $"window.scroll(0, {link.Location.Y});"; | |
((IJavaScriptExecutor)driver).ExecuteScript(jsToBeExecuted); | |
var wait = new WebDriverWait(driver, TimeSpan.FromMinutes(1)); | |
var clickableElement = wait.Until(ExpectedConditions.ElementToBeClickable(By.PartialLinkText("TFS Test API"))); | |
clickableElement.Click(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment