Merge pull request #702 from seleniumbase/convert-int-to-str-before-typing-text

Convert int/float inputs to strings before typing text
This commit is contained in:
Michael Mintz 2020-09-22 11:19:56 -04:00 committed by GitHub
commit 57faf6f8a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -58,7 +58,7 @@ coverage==5.3
brython==3.8.10
pyotp==2.4.0
boto==2.49.0
cffi==1.14.2
cffi==1.14.3
rich==7.0.0;python_version>="3.6" and python_version<"4.0"
flake8==3.7.9;python_version<"3.5"
flake8==3.8.3;python_version>="3.5"

View File

@ -377,6 +377,8 @@ class BaseCase(unittest.TestCase):
if not self.demo_mode and not self.slow_mode:
self.__scroll_to_element(element, selector, by)
pre_action_url = self.driver.current_url
if type(text) is int or type(text) is float:
text = str(text)
try:
if not text.endswith('\n'):
element.send_keys(text)

View File

@ -54,7 +54,7 @@ if sys.argv[-1] == 'publish':
setup(
name='seleniumbase',
version='1.49.16',
version='1.49.17',
description='Web Automation and Test Framework - https://seleniumbase.io',
long_description=long_description,
long_description_content_type='text/markdown',
@ -150,7 +150,7 @@ setup(
'brython==3.8.10',
'pyotp==2.4.0',
'boto==2.49.0',
'cffi==1.14.2',
'cffi==1.14.3',
'rich==7.0.0;python_version>="3.6" and python_version<"4.0"',
'flake8==3.7.9;python_version<"3.5"',
'flake8==3.8.3;python_version>="3.5"',