Unable to click on Element, because the Element is not visible

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
PeterG
Posts: 2
Joined: Mon Feb 27, 2023 10:59 am

Unable to click on Element, because the Element is not visible

Post by PeterG » Mon Mar 06, 2023 4:05 pm

Hello

After an update from version 10.1.6 to 10.5.0 i have some problems with the visibility of items.

Previously, the code worked without any problems.
I also tested it with version 10.5.3, same problem!

I put in a few outputs and Ranorex always gives for the State for Visible = false for the last element!

But the check with Spy returns a True for the State for Visible for this Element ! :?

        public void del_all_elem(Adapter data_group)
        {
        	IList<Ranorex.Unknown> data_row = data_group.Children;
         	var i = 1; 
            	foreach (var element in data_row)
            	{
              			var data_row_index = element.Element.GetAttributeValueText("itemIndex");
        			var data_row_visible = element.Element.GetAttributeValueText("Visible");
        			       		           		   
        			Report.Success(i + ". Run: " + element + " - " + data_row_index);
        			
        			Report.Success("the State for Visible is: " + data_row_visible);
        			
        		    if (element.Visible == true)
      		           	   {

        				element.Click();
                       			
        			if (repo.Semsy.Pages.Sequence_editor.Track_Items_block.BtnDelete.Enabled == true)
        			{
        			
        				Report.Success("Button Delete is visible for: " + element + " - " + data_row_index);	
                		        repo.Semsy.Pages.Sequence_editor.Track_Items_block.BtnDelete.Click();
	           	 		Delay.Milliseconds(400);
	            
	           			repo.Semsy.PopUps.DeleteTrackItem.BtnOk.Click();
	            		       Delay.Milliseconds(400);
        			}
        			else
        			{
        				Report.Failure("Button Delete is not visible for: " + element + " - " + data_row_index);
        			}
        			
        			
        		        }
        			else
        			{
        				Report.Failure("the Element: " + element + " with Index " + data_row_index + " is not visible for Ranorex");
        				Report.Failure("because the State for Visible is: " + data_row_visible);               
        			}
        			
        			i ++;
     
            	}
        }

        public void del_validate(Adapter dataGroup)
        {
        	foreach (var element in dataGroup.Children) {
        		bool is_visible = element.GetAttributeValue<bool>("Visible");
        		
        		if (is_visible) 
        			Validate.Fail("Delete has not worked " + element);
        	}
        	        	
        	Report.Success("Delete works");
        	
        }

I think it is a similar problem as exists here as well.
error-element-is-not-visible-in-the-ui- ... perfomed.


Systeminformationen:
Windows 10 Pro 22H2
Ranorex Studio Version 10.5.0+git.de7f794d
You do not have the required permissions to view the files attached to this post.