Page 1 of 1

If visible is not working :/

Posted: Thu Feb 26, 2015 9:12 am
by huzunkaya
Hi everybody,
I have very basic problem but I still could not understand why it is not working :/

im triying to delete all items until an error popup appears.but when the code starts, ranorex is waiting for the item inside the if scobe. i want to pass it if it is not visible.

this is my pop up object : /form[@title='Uyarı']/titlebar[@accessiblerole='TitleBar' and @visible='True']
I also tried this but result same : /form[@title='Uyarı']/titlebar[@accessiblerole='TitleBar']

this is the popup which will tell me stop.

Image

Code: Select all

	while(true)
        	{
        	
        		repo.EFTMesajOluşturmaDuezeltmeEkranı.DuezeltListele.Click();
        		repo.DuezeltmeBekleyenEFTSecimi.DuzeltmeIlk.DoubleClick();
        		
        		if(repo.Uyarı.Uyari.Visible)
        		{
        			repo.Uyarı.ButtonOK.Click();
        			break;
        			
        		}
        			
        		RcMoveTo.Start();
        		repo.EFTMesajOluşturmaDuezeltmeEkranı.MesajIptal.Click();
        		repo.Uyarı.ButtonOK.Click();
        		repo.MesajDoekuemue.ButtonNo.Click();	
        		
        	}

Re: If visible is not working :/

Posted: Thu Feb 26, 2015 2:26 pm
by krstcs
What version of Ranorex are you using?

What error are you getting?

Without that information we can't tell you what the problem may be.

Re: If visible is not working :/

Posted: Thu Feb 26, 2015 2:49 pm
by huzunkaya
krstcs wrote:What version of Ranorex are you using?

What error are you getting?

Without that information we can't tell you what the problem may be.
Ranorex 5.2.0

Error:
Image

Re: If visible is not working :/

Posted: Thu Feb 26, 2015 2:52 pm
by huzunkaya
it is normal ranorex can not find that object because it will appear when all list are deleted.
That is why im checking it is visible or not after each deletion.When it is visible I will end while loop.

Re: If visible is not working :/

Posted: Fri Feb 27, 2015 2:37 pm
by krstcs
You're not going to be able to use the @Visible='true' in the XPath if you KNOW it isn't going to be there because Ranorex will not find it and thus will fail.

You need to take the @Visible out of the XPath and then check for EXIST() instead.