Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は Scalatest でいくつかのセレン テストを作成し、いくつかのスクリーンショットをキャプチャしています。これらのスクリーンショットを scalatest html レポートに表示したいのですが、私にできる最善の方法は、情報提供者を使用してエスケープ文字列を追加することです。このエスケープは、レポートにタグを配置できないことを意味します。私の目的のために HtmlReporter クラスを書き直す必要がありますか、それとも別の方法がありますか?
「info」の代わりに「markup」を使用する必要があると思います。「markup」はエスケープされず、タグに使用できます。HtmlReporter でキャプチャ画像を表示する例を次に示します。
go to ("http://www.artima.com") setCaptureDir("html") // set the capture directory capture to ("MyScreenShot.png") markup("<img src='MyScreenShot.png' />")