If visible is not working :/

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
huzunkaya
Posts: 8
Joined: Tue Feb 03, 2015 7:57 am

If visible is not working :/

Post by huzunkaya » Thu Feb 26, 2015 9:12 am

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();	
        		
        	}

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: If visible is not working :/

Post by krstcs » Thu Feb 26, 2015 2:26 pm

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.
Shortcuts usually aren't...

huzunkaya
Posts: 8
Joined: Tue Feb 03, 2015 7:57 am

Re: If visible is not working :/

Post by huzunkaya » Thu Feb 26, 2015 2:49 pm

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

huzunkaya
Posts: 8
Joined: Tue Feb 03, 2015 7:57 am

Re: If visible is not working :/

Post by huzunkaya » Thu Feb 26, 2015 2:52 pm

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.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: If visible is not working :/

Post by krstcs » Fri Feb 27, 2015 2:37 pm

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.
Shortcuts usually aren't...