Skip to content

Commit a7a2eac

Browse files
committed
Update example tests
1 parent e710ef2 commit a7a2eac

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/test_swag_labs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ def test_swag_labs_basic_flow(self):
4848

4949
# Checkout - Add info
5050
self.click("link=CHECKOUT")
51-
self.assert_exact_text("Checkout: Your Information", "div.subheader")
51+
self.assert_text("Checkout: Your Information", "div.subheader")
5252
self.assert_element("a.cart_cancel_link")
5353
self.type("#first-name", "SeleniumBase")
5454
self.type("#last-name", "Rocks")
5555
self.type("#postal-code", "01720")
5656

5757
# Checkout - Overview
5858
self.click("input.btn_primary")
59-
self.assert_exact_text("Checkout: Overview", "div.subheader")
59+
self.assert_text("Checkout: Overview", "div.subheader")
6060
self.assert_element("link=CANCEL")
6161
self.assert_text(item_name, "div.inventory_item_name")
6262
self.assert_text(item_price, "div.inventory_item_price")

examples/upload_file_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
""" Testing the self.choose_file() method. """
2+
13
import os
24
from seleniumbase import BaseCase
35

46

57
class FileUploadButtonTests(BaseCase):
68

7-
""" The main purpose of this is to test the self.choose_file() method. """
8-
99
def test_file_upload_button(self):
1010
self.open("https://www.w3schools.com/jsref/tryit.asp"
1111
"?filename=tryjsref_fileupload_get")
@@ -15,7 +15,7 @@ def test_file_upload_button(self):
1515
self.add_css_style(zoom_in)
1616
self.highlight('input[type="file"]')
1717
dir_name = os.path.dirname(os.path.abspath(__file__))
18-
file_path = dir_name + "/example_logs/screenshot.png"
18+
file_path = os.path.join(dir_name, "example_logs/screenshot.png")
1919
self.choose_file('input[type="file"]', file_path)
2020
self.demo_mode = True # Adds highlighting to the assert statement
2121
self.assert_element('input[type="file"]')

0 commit comments

Comments
 (0)