Problem with Alert in the Selenium IDE

后端 未结 2 1382
独厮守ぢ
独厮守ぢ 2021-01-25 14:09

How can I do to verify or assert an alert with a message that contains a variable in this text?

For example, I have to capture a alert with this message: Answer numbe

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-25 14:34

    to simulate the click in the buton OK you could use command assertAlert - Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail.

提交回复
热议问题