問題タブ [end-to-end]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
4022 参照

javascript - 物体 # has no method 'getInstance' when trying to run Protractor tests

When I am attempting to run my Protractor tests from the command line all of my tests fail because whenever I try to access the protractor object i

When I am attempting to run my Protractor tests from the command line all of my tests fail because whenever I try to access the protractor object it does not have the methods I need. The exact error is:

TypeError: Object # has no method 'getInstance'

So this seems to have been a reported and fixed issue, yet I cannot seem to resolve my particular situation. It also seems to be semi-related to this question, but because it arose for me after updating my node_modules I feel like my underlying issue is different. Up until updating my Protractor everything worked just fine.

I installed it globally and used npm link protractor to link my local instance to my global instance (located at /usr/local/lib/node_modules/protractor), but I still for the life of me cannot figure out what is wrong.

The exact code where I'm calling protractor is a page object file that looks like:

The code instantiating the page object is as follows:


Pass the url name in the url template tag:

0 投票する
4 に答える
11956 参照

javascript - 分度器を使用してすべての要素属性を取得する

ドキュメントによると、名前で単一の属性を取得する.getAttribute()には、次のように使用できWebElementます。

しかし、要素が持つすべての属性を取得するにはどうすればよいでしょうか?

分度器 APIには、このユースケース/機能に関する情報はありません。

0 投票する
4 に答える
491 参照

html - が無効になっているかどうかを確認する方法

0 投票する
3 に答える
5898 参照

angularjs - 分度器のタイムアウトまたは失敗したテストを再実行します

失敗したテストを(分度器を使用して)再実行する可能性についての参照は見つかりませんでした。その方法を知っていますか?たくさんのテストがあり、以前に失敗したテストが成功したかどうかを確認するためにすべてのテストを再実行したくないので、それは素晴らしいことです。

誰もそれを経験したことがありますか?これは次のようになります。

  • すべてのテストを実行する
  • 失敗したテストを収集し、それらを再度実行します (おそらく、2 回または 3 回のように再試行制限を設定できます)
  • 結果を表示
0 投票する
1 に答える
3649 参照

angularjs - 分度器: フィールドのフォーカスのテスト

入力フィールドが分​​度器でフォーカスされているかどうかをテストするにはどうすればよいですか? 私はこれをやっています:

これは chrome で動作するようですが、このテストは Firefox で失敗します。何か案は?

これは失敗メッセージです:

これが私のテストスクリプトです:

0 投票する
3 に答える
3717 参照

javascript - 分度器: データが日付順にソートされていることを確認する

返されたデータが日付順にソートされていることを確認する必要があります。これは私がそれを書いている方法です:

これは以下を返します:

私は何を間違っていますか?currentUser と lastUser は、テキストではなくオブジェクトのように見えます...しかし、その理由はわかりません。

0 投票する
1 に答える
1928 参照

javascript - 分度器 + 角度エラー - 要素はポイントでクリックできません

分度器と角度を使用してモーダル ウィンドウの表示ボタンをテストしようとすると、次のエラーが表示されます。

UnknownError: 不明なエラー: ポイント (400、234) で要素をクリックできません。他の要素はクリックを受け取ります: <div class="modal-footer">...</div>'.

各ステートメントの前にウィンドウのサイズをより大きなサイズに変更しようとしました。また、クリックする前にページの上部にスクロールしようとしました。助言がありますか?

コード:

ほとんどの HTML: