Chào các bạn đã đến với chủ đề tiếp theo của mình. Ở topic này, mình sẽ tổng hợp lại các keyword được dùng để verify trong Katalon.
Nội dung
- 1. [WebUI] Verify Alert Not Present
- 2. [WebUI] Verify Alert Present
- 3. [WebUI] Verify Element Attribute Value
- 4. [WebUI] Verify Element Checked
- 5. [WebUI] Verify Element Not Checked
- 6. [WebUI] Verify Element Clickable
- 7. [WebUI] Verify Element Not Clickable
- 8. [WebUI] Verify Element Has Attribute
- 9. [WebUI] Verify Element Not Has Attribute
- 10. [WebUI] Verify Element Present
- 11. [WebUI] Verify Element Not Present
- 12. [WebUI] Verify Element Visible
- 13. [WebUI] Verify Element Not Visible
- 14. [WebUI] Verify Element Text
- 15. [WebUI] Verify Text Present
- 16. [WebUI] Verify Text Not Present
- 17. [WebUI] Verify Equal
- 18. Kết
1. [WebUI] Verify Alert Not Present
- Keyword này dùng để kiểm tra rằng alert không có hiển thị trên web page

- Ví dụ: verify if an alert is NOT present in 20 seconds.

2. [WebUI] Verify Alert Present
- Keyword này dùng để kiểm tra rằng alert đang hiển thị trên web page

- Ví dụ: verify if an alert is present in 20 seconds.

3. [WebUI] Verify Element Attribute Value
- Keyword này dùng để kiểm tra rằng Web element đang tồn tại attribute name và attribute value

- Ví dụ: verify if ‘Make Appointment’ button has attribute id with value: ‘btnMakeAppointment’ (https://katalon-demo-cura.herokuapp.com/)

4. [WebUI] Verify Element Checked
- Keyword này dùng để kiểm tra rằng checkbox/radio button hiện tại đang được checked/selected.

- Ví dụ: verify if the ‘Medicaid’ checkbox is checked in 10 seconds timeout. (https://katalon-demo-cura.herokuapp.com/)

5. [WebUI] Verify Element Not Checked
- Keyword này dùng để kiểm tra rằng checkbox/radio button hiện tại đang KHÔNG được checked/selected.

- Ví dụ: verify ‘Medicaid’ checkbox is NOT checked in 10 seconds. (https://katalon-demo-cura.herokuapp.com/)

6. [WebUI] Verify Element Clickable
- Keyword này dùng để kiểm tra rằng Button hiện tại có thể click hay không. Nói 1 cách dễ hiểu hơn là dùng để verify button Enable

- Ví dụ: verify if ‘Make Appointment’ button is clickable. (https://katalon-demo-cura.herokuapp.com/)

7. [WebUI] Verify Element Not Clickable
- Keyword này dùng để kiểm tra rằng Button hiện tại Disable.
- Lưu ý: Keyword này chỉ works với Web Element có thẻ tag html là input + attribute = disabled


- Ví dụ: Verify if ‘Make Appointment’ button is NOT clickable. (https://katalon-demo-cura.herokuapp.com/)

8. [WebUI] Verify Element Has Attribute
- Keyword này dùng để kiểm tra rằng Web element đang tồn tại attribute name

- Ví dụ: verify ‘Make Appointment’ button doesn’t have attribute ‘href’. (https://katalon-demo-cura.herokuapp.com/)

9. [WebUI] Verify Element Not Has Attribute
- Keyword này dùng để kiểm tra rằng Web element đang Không tồn tại attribute name

- Ví dụ: verify ‘Make Appointment’ button doesn’t have attribute ‘href’ . (https://katalon-demo-cura.herokuapp.com/)

10. [WebUI] Verify Element Present
- Keyword này dùng để kiểm tra rằng Web element đang tồn tại DOM (F12). Lưu ý, tồn tại trong DOM không có nghĩa là nó đang hiển thị trên WebUI

- Ví dụ: verify ‘Make Appontment’ button is present. (https://katalon-demo-cura.herokuapp.com/)

11. [WebUI] Verify Element Not Present
- Keyword này dùng để kiểm tra rằng Web element Không tồn tại DOM (F12).

- Ví dụ: verify ‘Make Appointment’ button is not present. (https://katalon-demo-cura.herokuapp.com/)

12. [WebUI] Verify Element Visible
- Keyword này dùng để kiểm tra rằng Web element đang hiển thị trên WebUI

- Ví dụ: verify ‘btn_Login’ button to be visible in 10 seconds. (https://katalon-demo-cura.herokuapp.com/profile.php#login)

13. [WebUI] Verify Element Not Visible
- Keyword này dùng để kiểm tra rằng Web element Không hiển thị trên WebUI

- Ví dụ: verify ‘Make Appointment’ button is not visible on DOM. (https://katalon-demo-cura.herokuapp.com/)

14. [WebUI] Verify Element Text
- Keyword này dùng để kiểm tra element text

- Ví dụ: verify ‘Make Appointment’ button has the correct ‘Make Appointment’ label (https://katalon-demo-cura.herokuapp.com/)

15. [WebUI] Verify Text Present
- Keyword này dùng để kiểm tra rằng đoạn text tồn tại ở bất cứ nào trong page source (F12)
- Lưu ý: không nên dùng keyword này để verify text trong project

- Ví dụ: verify if the text “Login successfully” presents in the current page. (https://katalon-demo-cura.herokuapp.com/)

16. [WebUI] Verify Text Not Present
- Keyword này dùng để kiểm tra rằng đoạn text Không tồn tại ở bất cứ nào trong page source (F12)

- Ví dụ: if the text “Login unsuccessfully” is not present in the current page. (https://katalon-demo-cura.herokuapp.com/)

17. [WebUI] Verify Equal
- Verify if two object are equal.

- Ví dụ: verify if two object are equal.

18. Kết
Như vậy chúng ta đã tìm hiểu qua 1 số keyworks dùng để verify trong Katalon. Cảm ơn các bạn đã theo dõi bài viết của mình. Chúc các bạn thành công.
Hẹn gặp lại các bạn ở những chủ đề tiếp theo. Bái bai.
Bài viết được mình tham khảo từ Katalon doc: https://docs.katalon.com/docs/katalon-studio-enterprise/keywords/web-ui-keywords/webui-accept-alert