Page 1 of 1

Not able to find element in popup window

Posted: Tue Sep 02, 2014 9:58 pm
by rv38
Hi,

I am new to Ranorex and I am having some difficulties in locating element on my desktop application.
At the initial level I am going good but when I need to interact with popup windows I am getting in to this problem.
While using the spy I can locate and highlight element but when I run the program it throws element not found exception.

Snapshot attached.

Thank you

Re: Not able to find element in popup window

Posted: Fri Sep 05, 2014 1:12 pm
by Support Team
Hi rv38,

Thank you for attaching a snapshot.

Unfortunately it is hard to analyze this issue without having detailed information about your Solution. But it sounds like a path issue.

May I ask you to provide your Solution or a sample which illustrates the issue?

This will help us to narrow down the problem.

PS: If you don't want to post your Solution here in this forum you can also send it to [email protected]

Thank you in advance.
Regards,
Markus (S)

Re: Not able to find element in popup window

Posted: Fri Sep 05, 2014 1:54 pm
by rv38
Hi Markus,

Thank you for your replay.
Here is the code I am having issue with.
For I have use other method to do my job.

Commented code is not working for me.

Code: Select all

repo.FormAmicusMain.FormPeopleIndex.ToolBar.ButtonNew.Click();   // this one works
//repo.FormNewContact.ContainerPanelNewOrBasedOn.RadioButtonNew.Click();
Ranorex.RadioButton radioNew = repo.FormNewContact.ContainerPanelNewOrBasedOn.Self.FindSingle(".//radiobutton[@text='New']");
radioNew.Click();

//repo.FormNewContact.ContactName.FirstName.Click();
Ranorex.Text textFirst = repo.FormNewContact.ContactName.Self.FindSingle(".//element[@instance='5']/text");
textFirst.Click();
Keyboard.Press(vFirstName);

//repo.FormNewContact.ContactName.LastName.Click();
Ranorex.Text textLast = repo.FormNewContact.ContactName.Self.FindSingle(".//element[@instance='7']/text");
textLast.Click();
Keyboard.Press(vLastName);
repo.FormNewContact.ToolBar.ButtonNext.Click();    // this one works

Re: Not able to find element in popup window

Posted: Wed Sep 10, 2014 4:20 pm
by Support Team
Hi rv38,

Thank you for providing your code.
Unfortunately I would also need the Repository (.rxrep-file) in order to analyze the path of your items.
May I ask you to send your solution and a snapshot of your application to [email protected]?

Thank you in advance.

Regards,
Markus (S)