Skip to content

Commit 0e6f27e

Browse files
authored
make example py2 compatible
1 parent 278270c commit 0e6f27e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

examples/selenium-requests/features/steps/selenium_steps.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
from urllib.parse import urljoin
1+
try:
2+
from urllib.parse import urljoin
3+
except ImportError:
4+
from urlparse import urljoin
5+
26
from behave import *
37
from behave_webdriver.steps import *
48

@@ -16,4 +20,4 @@ def send_request_page(context, method, page):
1620

1721
@then('I expect the response text contains "{text}"')
1822
def check_response_text_contains(context, text):
19-
assert text in context.response.text
23+
assert text in context.response.text

0 commit comments

Comments
 (0)