| || |
Issues with multiple ID\'s in SAP using QTP
This is my first post on this site, one of my coworkers suggested these forums. I am using QTP to help automate some strings for SAP. The particular string I use has two iterations. On the first iteration, an SAPGuiEdit has one particular ID, but on the second iteration, the same SAPGuiEdit has a different ID. When I change the object's id to reflect the id given to me by Object Spy, if I set it to the first ID, the second iteration fails, if I set it to the second ID, the first iteration fails.
One of my superiors suggested an If Else loop to set the ID of the SAPGuiEdit based on which iteration is being ran; however, I do not have any VBScript experience. I have some programming experience so I am able to follow the code, but I do not know where I would start in determing the iteration.
Any help would be nice or other potential suggestions would be greatly appreciated.
Re: Issues with multiple ID\'s in SAP using QTP
Have you tried a regular expression in the Object Properties in the OR for the ID?
This helps with dynamic windows, etc. that a particular property changes every time (or most of the time).
So if your two ids are:
and everything is the same until the last digit, you could put:
100011001.* as a regular expression in the OR to handle dynamic IDs.
Just a thought.