This is a migrated thread and some comments may be shown as answers.

Can not find textcontent on firefox, chrome

1 Answer 77 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ha
Top achievements
Rank 1
Ha asked on 11 May 2012, 08:07 AM
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
********************

1 Answer, 1 is accepted

Sort by
0
Byron
Telerik team
answered on 11 May 2012, 09:27 PM
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
Tags
General Discussions
Asked by
Ha
Top achievements
Rank 1
Answers by
Byron
Telerik team
Share this question
or