LoginSignup
1
1

More than 5 years have passed since last update.

SiestaでExt.Msg.alertのボタンをタップ

Posted at

SiestaでSencha Touch用のアプリのテストを書いててハマったのでメモ。
色々と試行錯誤した結果、下記で動いた。

t.chain(
    {
        action: 'waitFor',
        target: function () {
            return t.Ext().Viewport.query('button[itemId=ok]')[0].getContentEl();
        }
    },
    {
        tap: '>> button[itemId=ok]'
    },
    {
        action: 'waitFor',
        target: function () {
            return t.Ext().Viewport.query('button[itemId=ok]')[0].getContentEl();
        }
    }
);

1つ目のwaitForでt.Ext().Viewport.query('button[itemId=ok]')を指定しても、tapさせると要素がいないって言われることがあったので、getContentEl()で要素を待つことにしてみた。

画面上にbutton[itemId=ok]な人がひとつしか無いからこれで動いてるけど、ちょっと気持ち悪い。。。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1