i am using the FullName from object spy to execute my command but its not working if OS is changed.
Hi,
i am using the FullName got via object spy to execute the command and its working fine in Win 8.1 machine. but when i tried to execute the same test on my serve machine with OS as MS server 2008R2. it not working i am getting a differnt object when i spy that again on the server machine. one panel is removed from the same object.
Execute(strCommandLine) this is used in the frame work to execute the command.
here strCommandLine = call object name(mentioned below). method.
and this is what i get on the server machine
Sys.Browser("iexplore").Page("*").Form("aspnetForm").Panel("divHeaderAndContent").Panel("contentWrapper").Panel(2).Panel(0).Panel(1).Panel(0).Textbox("ContentPlaceHolder1_txtUserName")
while for the same object at my local machine i am getting Sys.Browser("iexplore").Page("*").Form("aspnetForm").Panel("divHeaderAndContent").Panel("contentWrapper").Panel(2).Panel(0).Panel(1).Panel(0).Panel(0).Textbox("ContentPlaceHolder1_txtUserName")
you can see that an extra Panel(0) is their.
any idea how to tackle this.
Windows 8.1 and Windows 2008R2 are going to be using two different versions of IE 11 (assuming it's IE 11 you're working with). Essentially, this means it's possible for a page to be rendered differently on two different machines (although, not EXTREMELY likely since the versions aren't too far off).
Suggestion: Rather than using the full path, consider using FindChild on some object in the path to locate, within the hierarchal tree of objects, the specific one you're looking for. This way, no matter what the intervening items are, you'll always find the same object.