From 5690305e572183d064114e82f41f771d306240da Mon Sep 17 00:00:00 2001 From: ThankNgan Date: Sat, 11 Oct 2025 18:08:55 +0700 Subject: [PATCH] Upload BT Buoi1 --- ThanhNgan/BT_Buoi1/test_bai_tap.py | 23 + ThanhNgan/Reports/BT_Buoi1/report.html | 1091 ++++++++++++++++++++++++ 2 files changed, 1114 insertions(+) create mode 100644 ThanhNgan/BT_Buoi1/test_bai_tap.py create mode 100644 ThanhNgan/Reports/BT_Buoi1/report.html diff --git a/ThanhNgan/BT_Buoi1/test_bai_tap.py b/ThanhNgan/BT_Buoi1/test_bai_tap.py new file mode 100644 index 0000000..0589616 --- /dev/null +++ b/ThanhNgan/BT_Buoi1/test_bai_tap.py @@ -0,0 +1,23 @@ +""" +Viết file mới test_bai_tap.py để: +1️⃣ Truy cập vào trang web yêu thích (ví dụ: shopee.vn, vnexpress.net, công ty bạn). +2️⃣ Kiểm tra tiêu đề trang có đúng mong đợi. +3️⃣ Kiểm tra URL trang web. +""" +from playwright.sync_api import Page, expect +import re + +def test_check_title(page: Page): + print("Mở trình duyệt shopee...") + + page.goto("https://www.apple.com/vn/") + + # Check title + expect(page).to_have_title(re.compile(r'Apple \(Việt Nam\)')) + print("Title is correct") + + # Check url + expect(page).to_have_url(re.compile('https://www.apple.com/vn/')) + print("URL is correct") + + diff --git a/ThanhNgan/Reports/BT_Buoi1/report.html b/ThanhNgan/Reports/BT_Buoi1/report.html new file mode 100644 index 0000000..d6aabb7 --- /dev/null +++ b/ThanhNgan/Reports/BT_Buoi1/report.html @@ -0,0 +1,1091 @@ + + + + + report.html + + + + +

report.html

+

Report generated on 11-Oct-2025 at 18:05:18 by pytest-html + v4.1.1

+
+

Environment

+
+
+ + + + + +
+
+

Summary

+
+
+

1 test took 00:00:03.

+

(Un)check the boxes to filter the results.

+
+ +
+
+
+
+ + 0 Failed, + + 1 Passed, + + 0 Skipped, + + 0 Expected failures, + + 0 Unexpected passes, + + 0 Errors, + + 0 Reruns +
+
+  /  +
+
+
+
+
+
+
+
+ + + + + + + + + +
ResultTestDurationLinks
+ + + \ No newline at end of file