If you know what causes these differences (for example, maybe it is one way for domestic shipping and the other way for international shipping), you can simply put both versions into your OR and wrap them in an If..Then in your script:
If varShipping = "domestic" Then
If you don't know what causes it (for example, it's random based on which other windows might be open in your application and you want your script to be smart enough to figure it out) you can still use the If..Then construct, but use Swfwindow(x).SwfWindow(Z).swfbutton().Exist as the condition.
Technically, that second solution works for both examples, but it has the downside that it can cause your script to take extra time as it checks the .Exist on something that might not be there, while the first solution won't add any tangible extra time to your script.
"The last 10% of any software project will take 90% of the budgeted time. The first 90% will take the other 90%"
[ QUOTE ]
It is according to buisness that hierarchy is getting change
and i have to check six combination like that so that is why i wanted to know that is any other way to handel it on hierarchy level.
[/ QUOTE ]
Well, without getting into the details about your .NET apps object hierarchy I am guessing you probably have the majority of your objects under the "sometimes there, sometimes not" swfWindow(Y). If true, then I think the only practial way to handle this is to use Descriptive Programming to define your object structure.