Make logging improvements to the "sb" pytest fixture
Make logging improvements to the sb
pytest fixture
- Fixes pytest html reports with the sb fixture
- Fixes error logs and screenshots with the sb fixture
Also:
- Update Python dependencies
- Update SeleniumBase translations
In case anyone is wondering what the sb
fixture is, it's an alternate form of writing SeleniumBase tests.
Instead of calling from SeleniumBase import BaseCase
, you can pass the sb
fixture directly through test methods, which gain access to all SeleniumBase methods.
Example usage:
import pytest
@pytest.mark.parametrize('value', ["pytest", "selenium"])
def test_sb_fixture_with_no_class(sb, value):
sb.open("https://google.com/ncr")
sb.type('input[title="Search"]', value + '\n')
sb.assert_text(value, "div#center_col")
class Test_SB_Fixture():
@pytest.mark.parametrize('value', ["pytest", "selenium"])
def test_sb_fixture_inside_class(self, sb, value):
sb.open("https://google.com/ncr")
sb.type('input[title="Search"]', value + '\n')
sb.assert_text(value, "div#center_col")