Can not find textcontent on firefox, chrome

2 posts, 0 answers
  1. Ha
    Ha avatar
    22 posts
    Member since:
    Apr 2012

    Posted 11 May 2012 Link to this post

    Case
    Step:
    - Add 1 sheet
    - Back to sheet list screen
    Expected result:
    - Sheet name is displayed on list
    (Ref below image)
    *****Customize code
    Public Sub test_CodedStep()
           Dim control_sheet_name as HtmlControl= Find.ByContent(of htmlControl)(Data("Col1").ToString())
                      if control_sheet_name isNot nothing then
                                'control_sheet_name.click(false)  
                                log.WriteLine(Data("Col1").ToString()&""&"is existence")
                                MessageBox.Show("Sheet name"&Data("Col1").ToString()& "is found","Information message")
                                
                        else
                                MessageBox.Show("Sheet name" &Data("Col1").ToString()&"is not found","Error message")               
                        end if  
                
            End Sub

            <CodedStep("Verify 'TextContent' 'Contains' 'A5' on 'A5PTag'")> _
            Public Sub test_CodedStep1()
                'Verify 'TextContent' 'Contains' 'A5' on 'A5PTag'
                'Pages.InachisGtMediaAnd1.A5PTag.AssertContent().TextContent(ArtOfTest.Common.StringCompareType.Contains, "A5")
                            Dim control_sheet_type as HtmlControl= Find.ByContent(of htmlControl)(Data("Col3").ToString())
                                    
                                    if control_sheet_type isNot nothing then
                                            'control_sheet_name.click(false)  
                                            log.WriteLine(Data("Col3").ToString()&" is existence")
                                            MessageBox.Show("Sheet type is found","Information message")
                                            
                                    else
                                            MessageBox.Show("Sheet type is not found","Error message")
                                        
                                    end if  
            End Sub
    ********************

  2. Byron
    Admin
    Byron avatar
    184 posts

    Posted 11 May 2012 Link to this post

    Hello Ha,

    Failure locating elements is a common testing challenge in Test Studio. You can find some of our most common troubleshooting approaches here. We will need some additional information to properly isolate your issue. The trace log you provided contains limited information related to your test, so if possible please provide a copy of the failed test log, the complete test log, and a snapshot of the DOM tree. You can export these documents using the Export Result to File icon in the Step Failure Details dialog

    Thanks for providing us with the information we need to help resolve your issue.

    All the best,
    Byron
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top