Hitachi

JP1 Version 13 JP1/Integrated Management 3 - Manager コマンド・定義ファイル・APIリファレンス


Webシナリオファイル(任意の名前.spec.ts)

〈このページの構成〉

形式

spec.tsファイル形式で記述します。

import { test, expect } from '@playwright/test';
 
test.use({
  locale: 'ja-JP'
});
 
test('test', async ({ page }) => {
  await page.goto('http://ホスト名:20703/login');
  await page.locator('input[name="username"]').fill('ユーザー名');
  await page.locator('input[name="password"]').fill('パスワード');
  await page.getByRole('button', { name: 'ログイン' }).click();
  await expect(page.getByRole('button', { name: 'ログアウト' })).toBeVisible();
  await page.getByRole('button', { name: 'ログアウト' }).click();
  await expect(page.getByRole('button', { name: 'ログイン' })).toBeVisible();
});

ファイル

任意の名前.spec.ts

ファイル名に使用できる文字を次に示します。これ以外の文字を使用したファイル名では,Webシナリオ監視機能による監視はできません。

格納先ディレクトリ

■統合エージェントホスト

Windowsの場合

  • 物理ホストのとき

    Agentパス\lib\playwright\tests\

  • 論理ホストのとき

    共有フォルダ\jp1ima\lib\playwright\tests\

説明

Webシナリオ監視機能で使用するWebシナリオが記述されたファイルです。

Webシナリオファイルは,playwright codegenコマンドによって作成され,Webシナリオ実行時に使用されます。

このファイルは編集できません。

文字コード

UTF-8(BOM無し)

改行コード

CR+LFまたはLF

定義の反映時期

Web exporterによるWebシナリオ実行時に反映されます。