Results 1 to 3 of 3

Thread: Clicking on Splitbutton and selecting an option from the dropdown Menu

  1. #1
    Sencha User
    Join Date
    Jun 2017
    Location
    Chennai
    Posts
    11

    Default Answered: Clicking on Splitbutton and selecting an option from the dropdown Menu

    Hi,

    I have an ADD splitbutton in a tabbar, clicking on which would display the user with few options in a menu.
    I am unable to click on the splitbutton - getting Timeout waiting for Target (menuitem[text="Technology"])



    scope:this,text:'Add',value:1,iconCls:'fa fa-plus',
    menu: [{
    text:'Technology


    Any solution means a lot to me Add.PNG

  2. Please try this example:

    Code:
    // Scenario URL: http://examples.sencha.com/extjs/6.6.0/examples/kitchensink/?classic#toolbar-menus
    
    describe('Split Button', function() {
        it('should click the menu part of the Split Button and show the menu', function() {
            // Click the split button's "arrow"
            ST.element('splitbutton[text=Split Button] => .x-btn-arrow-el')
                .click();
    
            // Check menu is visible
            ST.component('menu[hidden=false]')
                .visible();
        });
        
        it('should click a menu item in the menu', function() {
            // Click a menu item
            ST.component('menuitem[text=Extellent!]')
                .click();
                
            // Check menu item was clicked
            ST.component('toast[title=Menu Click]')
                .visible()
                .textLike('You clicked the "Extellent!" menu item');
        });   
    });

  3. #2
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    Redwood City, CA
    Posts
    331
    Answers
    51

    Default

    Please try this example:

    Code:
    // Scenario URL: http://examples.sencha.com/extjs/6.6.0/examples/kitchensink/?classic#toolbar-menus
    
    describe('Split Button', function() {
        it('should click the menu part of the Split Button and show the menu', function() {
            // Click the split button's "arrow"
            ST.element('splitbutton[text=Split Button] => .x-btn-arrow-el')
                .click();
    
            // Check menu is visible
            ST.component('menu[hidden=false]')
                .visible();
        });
        
        it('should click a menu item in the menu', function() {
            // Click a menu item
            ST.component('menuitem[text=Extellent!]')
                .click();
                
            // Check menu item was clicked
            ST.component('toast[title=Menu Click]')
                .visible()
                .textLike('You clicked the "Extellent!" menu item');
        });   
    });
    Daniel Gallo
    Senior Solutions Architect
    Sencha Inc.

  4. #3
    Sencha User
    Join Date
    Jun 2017
    Location
    Chennai
    Posts
    11

    Default

    Hi Daniel,

    Thank you so much for helping me out. It works!!



    Regards,
    Bharathy.

Similar Threads

  1. Selecting value of combobox hides dropdown menu
    By Robind in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 22 Apr 2015, 12:40 AM
  2. pre-selecting value from dropdown (Combo box) in extjs?
    By mahesh2684 in forum Ext 3.x: Help & Discussion
    Replies: 9
    Last Post: 3 Jul 2014, 12:25 PM
  3. Tabs that show dropdown menus when clicking on it
    By spor in forum Ext 3.x: Help & Discussion
    Replies: 9
    Last Post: 16 Mar 2010, 5:13 AM
  4. Selecting dropdown lists in with Watin
    By svendster in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 11 Sep 2008, 10:34 AM
  5. Replies: 2
    Last Post: 18 Jul 2008, 6:08 AM

Posting Permissions

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