Documentation ¶
Overview ¶
Package imesettings supports managing input methods in OS settings.
Index ¶
- Constants
- func AddInputMethodInOSSettings(uc *useractions.UserContext, kb *input.KeyboardEventWriter, im ime.InputMethod) uiauto.Action
- func EnableInputOptionsInShelf(uc *useractions.UserContext, shown bool) uiauto.Action
- func RemoveInputMethodInOSSettings(uc *useractions.UserContext, im ime.InputMethod) uiauto.Action
- func SetEmojiSuggestions(uc *useractions.UserContext, isEnabled bool) uiauto.Action
- func SetGlideTyping(uc *useractions.UserContext, im ime.InputMethod, isEnabled bool) uiauto.Action
- func SetKoreanKeyboardLayout(uc *useractions.UserContext, keyboardLayout string) uiauto.Action
- func SetPKAutoCorrection(uc *useractions.UserContext, im ime.InputMethod, acLevel AutoCorrectionLevel) uiauto.Action
- func SetVKAutoCapitalization(uc *useractions.UserContext, im ime.InputMethod, isEnabled bool) uiauto.Action
- func SetVKAutoCorrection(uc *useractions.UserContext, im ime.InputMethod, acLevel AutoCorrectionLevel) uiauto.Action
- type AutoCorrectionLevel
- type IMESettings
- func (i *IMESettings) ChangeKoreanKeyboardLayout(cr *chrome.Chrome, expected string) uiauto.Action
- func (i *IMESettings) ClickAddButtonToConfirm() uiauto.Action
- func (i *IMESettings) ClickAddInputMethodButton() uiauto.Action
- func (i *IMESettings) OpenInputMethodSetting(tconn *chrome.TestConn, im ime.InputMethod) uiauto.Action
- func (i *IMESettings) RemoveInputMethod(inputMethodName string) uiauto.Action
- func (i *IMESettings) SearchInputMethod(kb *input.KeyboardEventWriter, searchKeyword, inputMethodName string) uiauto.Action
- func (i *IMESettings) SelectInputMethod(inputMethodName string) uiauto.Action
- func (i *IMESettings) ToggleAutoCap(cr *chrome.Chrome, expected bool) uiauto.Action
- func (i *IMESettings) ToggleGlideTyping(cr *chrome.Chrome, expected bool) uiauto.Action
- func (i *IMESettings) ToggleShowInputOptionsInShelf(cr *chrome.Chrome, expected bool) uiauto.Action
Constants ¶
const ( GlideTyping settingOption = "Enable glide typing" AutoCapitalization settingOption = "Auto-capitalization" ShowInputOptionsInShelf settingOption = "Show input options in the shelf" KoreanKeyboardLayout settingOption = "Korean keyboard layout" VKAutoCorrection settingOption = "Auto-correction" )
Available IME setting items.
const ( AutoCorrectionOff AutoCorrectionLevel = "Off" AutoCorrectionModest = "Modest" AutoCorrectionProgressive = "Progressive" )
Available auto correction levels.
const EmojiSuggestionsOption = "Emoji suggestions"
EmojiSuggestionsOption represents the option name of Emoji suggestions toggle option.
Variables ¶
This section is empty.
Functions ¶
func AddInputMethodInOSSettings ¶
func AddInputMethodInOSSettings(uc *useractions.UserContext, kb *input.KeyboardEventWriter, im ime.InputMethod) uiauto.Action
AddInputMethodInOSSettings returns a user action adding certain input method in OS settings.
func EnableInputOptionsInShelf ¶
func EnableInputOptionsInShelf(uc *useractions.UserContext, shown bool) uiauto.Action
EnableInputOptionsInShelf returns a user action to change IME setting to show / hide IME options in shelf.
func RemoveInputMethodInOSSettings ¶
func RemoveInputMethodInOSSettings(uc *useractions.UserContext, im ime.InputMethod) uiauto.Action
RemoveInputMethodInOSSettings returns a user action removing certain input method in OS settings.
func SetEmojiSuggestions ¶
func SetEmojiSuggestions(uc *useractions.UserContext, isEnabled bool) uiauto.Action
SetEmojiSuggestions returns a user action to change 'Emoji suggestions' setting.
func SetGlideTyping ¶
func SetGlideTyping(uc *useractions.UserContext, im ime.InputMethod, isEnabled bool) uiauto.Action
SetGlideTyping returns a user action to change 'Glide suggestions' setting.
func SetKoreanKeyboardLayout ¶
func SetKoreanKeyboardLayout(uc *useractions.UserContext, keyboardLayout string) uiauto.Action
SetKoreanKeyboardLayout returns a user action to change 'Korean keyboard layout' setting.
func SetPKAutoCorrection ¶
func SetPKAutoCorrection(uc *useractions.UserContext, im ime.InputMethod, acLevel AutoCorrectionLevel) uiauto.Action
SetPKAutoCorrection returns a user action to change 'Physical keyboard Auto-correction' setting.
func SetVKAutoCapitalization ¶
func SetVKAutoCapitalization(uc *useractions.UserContext, im ime.InputMethod, isEnabled bool) uiauto.Action
SetVKAutoCapitalization returns a user action to change 'On-screen keyboard Auto-capitalization' setting.
func SetVKAutoCorrection ¶
func SetVKAutoCorrection(uc *useractions.UserContext, im ime.InputMethod, acLevel AutoCorrectionLevel) uiauto.Action
SetVKAutoCorrection returns a user action to change 'On-screen keyboard Auto-correction' setting.
Types ¶
type AutoCorrectionLevel ¶
type AutoCorrectionLevel string
AutoCorrectionLevel describes the auto correction level of an input method. The value exactly should exactly match the string displayed in IME setting page.
type IMESettings ¶
type IMESettings struct {
*ossettings.OSSettings
}
IMESettings is a wrapper around the settings app used to control the inputs settings page.
func LaunchAtInputsSettingsPage ¶
func LaunchAtInputsSettingsPage(ctx context.Context, tconn *chrome.TestConn, cr *chrome.Chrome) (*IMESettings, error)
LaunchAtInputsSettingsPage launches Settings app at inputs setting page.
func LaunchAtSuggestionSettingsPage ¶
func LaunchAtSuggestionSettingsPage(ctx context.Context, tconn *chrome.TestConn, cr *chrome.Chrome) (*IMESettings, error)
LaunchAtSuggestionSettingsPage launches Settings app on suggestions page.
func (*IMESettings) ChangeKoreanKeyboardLayout ¶
ChangeKoreanKeyboardLayout sets the Korean keyboard layout to a specific value.
func (*IMESettings) ClickAddButtonToConfirm ¶
func (i *IMESettings) ClickAddButtonToConfirm() uiauto.Action
ClickAddButtonToConfirm returns a function that clicks Add button to confirm adding one or more input methods.
func (*IMESettings) ClickAddInputMethodButton ¶
func (i *IMESettings) ClickAddInputMethodButton() uiauto.Action
ClickAddInputMethodButton returns a function that clicks AddInputMethod button in inputs setting page.
func (*IMESettings) OpenInputMethodSetting ¶
func (i *IMESettings) OpenInputMethodSetting(tconn *chrome.TestConn, im ime.InputMethod) uiauto.Action
OpenInputMethodSetting opens the input method setting page in OS settings. The setting button is named as "Open settings page for " + im.Name. Japanese is the only exemption in "IME settings in the OS setting".
func (*IMESettings) RemoveInputMethod ¶
func (i *IMESettings) RemoveInputMethod(inputMethodName string) uiauto.Action
RemoveInputMethod returns a function that removes the input method by clicking cross button next to the input method on UI.
func (*IMESettings) SearchInputMethod ¶
func (i *IMESettings) SearchInputMethod(kb *input.KeyboardEventWriter, searchKeyword, inputMethodName string) uiauto.Action
SearchInputMethod returns a function that searches input method by typing keyboard into searchbox. SearchInputMethod also waits for expected IME displayed on screen.
func (*IMESettings) SelectInputMethod ¶
func (i *IMESettings) SelectInputMethod(inputMethodName string) uiauto.Action
SelectInputMethod returns a function that selects an input method by displayed name.
func (*IMESettings) ToggleAutoCap ¶
ToggleAutoCap clicks the 'Auto-capitalization' toggle button to enable/disable the setting.
func (*IMESettings) ToggleGlideTyping ¶
ToggleGlideTyping clicks the 'Enable glide typing' toggle button to enable/disable the setting.
func (*IMESettings) ToggleShowInputOptionsInShelf ¶
ToggleShowInputOptionsInShelf clicks the 'Show input options in the shelf' toggle button to enable/disable the setting.