You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(See <ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/boilerplates/classic_obj_test.py">examples/boilerplates/classic_obj_test.py</a> for the full test.)
135
+
(See <ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/boilerplates/samples/swag_labs_test.py">examples/boilerplates/samples/swag_labs_test.py</a> for the full test.)
136
136
137
137
<h3><imgsrc="https://seleniumbase.io/img/green_logo.png"title="SeleniumBase"width="32" /> 6. The classic Page Object Model with the <code>sb</code> pytest fixture</h3>
138
138
139
139
This is similar to the classic Page Object Model with <code>BaseCase</code> inheritance, except that this time we pass the <code>sb</code> pytest fixture from the test into the <code>sb</code> arg of the page object class method, (instead of passing <code>self</code>). Now that you're using <code>sb</code> as a pytest fixture, you no longer need to import <code>BaseCase</code> anywhere in your code. See the example below:
(See <ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/boilerplates/sb_fixture_test.py">examples/boilerplates/sb_fixture_test.py</a> for the full test.)
158
+
(See <ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/boilerplates/samples/sb_swag_test.py">examples/boilerplates/samples/sb_swag_test.py</a> for the full test.)
159
159
160
160
<h3><imgsrc="https://seleniumbase.io/img/green_logo.png"title="SeleniumBase"width="32" /> 7. Using the <code>request</code> fixture to get the <code>sb</code> fixture (no class)</h3>
0 commit comments