Locked Fields

Best practices, code snippets for common functionality, examples, and guidelines.
Christian Dabnor
Posts: 9
Joined: Thu Apr 06, 2017 10:59 am

Locked Fields

Post by Christian Dabnor » Thu Aug 10, 2017 10:58 am

Hello there. This is probably a really simple question, but one I can't find the answer for. I want to find out if, when one tick box is checked, another is locked. I have the code running to check that the first checkbox is checked, but I can't see how to check the locked/unlocked status of the second.

Thank you in adcvance for your assistance.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3949
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Locked Fields

Post by odklizec » Thu Aug 10, 2017 11:31 am

Hi,

Without seeing you AUT or, at very least, Ranorex snapshot of the problematic elements, there is not much anyone here could do or suggest. Please upload a Ranorex snaphot (not screenshot!) of the element in question. Thanks.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Christian Dabnor
Posts: 9
Joined: Thu Apr 06, 2017 10:59 am

Re: Locked Fields

Post by Christian Dabnor » Thu Aug 10, 2017 12:18 pm

Hello again. Thank you for your response. I appear to have resolved it, however. If it'll help anyone else, I did

Code: Select all

public void Mouse_Click_PCI_ComplianceEnable_PCI_Compliance_Checking2()
        {
        	{
        		Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'Manager_Front_Screen.MainSystemDetails.PCI_ComplianceEnable_PCI_Compliance_Checking' at 8;6.", repo.Manager_Front_Screen.MainSystemDetails.PCI_ComplianceEnable_PCI_Compliance_CheckingInfo);
        		repo.Manager_Front_Screen.MainSystemDetails.PCI_ComplianceEnable_PCI_Compliance_Checking.Click("8;6");
             	  		
        		{
        			Ranorex.Control c= new Ranorex.Control(repo.Manager_Front_Screen.MainSystemDetails.PCI_ComplianceEnable_PCI_Compliance_Checking);
        			if (c.GetPropertyValue<bool>("Checked"))
        			{
        				if (repo.Manager_Front_Screen.MainSystemDetails.PCI_Compliance_Enable_Auto_Logout.Enabled)
        				{
        					Report.Info("Auto Logout is enabled");
        				}
        				else
        				{
        					Report.Info("Auto Logout is disabled");
        				}
        			}
        		}
        	}
       	}