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

EventFiring objects. The addition to event firing WebDriver #559

Merged
merged 4 commits into from
Jan 29, 2017
Merged

EventFiring objects. The addition to event firing WebDriver #559

merged 4 commits into from
Jan 29, 2017

Conversation

TikhomirovSergey
Copy link
Contributor

@TikhomirovSergey TikhomirovSergey commented Jan 26, 2017

Change list

  • `EventFiringObjectFactory was added
  • The refactoring of EventFiringWebDriverFactory and DefaultBeanConfiguration.
  • DefaultAspect was actualized.

Types of changes

  • 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)

Details

Motivation

As soon as we have made API with default implementation. I think it would be cool to get objects created by these interfaces (anonymous types) listenable. Also the good option is to make some objects (some single element that has been found) listenable too.

import static io.appium.java_client.events.EventFiringObjectFactory.getEventFiringObject;
...

AppiumDriver<AndroidElement> appiumDriver = new AppiumDriver<AndroidElement>(parameters);
FindsByAndroidUIAutomator<AndroidElement> findsByAndroidUIAutomator =
    new FindsByAndroidUIAutomator<AndroidElement>() {

    @Override
    public AndroidElement findElement(String by, String using) {
        return appiumDriver.findElement(String by, String using);
    }

    @Override
    public List<AndroidElement> findElements(String by, String using) {
        return appiumDriver.findElements(by, using);
    }
};

findsByAndroidUIAutomator = 
    getEventFiringObject(findsByAndroidUIAutomator, appiumDriver, listeners);

- EventFiringObjectFactory was added
- The refactoring of EventFiringWebDriverFactory DefaultBeanConfiguration
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.

LGTM. Codacy have to be happy :)

@TikhomirovSergey TikhomirovSergey merged commit 8467893 into appium:master Jan 29, 2017
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.

2 participants