|
using System;
using System.Web;
using System.Diagnostics;
using NUnit.Framework;
using System.Threading;
using AutomatedTests;
namespace AutomatedTests
{
[TestFixture]
public class ScrollingTests
{
public AutomatedSampleApp SampleApp = Global.AutomatedSampleApp;
[SetUp]
public void Init()
{
SampleApp.Init();
}
[Test]
public void ScrollingTest()
{
//select radio buttons and check output
SampleApp.mainPage.Scrolling.Click();
SampleApp.scrollView.Radio1.SetRadioButtonValue("True");
SampleApp.scrollView.Radio2.SetRadioButtonValue("True");
Thread.Sleep(100);
SampleApp.scrollView.Some_Button.Click();
Assert.AreEqual("Radio1 is True\r\nRadio2 is True\r\nRadio3 is False\r\nRadio4 is False\r\nRadio5 is False\r\nRadio6 is False",
SampleApp.scrollView.Report.GetTextBlockString(), "Incorrect output text");
}
[Test]
public void EnableTest()
{
//Set other radio buttons
SampleApp.mainPage.Scrolling.Click();
SampleApp.scrollView.Enable_Section.SetCheckBoxValue("True");
SampleApp.scrollView.Radio6.Click(); // cause it to scroll down
SampleApp.scrollView.Radio6.SetRadioButtonValue("True");
SampleApp.scrollView.Some_Button.Click();
Assert.AreEqual("Radio1 is False\r\nRadio2 is False\r\nRadio3 is False\r\nRadio4 is False\r\nRadio5 is False\r\nRadio6 is True",
SampleApp.scrollView.Report.GetTextBlockString(), "Incorrect output text");
//disable section and try to set radio button
SampleApp.scrollView.Enable_Section.SetCheckBoxValue("False");
SampleApp.scrollView.Radio1.SetRadioButtonValue("True");
SampleApp.scrollView.Some_Button.Click();
Assert.AreEqual("Radio1 is True\r\nRadio2 is False\r\nRadio3 is False\r\nRadio4 is False\r\nRadio5 is False\r\nRadio6 is False",
SampleApp.scrollView.Report.GetTextBlockString(), "Incorrect output text");
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.