Skip to content

Commit

Permalink
Fix screenshot in wrong spot
Browse files Browse the repository at this point in the history
  • Loading branch information
t1m0thyj committed Jan 5, 2025
1 parent 74f5a99 commit 9b96eb6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/SystemTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ public void ShouldUpdateWallpaper()
driver.FindElementByXPath("//Button[@Name='OK']").Click();
Thread.Sleep(TimeSpan.FromSeconds(5));

driver.TakeScreenshot().SaveAsFile(@"..\..\..\screenshot1.png", ScreenshotImageFormat.Png);
driver.SwitchTo().Window(driver.WindowHandles[0]);
driver.TakeScreenshot().SaveAsFile(@"..\..\..\screenshot2.png", ScreenshotImageFormat.Png);
driver.TakeScreenshot().SaveAsFile(@"..\..\..\screenshot1.png", ScreenshotImageFormat.Png);
driver.FindElementByXPath("//Window[@Name='Configure Schedule']").Click();
driver.TakeScreenshot().SaveAsFile(@"..\..\..\screenshot3.png", ScreenshotImageFormat.Png);
driver.TakeScreenshot().SaveAsFile(@"..\..\..\screenshot2.png", ScreenshotImageFormat.Png);
driver.FindElementByAccessibilityId("radioButton1").Click();
driver.FindElementByAccessibilityId("locationBox").SendKeys("New York NY");
driver.TakeScreenshot().SaveAsFile(@"..\..\..\screenshot3.png", ScreenshotImageFormat.Png);
driver.FindElementByXPath("//Button[@Name='OK']").Click();
Thread.Sleep(TimeSpan.FromSeconds(2));
//driver.SwitchTo().Window(driver.WindowHandles.Last());
Expand Down

0 comments on commit 9b96eb6

Please sign in to comment.