none
AutomationId is not guaranteed to be stable across different builds?

    Question

  • From the MSDN document (about AutomationId, it states that

    "Clients should make no assumptions regarding the AutomationId values exposed by other applications. AutomationId is not guaranteed to be stable across different releases or builds of an application.".  

    I think I understand the first part - we cannot assume that the same value of AutomationId is not being used by other application.  However, I'm more concern about the second part.  I need an AutomationId which is unique and remains the same for different builds or releases consistently so that we can use it as the primary ID in our automation test. Can anyone explain to me a bit detail what does it mean?  Can I assume that the AutomationId will not be changed during build?

    Thank you!

    Richard

    MSDN reference: http://msdn.microsoft.com/en-us/library/windows/desktop/ee684083.aspx

    • Edited by rcycheng Friday, March 28, 2014 6:00 PM
    Friday, March 28, 2014 5:55 PM

Answers

  • If you control the target app then you control the automation ID.

    If it's somebody else's application then they can change the automation ID whenever they wan't. You cannot assume that somebody else's application will have consistent automation IDs for different builds, unless they provide their own contract promising that.

    --Rob

    • Marked as answer by rcycheng Monday, April 07, 2014 5:39 PM
    Thursday, April 03, 2014 5:35 AM

All replies

  • If you control the target app then you control the automation ID.

    If it's somebody else's application then they can change the automation ID whenever they wan't. You cannot assume that somebody else's application will have consistent automation IDs for different builds, unless they provide their own contract promising that.

    --Rob

    • Marked as answer by rcycheng Monday, April 07, 2014 5:39 PM
    Thursday, April 03, 2014 5:35 AM
  • Thank you Rob.
    Monday, April 07, 2014 5:40 PM