Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue-multiselect に対して Playwirght でマルチセレクトのテストをする #3594

Open
YumaInaura opened this issue Apr 11, 2024 · 0 comments

Comments

@YumaInaura
Copy link
Owner

YumaInaura commented Apr 11, 2024

Playwrightのテスト例

  • 入力欄をクリックして選択肢を表示する
  • 何かマルチセレクトでラベルを選ぶ

という手順でテストできた

await page.locator('.multiselect__placeholder').click()
await page.click('li[role="option"]:has-text("選択肢のテキスト")')

たどり着いた方法

vue-multiselectのあるページのHTMLを見ると色々とclassが割り振られているので、これを使った
他ではこれと思う指定をしても要素が not visible とか言われてうまくいかないケースも多かった

image

参考

https://zenn.dev/yutaroshimamura/scraps/ba88d33c09d4ce

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

https://line.me/ti/g2/eEPltQ6Tzh3pYAZV8JXKZqc7PJ6L0rpm573dcQ

プロフィール・経歴

https://github.com/YumaInaura/YumaInaura

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant