click on cancel buttono

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

click on cancel buttono

Post by omayer » Wed Jun 20, 2012 10:15 pm

How to click on Cancel button which path "/form[@title='Windows Internet Explorer']/button[@text='Cancel']"
some reason i can't focus to click on it, i tried various different way to click on it but no go
Thank you,
Tipu

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: click on cancel buttono

Post by Ciege » Wed Jun 20, 2012 10:36 pm

MyButton.click()???

Can you explain a little more? What do you mean you can't click on it? Is it off page? Needs to be scrolled into view? Can it not find the element? What "various ways" have you already tried?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

Re: click on cancel buttono

Post by omayer » Thu Jun 21, 2012 4:37 am

Thank you Ciege to look into it, issue with window popup that triggered when missing enterring required field on webpage . I was using thread to catch any popup then click Ok or Cancel on pop up, it was working all along until upgrade to 3.3 .
Tipu

omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

Re: click on cancel buttono

Post by omayer » Thu Jun 21, 2012 5:12 am

problem solved using the following code -Thank you Ranorex support team to give an example code on http://www.ranorex.com/support/user-gui ... mples.html


public void popup()
{
Ranorex.Button cancelButtonVar = null;
bool found = Host.Local.TryFindSingle<Ranorex.Button>("/form[@title='Windows Internet Explorer']/button[@text='Cancel']", 2000, out cancelButtonVar);
// Move mouse pointer to button
cancelButtonVar.MoveTo();
cancelButtonVar.Click();
}
Tipu