Last active
February 13, 2016 16:30
-
-
Save angelovstanton/3395fd92e8cc24accb76 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
[TestMethod] | |
public void WebDriverAdvancedUsage_TakingFullScrenenScreenshot() | |
{ | |
this.driver.Navigate().GoToUrl(@"http://automatetheplanet.com"); | |
this.WaitUntilLoaded(); | |
string tempFilePath = Path.GetTempFileName().Replace(".tmp", ".png"); | |
this.TakeFullScreenshot(this.driver, tempFilePath); | |
} | |
[TestMethod] | |
public void WebDriverAdvancedUsage_TakingElementScreenshot() | |
{ | |
this.driver.Navigate().GoToUrl(@"http://automatetheplanet.com"); | |
this.WaitUntilLoaded(); | |
string tempFilePath = Path.GetTempFileName().Replace(".tmp", ".png"); | |
this.TakeScreenshotOfElement(this.driver, | |
By.XPath("//*[@id='tve_editor']/div[2]/div[2]/div/div"), tempFilePath); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment