-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNavigateToRandomAndSetVariable.tstest.cs
More file actions
58 lines (49 loc) · 1.61 KB
/
NavigateToRandomAndSetVariable.tstest.cs
File metadata and controls
58 lines (49 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using Telerik.TestingFramework.Controls.KendoUI;
using Telerik.WebAii.Controls.Html;
using Telerik.WebAii.Controls.Xaml;
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using ArtOfTest.Common.UnitTesting;
using ArtOfTest.WebAii.Core;
using ArtOfTest.WebAii.Controls.HtmlControls;
using ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts;
using ArtOfTest.WebAii.Design;
using ArtOfTest.WebAii.Design.Execution;
using ArtOfTest.WebAii.ObjectModel;
using ArtOfTest.WebAii.Silverlight;
using ArtOfTest.WebAii.Silverlight.UI;
namespace CodedFilesTest
{
public class NavigateToRandomAndSetVariable : BaseWebAiiTest
{
#region [ Dynamic Pages Reference ]
private Pages _pages;
/// <summary>
/// Gets the Pages object that has references
/// to all the elements, frames or regions
/// in this project.
/// </summary>
public Pages Pages
{
get
{
if (_pages == null)
{
_pages = new Pages(Manager.Current);
}
return _pages;
}
}
#endregion
// Add your test methods here...
[CodedStep(@"Get title and set variable.")]
public void Test1_CodedStep()
{
// Verify element 'FirstHeadingH1Tag' 'is' visible.
Pages.MarcoRubioPresidential.FirstHeadingH1Tag.Wait.ForExists(30000);
VariableContext.SetVariable("RandomArticle", Pages.MarcoRubioPresidential.FirstHeadingH1Tag.BaseElement.TextContent);
}
}
}