Results 1 to 3 of 3

Thread: Accessing <h3> tag to test its text

  1. #1
    Sencha User
    Join Date
    Mar 2020
    Posts
    13
    Answers
    1

    Default Answered: Accessing <h3> tag to test its text

    I have been trying to write a test to make sure that the h3 in the 'About' panel has the title "Welcome to the Catalog" as shown in the screen print.

    Annotation 2020-03-30 121039.jpg

    I have written the beginnings of the test but how do I make sure the panel states the correct heading "Welcome to the Catalog"? I think I need it to look at the html but I am not sure how to do this.

    Code:
    it('should make sure the correct heading is showing in the panel', function() {
            ST.panel('content panel[title="About"]:visible')
            .visible();
         });
    Many thanks for any help.

  2. Please try the following:

    Code:
    ST.element('panel[title="About"]:visible => h3')
        .text('Welcome to the Catalog');

  3. #2
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    London, England
    Posts
    395
    Answers
    75

    Default

    Please try the following:

    Code:
    ST.element('panel[title="About"]:visible => h3')
        .text('Welcome to the Catalog');
    Daniel Gallo
    Sales Engineer
    Sencha

  4. #3
    Sencha User
    Join Date
    Mar 2020
    Posts
    13
    Answers
    1

    Default

    That worked perfectly.

    Many thanks Daniel!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •