How can I stay on the popup window and perform actions?
- 6 years ago
OK, first of all... why no NameMapping? Honestly, that's going to be the BEST way to identify objects and make sure they are distinct. You are using a wildcard for the page which will find ANY page, literally the FIRST page it finds will be returned. If your popup is a second page in the Browser, then there's no guarentee that your code will find it. AT LEAST you need to be specific in the page.
So, your popup comes up... I still don't know EXACTLY what that popup is, but your code below will find the first textbox with the label indicated in whatever page is returned. By the description of your behavior, probably the first page it returns is NOT the page containing your popup, so that's why it activates the page instead of the popup.So:
1) Consider mapping all your components rather than relying on find methods solely... use Find when mapping doesn't make sense
2) Be more specific with all aspects of your object identification, even the page URL