Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android setting engine #477

Merged
merged 5 commits into from
Sep 27, 2016
Merged

Android setting engine #477

merged 5 commits into from
Sep 27, 2016

Conversation

TikhomirovSergey
Copy link
Contributor

@TikhomirovSergey TikhomirovSergey commented Sep 25, 2016

Change list

  • io.appium.java_client.AppiumSetting became deprecated. It was moved to io.appium.java_client.android.Setting.
  • the method io.appium.java_client.AppiumDriver#getSettings() was completely moved to io.appium.java_client.android.AndroidDriver.
  • the new interface io.appium.java_client.android.HasSettings was added. It has default implementation. And this interface is implemented by AndroidDriver.
    Methods:
    • void setSetting(Setting setting, Object value)
    • JsonObject getSettings()
    • void ignoreUnimportantViews(Boolean compress)
    • void configuratorSetWaitForIdleTimeout(int timeout)
    • void configuratorSetWaitForSelectorTimeout(int timeout)
    • void configuratorSetScrollAcknowledgmentTimeout(int timeout)
    • void configuratorSetKeyInjectionDelay(int delay)
    • void configuratorSetActionAcknowledgmentTimeout(int timeout)
      This change was proposed at add support to set UiAutomator Congfigurator values #410 by @truebit

Types of changes

What types of changes are you proposing/introducing to Java client?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
    Windows Mobile automation support.  #471

TikhomirovSergey and others added 5 commits September 23, 2016 23:29
- AppiumSetting became deprected. It was moved to io.appium.java_client.android.settings.Setting
- the new interface io.appium.java_client.android.HasSettings was added
- set/getSettings methods were moved to AndroidDriver
- AndroidDriver#ignoreUnimportantViews became deprecated
@TikhomirovSergey
Copy link
Contributor Author

@SrinivasanTarget @truebit
Could you review this PR?

Copy link
Member

@SrinivasanTarget SrinivasanTarget left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the changes 👍 LGTM

@truebit
Copy link
Contributor

truebit commented Sep 26, 2016

the settings api has been changed to top level as requested by @jlipps in appium/appium-android-driver#153
you could find the doc in https://github.com/truebit/appium/blob/master/docs/en/advanced-concepts/settings.md#supported-settings

So these settings api requests should be the same like ignoreUnimportantViews in top level instead of configurator/xxxTimeout

@TikhomirovSergey TikhomirovSergey merged commit ab2ff11 into appium:master Sep 27, 2016
public enum Setting {

IGNORE_UNIMPORTANT_VIEWS("ignoreUnimportantViews"),
CONFIGURATOR("configurator");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, this code is still the two level configurator. Now it should be like ignoreUnimportantViews. Every setting here for configurators should be individivual

@truebit
Copy link
Contributor

truebit commented Sep 27, 2016

all below settings are at same level like ignoreUnimportantViews. there is no 'configurator' sub setting

"actionAcknowledgmentTimeout" - Int which is the same as setActionAcknowledgmentTimeout. If a negative value is given, it would set to default(3 * 1000 milliseconds)

"keyInjectionDelay" - Int which is the same as setKeyInjectionDelay. If a negative value is given, it would set to default(0 milliseconds)

"scrollAcknowledgmentTimeout" - Int which is the same as setScrollAcknowledgmentTimeout. If a negative value is given, it would set to default(200 milliseconds)

"waitForIdleTimeout" - Int which is the same as setWaitForIdleTimeout. If a negative value is given, it would set to default(10 * 1000 milliseconds)

"waitForSelectorTimeout" - Int which is the same as setWaitForSelectorTimeout. If a negative value is given, it would set to default(10 * 1000 milliseconds)

@TikhomirovSergey
Copy link
Contributor Author

Ok. Will iptrove this a bit later.

@TikhomirovSergey TikhomirovSergey mentioned this pull request Sep 28, 2016
3 tasks
TikhomirovSergey added a commit that referenced this pull request Sep 30, 2016
* The addition to #477

- the enum `io.appium.java_client.android.ConfiguratorParameters` was removed
- new elements were added to the `io.appium.java_client.android.Settings`
- refactoring of the `io.appium.java_client.HasSettings`.

* Work on remarks. Addition to #477
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants