Skip to content

Commit f2d16a6

Browse files
committed
Convert integer inputs to strings before typing text
1 parent 57aa49a commit f2d16a6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,8 @@ def add_text(self, selector, text, by=By.CSS_SELECTOR, timeout=None):
377377
if not self.demo_mode and not self.slow_mode:
378378
self.__scroll_to_element(element, selector, by)
379379
pre_action_url = self.driver.current_url
380+
if type(text) is int or type(text) is float:
381+
text = str(text)
380382
try:
381383
if not text.endswith('\n'):
382384
element.send_keys(text)

0 commit comments

Comments
 (0)