Add isKeyboardShown command for iOS by SrinivasanTarget · Pull Request #887 · appium/java-client

Conversation

@SrinivasanTarget

Change list

Add isKeyboardShown command for iOS

Types of changes

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

  • No changes in production code.
  • 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)

mykola-mokhnach


import static io.appium.java_client.MobileCommand.isKeyboardShownCommand;

public interface HasDeviceDetails extends ExecutesMethod {

Choose a reason for hiding this comment

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

I'd rather rename the interface to HasOnScreenKeyboard

Choose a reason for hiding this comment

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

Hmm makes sense

mykola-mokhnach

@SuppressWarnings("unchecked")
public class AppiumDriver<T extends WebElement>
extends DefaultGenericMobileDriver<T> implements ComparesImages {
extends DefaultGenericMobileDriver<T> implements ComparesImages, HasDeviceDetails {

Choose a reason for hiding this comment

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

I'd rather add it to only ios and Android drivers, but not to the generic one.

mykola-mokhnach

FindsByAndroidUIAutomator<T>, LocksDevice, HasAndroidSettings, HasAndroidDeviceDetails,
HasSupportedPerformanceDataType, AuthenticatesByFinger,
CanRecordScreen, SupportsSpecialEmulatorCommands,
SupportsNetworkStateManagement, ListensToLogcatMessages, HasAndroidClipboard {

Choose a reason for hiding this comment

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

The interface should be added to AndroidDriver as well

mykola-mokhnach

import static io.appium.java_client.android.AndroidMobileCommandHelper.getDisplayDensityCommand;
import static io.appium.java_client.android.AndroidMobileCommandHelper.getSystemBarsCommand;

public interface HasAndroidDeviceDetails extends HasOnScreenKeyboard {

Choose a reason for hiding this comment

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

I'd rather add the extension separately.

mykola-mokhnach

2 participants

@SrinivasanTarget @mykola-mokhnach