Problems with Ajax/Sharepoint Pop-Up : General Questions

Problems with Ajax/Sharepoint Pop-Up

Ask general questions here.

Problems with Ajax/Sharepoint Pop-Up

Postby Todor » Fri Aug 19, 2011 1:53 pm

As I don't want to work with Delays when I open a pop-up I tried using Code instead of it.

Code: Select all
           Report.Log(ReportLevel.Info, "before search");
           for(int i = 0;i < 10;i++)
           {
              Element o = null;
              repo.Servicedesk.test.TryFindSingle(".", out o);
              if(o != null)
              {
                 Report.Log(ReportLevel.Info, "found");
                 break;
              }
              Report.Log(ReportLevel.Info, "before delay");
              Delay.Duration(100);
              Report.Log(ReportLevel.Info, "in delay");
           }
           
           Report.Log(ReportLevel.Info, "after");


repo.Servicedesk.test = "body/div[1]/div/div[2]/iframe"

but the code finds the Pop-Up before it is loaded and fails when executing the next code.

In the picture there is the pop-up window and the other attachment is a snapshot of the site while the pop-up is opened.

Looking forward hearing from you

P.S.: I have read the User Guide concerning how to handle AJAX
Attachments
Snapshot_PopUp.rxsnp
(545.05 KiB) Downloaded 9 times
Popup.gif
Popup.gif (329.33 KiB) Viewed 1366 times
Todor
 
Posts: 66
Joined: Mon Jul 25, 2011 12:28 pm

Re: Problems with Ajax/Sharepoint Pop-Up

Postby Support Team » Fri Aug 19, 2011 2:31 pm

Hi,

You want to wait until the pop-up window appears, so you can do this by adding a "Validation" step.
You can validate a specific name of a button from the pop up window.
For instance:
Validate.Attribute(repo.YourDocument.YourIFrame.TheSpeicherButtonInfo, "Text", "Speichern");

The Validation action waits until the specific button is visible.
After this step you can perform your other actions.

Regards,
Markus
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Problems with Ajax/Sharepoint Pop-Up

Postby Todor » Fri Aug 19, 2011 3:44 pm

Are the regular RanoreXPath Expressions working in the Validate.Atribute() Method working too?

Example:

Code: Select all
Validate.Attribute(repo.Servicedesk.AjaxDropDown, "class", "RadComboBoxDropDown.*");
// instead of
Validate.Attribute(repo.Servicedesk.AjaxDropDown, "class", "RadComboBoxDropDown RadComboBoxDropDown_Default");
Todor
 
Posts: 66
Joined: Mon Jul 25, 2011 12:28 pm

Re: Problems with Ajax/Sharepoint Pop-Up

Postby Support Team » Sat Aug 20, 2011 11:43 am

Todor wrote:Are the regular RanoreXPath Expressions working in the Validate.Atribute() Method working too?

There is an overload of the Validate.Attribute taking a standard .NET regular expression instead of a pure string argument:
Validate.Attribute(repo.Servicedesk.AjaxDropDown, "class", new System.Text.RegularExpressions.Regex("RadComboBoxDropDown.*"));

If you don't know the code to write for a specific action, just create that action with the Ranorex Recorder and have a look at the code the recorder generates. Then you don't have to wait for Ranorex support to answer your question in the forum :D

Regards,
Alex
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Problems with Ajax/Sharepoint Pop-Up

Postby Todor » Mon Aug 22, 2011 9:28 am

Well, I did not know that it's possible to make a validation-step with the recorder, but thanks for the hint. I'll try it next time :)
Todor
 
Posts: 66
Joined: Mon Jul 25, 2011 12:28 pm


Return to General Questions

Who is online

Users browsing this forum: No registered users and 0 guests