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

#320 fix #327

Merged
merged 1 commit into from
Mar 2, 2016
Merged

#320 fix #327

merged 1 commit into from
Mar 2, 2016

Conversation

TikhomirovSergey
Copy link
Contributor

Changes:

  • 320 fix. The Widget.getSelfReference() was added. This method allows to extract a real widget-object from inside a proxy at some extraordinary situations.

  • test modification

This change is the addition to features whis heve been implemented here: #267. There was a problem:

This use case has some restrictions;
...

  • for now it is not possible to
  import io.appium.java_client.pagefactory.OverrideWidget;
  ...

  //above is the other field declaration
  @OverrideWidget(html = UsersWidgetForHtml.class, 
  androidUIAutomator = UsersWidgetForAndroid.class, iOSUIAutomation = UsersWidgetForIOS .class)
  DefaultAbstractUsersWidget widget;

  //below is the other field/method declaration

  //user's code
  ((UsersWidgetForAndroid) widget).doSpecialWorkForAndroing()

I think that this problem will be resolved next time.

So this commit resolves this issie and related problems this way:

  import io.appium.java_client.pagefactory.OverrideWidget;
  ...

  //above is the other field declaration
  @OverrideWidget(html = UsersWidgetForHtml.class, 
  androidUIAutomator = UsersWidgetForAndroid.class, iOSUIAutomation = UsersWidgetForIOS .class)
  DefaultAbstractUsersWidget widget;

  //below is the other field/method declaration

  //user's code
  ((UsersWidgetForAndroid) widget.getSelfReference()).doSpecialWorkForAndroing()

Changes:

- #320 fix. The Widget.getSelfReference() was added. This method allows to extract a real widget-object from inside a proxy at some extraordinary situations.

- test modification
@TikhomirovSergey
Copy link
Contributor Author

@SergeyErmakovMercDev could you take a look at this PR?

@SButterfly
Copy link

@TikhomirovSergey well, how can I download source code with pull request?

@SButterfly
Copy link

I looked, and It works. Thanks.
BTW. I still don't know how to checkout to pull requests.

TikhomirovSergey added a commit that referenced this pull request Mar 2, 2016
@SButterfly

You can:
- switch to your java_client fork using git

- > git checkout -b your_new_branch_name master

- > git pull https://github.com/User_Name/java-client.git target_branch

But now you can clone master
@TikhomirovSergey TikhomirovSergey merged commit 9224b8d into appium:master Mar 2, 2016
@TikhomirovSergey
Copy link
Contributor Author

@SButterfly

You can:

But now you can clone master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants