Navigation Menu

Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #25835 from viorelaioia/bug_1092195
Browse files Browse the repository at this point in the history
Bug 1092195 - Investigate failure in test_cost_control_ftu.py
  • Loading branch information
Florin Strugariu committed Nov 7, 2014
2 parents 0194440 + 07f5ea2 commit 4dadfd1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/python/gaia-ui-tests/gaiatest/apps/keyboard/app.py
Expand Up @@ -101,6 +101,7 @@ def _find_key_for_longpress(self, input_value):
def _switch_to_correct_layout(self, val):
layout_page = self._layout_page
current_input_type = self._current_input_type
current_input_mode = self._current_input_mode
if val.isspace():
# Space is available on every keyboard panel
pass
Expand All @@ -119,7 +120,7 @@ def _switch_to_correct_layout(self, val):
else:
# If it's not space or alpha then it must be in Alternate or Symbol.
# It can't be in Basic so let's go into Alternate and then try to find it
if not current_input_type == 'number' and layout_page == 0:
if layout_page == 0 and current_input_type == 'text' and current_input_mode in ['digit', '-moz-sms']:
self._tap_page_switching_key(1)
page_0_key_locator = (self._page_switching_key_locator[0], self._page_switching_key_locator[1] % (0))
self.wait_for_element_displayed(*page_0_key_locator)
Expand Down Expand Up @@ -152,6 +153,10 @@ def _current_input_type(self):
def _layout_page(self):
return self.marionette.execute_script('return window.wrappedJSObject.app.layoutManager.currentPageIndex;')

@property
def _current_input_mode(self):
return self.marionette.execute_script('return window.wrappedJSObject.app.inputContext.inputMode;')

# this is to switch to the frame of keyboard
def switch_to_keyboard(self):
self.marionette.switch_to_frame()
Expand Down

0 comments on commit 4dadfd1

Please sign in to comment.