私は自動化テストを行っています。私たちのアプリケーションでは、すべてのエラーメッセージはページの上に「フラッシュメッセージ」として表示され、数秒間表示されます。これらのメッセージは、「次へ」ボタンまたは「送信」ボタンをクリックした後に表示されます。ページに表示される "Flash Message"エラーを確認する方法
その要素を見つけることはできません。要素パスはその瞬間にのみ表示されるからです。確認できません。そのエラーが表示さ
、私はエラーのHTMLをコピーし、HTMLは以下のようになります:
<document>
<html class="no-js" dir="ltr">
<!--<![endif]-->
<head>
<body class="alert-open alert-with-am-fade-and-slide-top">
<div class="page-wrapper">
<spinner-overlay>
<navbar-panel class="ng-scope">
<div class="container-main">
<alerts-container class="alert-container">
<div class="alert ng-scope top am-fade-and-slide-top alert-danger" ng-class="[type ? 'alert-' + type : null]" style="display: block;">
<!-- ngIf: dismissable -->
<!-- ngIf: content | isArray:false -->
<div class="ng-scope" ng-if="content | isArray:false">
<strong class="ng-binding" ng-bind="::title">Error[![enter image description here][1]][1]</strong>
<span class="ng-binding" ng-bind-html="content"/>
</div>
<!-- end ngIf: content | isArray:false -->
<!-- ngIf: content | isArray -->
</div>
</alerts-container>
<!-- /page wrapper -->
</div>
要素パスは以下のようにのようになります。
html/body/div[1]/alerts-container/div/div
は画像をご覧下さい添付。
このエラーが表示されるかどうかは、Selenium Scriptで確認する方法を教えてください。私の心に来る Sarada
非常に申し訳ありませんが、私はあなたの答えを完全に理解できませんでした。詳しく説明してください。 –
ここでもう一つ質問したいのは、セレンのwebdriverでanglejを使うことができるかどうかです。 –
これはコメントよりも長いです、私はメインの投稿を編集します – Reza