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 TestBaseline() | |
{ | |
GoToPricingPage(); | |
UpdateElements(); | |
Eyes.Open(Driver, AppName, TestCaseName, Resolution1080P); | |
Eyes.CheckWindow(); | |
} |
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
public class MatchLevels : BaseClass | |
{ | |
[Test] | |
public void ContentMatchLevel() | |
{ | |
//Set the applitools match level to Content | |
Eyes.MatchLevel = MatchLevel.Content; | |
//Will open the fake pricing page | |
GoToPricingPage(); | |
//Will change the first element to a Euro symbol instead of the $ |
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
private void ChangeToEuroAndUpdateColor() | |
{ | |
//take the first element with class name et_pb_sum and update the value to what's specified | |
Javascript.ExecuteScript( | |
"document.getElementsByClassName('et_pb_sum')[0].innerText = \"€0\";"); | |
var element = Driver.FindElement(By.TagName("h1")); | |
//Executes some javascript that updates the color of the h1 element on the page to the color specified | |
Javascript.ExecuteScript( | |
"arguments[0].setAttribute('style', 'color:#f9ca33!important')",element); | |
} |
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
public void LayoutMatchLevel() | |
{ | |
//Sets the applitools match leve to Layout | |
Eyes.MatchLevel = MatchLevel.Layout; | |
//Will open the fake pricing page | |
GoToPricingPage(); | |
//Will change the first element to a Euro symbol instead of the $ | |
//and will change the collor to a yellow. | |
ChangeToEuroAndUpdateColor(); | |
//Starts the applitools test with 4 parameters passed in |
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
namespace Applitools | |
{ | |
[TestFixture] | |
[Category("MatchLevels")] | |
public class MatchLevels : BaseClass | |
{ | |
[Test] | |
public void ContentMatchLevel() | |
{ | |
//Set the applitools match level to Content |
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
private void ChangeToEuroAndUpdateColor() | |
{ | |
//take the first element with class name et_pb_sum and update the value to what's specified | |
Javascript.ExecuteScript( | |
"document.getElementsByClassName('et_pb_sum')[0].innerText = \"€0\";"); | |
var element = Driver.FindElement(By.TagName("h1")); | |
//Executes some javascript that updates the color of the h1 element on the page to the color specified | |
Javascript.ExecuteScript( | |
"arguments[0].setAttribute('style', 'color:#f9ca33!important')",element); | |
} |
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
public void LayoutMatchLevel() | |
{ | |
//Sets the applitools match leve to Layout | |
Eyes.MatchLevel = MatchLevel.Layout; | |
//Will open the fake pricing page | |
GoToPricingPage(); | |
//Will change the first element to a Euro symbol instead of the $ | |
//and will change the collor to a yellow. | |
ChangeToEuroAndUpdateColor(); | |
//Starts the applitools test with 4 parameters passed in |
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
public void Check(ICheckSettings checkSettings); | |
public void Check(string name, ICheckSettings checkSettings); | |
public void Check(params ICheckSettings[] checkSettings); |
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
public void CheckWindow(TimeSpan matchTimeout, string tag = null); | |
public void CheckWindow(string tag = null); |
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
Eyes.Check(name, | |
Target.Window().Fully().Floating(SocialSharingToolbar, 180, 4035, 0, 17) | |
.Layout(SocialSharingToolbar) | |
.Strict(HeaderLocator)); |