Imports Telerik.WebAii.Controls.Html
Imports Telerik.WebAii.Controls.Xaml
Imports System
Imports System.Collections.Generic
Imports System.Text

Imports ArtOfTest.Common.UnitTesting
Imports ArtOfTest.WebAii.Core
Imports ArtOfTest.WebAii.Controls.HtmlControls
Imports ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts
Imports ArtOfTest.WebAii.Design
Imports ArtOfTest.WebAii.Design.Execution
Imports ArtOfTest.WebAii.ObjectModel
Imports ArtOfTest.WebAii.Silverlight
Imports ArtOfTest.WebAii.Silverlight.UI


    '
    ' You can add custom execution steps by simply
    ' adding a 'Sub' routine and decorating it with the <CodedStep("Description")>
    ' attribute to the test method. 
    ' Those steps will automatically show up in the test steps on save.
    '
    ' The BaseWebAiiTest exposes all key objects that you can use
    ' to access the current testcase context. [i.e. ActiveBrowser, Find ..etc]
    '
    ' Data driven tests can use the Data(columnIndex) or Data("columnName") 
    ' to access data for a specific data iteration.
    '
    ' Example:
    '
    ' <CodedStep("MyCustom Step Description")> Public Sub MyTestMethod()
    ' 
    '       // Custom code goes here
    '      ActiveBrowser.NavigateTo("http://www.google.com")
    '
    '       // Or
    '       ActiveBrowser.NavigateTo(Data("url"))
    '
    ' End Sub
    '
    Public Class Non_Modal_Pop_up_Template
        Inherits BaseWebAiiTest

#Region "[ Dynamic Pages Reference ]"

        Private _pages As Pages
        
        '''<summary>
        ''' Gets the Pages object that has references
        ''' to all the elements, frames or regions
        ''' in this project.
        '''</summary>
        Public ReadOnly Property Pages() As Pages
            Get
                If (_pages Is Nothing) Then
                    _pages = New Pages(Manager.Current)
                End If
                Return _pages
            End Get
        End Property
        
#End Region


        <CodedStep("Click 'TradeInValueSpan'")> _
        Public Sub Test_1_CodedStep()
            'Click 'TradeInValueSpan'
            Pages.FordCarsSUVsTrucks.TradeInValueSpan.Click(false)
            
        End Sub

        <CodedStep("Set 'Txt3DigitPhone1Text' text to '313'")> _
        Public Sub NonModal_Popup_Template_CodedStep()
            'Set 'Txt3DigitPhone1Text' text to '313'
            Pages.YourContactInformation_2.Txt3DigitPhone1Text.Text = "313"
            
        End Sub


        <CodedStep("Set 'Txt3AreaPhone1Text' text to '517'")> _
        Public Sub NonModal_Popup_Template_CodedStep2()
            'Set 'Txt3DigitPhone1Text' text to '313'
            Pages.YourContactInformation_2.TxtAreaPhone1Text.Text = "517"
            
        End Sub

        '<CodedStep("Verify element 'LblPhone1MsgSpan' 'is not' visible.")> _
        'Public Sub NonModal_Popup_Template_CodedStep3()
            ''Verify element 'LblPhone1MsgSpan' 'is not' visible.
            'Dim LblPhone1MsgSpan As HtmlSpan = Pages.YourContactInformation_1.LblPhone1MsgSpan
            'LblPhone1MsgSpan.Wait.ForExists(5000)
            'Assert.IsFalse(LblPhone1MsgSpan.IsVisible)
            
        'End Sub

        <CodedStep("Verify element 'LblPhone1MsgSpan' 'is not' visible.")> _
        Public Sub NonModal_Popup_Template_CodedStep1()
            'Verify element 'LblPhone2MsgSpan' 'is not' visible.
            Dim LblPhone1MsgSpan As HtmlSpan = Pages.YourContactInformation_1.LblPhone1MsgSpan
            LblPhone1MsgSpan.Wait.ForExists(5000)
            Assert.IsFalse(LblPhone1MsgSpan.IsVisible)
            
        End Sub

        '<CodedStep("Verify element 'EnEspañolLink' 'is' visible.")> _
        'Public Sub NonModal_Popup_Template_CodedStep3()
            ''Verify element 'EnEspañolLink' 'is' visible.
            'Dim EnEspañolLink As HtmlAnchor = Pages.FordCarsSUVsTrucks.EnEspañolLink
            'EnEspañolLink.Wait.ForExists(5000)
            'Assert.IsTrue(EnEspañolLink.IsVisible)
            
        'End Sub
    End Class