Skip to content

Conversation

sravanmedarapu
Copy link
Member

@sravanmedarapu sravanmedarapu commented Nov 23, 2016

Change list

Added test to verify TOAST messages
Req: #appium/appium#4824

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)

Details

Should work with appium-uiautomator2-driver v0.0.9

Note:
Because of the google UiAutomaor2 limitation, it is not possible to perform any operation on TOAST element, performing any operations [ex: getText()] will throw StaleObjectExecption. i.e It is only possible to verify the TOAST message.

@SrinivasanTarget please review


MobileElement popUpElement = driver.findElement(MobileBy.AccessibilityId("Make a Popup!"));
popUpElement.click();
driver.findElement(By.xpath(".//*[@text='Search']")).click();
Copy link
Member

Choose a reason for hiding this comment

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

Cool. I did tested (from latest android server) this from your branch yesterday :) I think it failed for me here. After adding wait it failed to find the TOAST on next step. Will retest again today.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ohh, I would request you test with this test. Typically UiAutomator2 driver works faster then old driver, adding implicit wait would be more appropriate to avoid sync issues.

Copy link
Member

Choose a reason for hiding this comment

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

Sure will do that. Between can you please fix codacy issues?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure.

Choose a reason for hiding this comment

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

how to write it by testng , it can not find wait.until

@TikhomirovSergey
Copy link
Contributor

@sravanmedarapu This PR is in the conflicted state. Could you update it?

@SrinivasanTarget
Copy link
Member

Thanks @sravanmedarapu

@SrinivasanTarget SrinivasanTarget merged commit b0c3419 into appium:master Nov 28, 2016
@liyinchigithub
Copy link

@TikhomirovSergey you are error

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.

5 participants