Bỏ qua, đến nội dung

openBrowser ​

Mở một URL trong trình duyệt của device.

Command openBrowser mở một URL trong trình duyệt mặc định của device. Để mở link trong app của bạn hoặc xử lý deep link, dùng openLink.

Cú pháp ​

yaml
- openBrowser: https://example.com
# hoặc
- openBrowser:
    url: https://example.com

Tham số ​

Tham sốKiểuMô tả
urlStringBắt buộc. URL cần mở.

Hành vi theo nền tảng ​

  • Android: bắt đầu một intent VIEW cho URL (am start -a android.intent.action.VIEW).
  • iOS: mở URL trên device qua WebDriverAgent.

URL rỗng làm step fail.