Page 1 of 1

Popup screen

Posted: Fri Aug 12, 2011 5:13 pm
by omayer
Cann't find the Ok bttn on popup screen using the following code, popup at 3r layer and triggers by enterring invalid data , .... Main page > Form > popup. ...any Suggestion please

Code: Select all

    		
    bool exists = Validate.Exists(repo.ErrorPopUp.ButtonOKInfo, "popup Email Alert'{0}'",false);
 
  
  if(exists)
  	
  {   	 	
  	 // Identify the webdocument by its title   
	 WebDocument webDocument = "/Container[@caption='Very quick check ']"; 
	 
  	//find the ok bttn on dialogue
     Ranorex.Button button = webDocument.FindSingle("/form[@title='Message from webpage']/button[@text='OK']");
   //send screenshot to report
     Report.Screenshot("/form[@title='Message from webpage']" + "email validation pass");
    //click ok on popup
    button.Click();
  }
Thanks,
Beginner

Re: Popup screen

Posted: Fri Aug 12, 2011 5:31 pm
by Ciege
Please post a RanorexSpy snapshot of the form.

Re: Popup screen

Posted: Fri Aug 26, 2011 2:06 pm
by omayer
issue resolved, java script got triggerred before click on next step to get the popup.