File tree Expand file tree Collapse file tree 4 files changed +27
-3
lines changed Expand file tree Collapse file tree 4 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ def test_swag_labs(self):
2222 self .click ("input#continue" )
2323 self .assert_text ("CHECKOUT: OVERVIEW" )
2424 self .assert_text ("Backpack" , "div.cart_item" )
25+ self .assert_text ("29.99" , "div.inventory_item_price" )
2526 self .click ("button#finish" )
2627 self .assert_exact_text ("THANK YOU FOR YOUR ORDER" , "h2" )
2728 self .assert_element ('img[alt="Pony Express"]' )
Original file line number Diff line number Diff line change 1+ """Call a file with "python" instead of using "pytest" directly.
2+ To run, use: "python raw_file_call.py".
3+ Works by using pytest.main([__file__])."""
4+ from seleniumbase import BaseCase
5+
6+ if __name__ == "__main__" :
7+ from pytest import main
8+
9+ main ([__file__ ])
10+
11+
12+ class TinyMceTest (BaseCase ):
13+ def test_tinymce (self ):
14+ self .open ("https://seleniumbase.io/tinymce/" )
15+ self .wait_for_element ("div.mce-container-body" )
16+ self .click ('span:contains("File")' )
17+ self .click ('span:contains("New document")' )
18+ self .click ('span:contains("Paragraph")' )
19+ self .click ('span:contains("Heading 1")' )
20+ with self .frame_switch ("iframe" ):
21+ self .add_text ("#tinymce" , "SeleniumBase!" )
22+ self .highlight ("#tinymce" )
23+ self .switch_to_default_content ()
24+ self .post_message ("SeleniumBase is the best!" )
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def test_tinymce(self):
1414 self .switch_to_default_content ()
1515 self .click ("button i.mce-i-image" )
1616 self .type ('input[aria-label="Width"].mce-textbox' , "300" )
17- image_url = "https://seleniumbase.io/img/sb_logo_10.png"
17+ image_url = "https://seleniumbase.github. io/img/sb_logo_10.png"
1818 self .type ("input.mce-textbox" , image_url + "\n " )
1919 self .switch_to_frame ("iframe" )
2020 self .click ("h2" )
Original file line number Diff line number Diff line change 1- """ Testing the self.choose_file() and self.assert_attribute() methods. """
2-
1+ """Testing the self.choose_file() and self.assert_attribute() methods."""
32import os
43from seleniumbase import BaseCase
54
You can’t perform that action at this time.
0 commit comments