DevOps Automation

 View Only
  • 1.  Finding the object with the current focus

    Rational Test- Rising Star
    Posted Thu April 13, 2023 09:27 AM

    I'm trying to use RFT to do Section 508 testing.  One of the tests, the 'Z' test, uses the tab key to move right to left and then down to the next line.  I have a data set that lists all the objects on the form with the expected sequence number.  When the script tabs to an object I need to know if I'm at the right object based on the object id or the object name.  So how do I get the properties of the object that has the current focus, without using the object map?



    ------------------------------
    Thomas Taylor
    Information Specialist
    Internal Revenue Service
    Grand Junction CO
    970-2543420
    ------------------------------


  • 2.  RE: Finding the object with the current focus

    Rational Test- Active Member
    Posted Fri May 12, 2023 02:42 PM

    Hi Thomas,

    Here's a link to the RFT documentation:  https://help.blueproddoc.com/rationaltest/welcome/index.html to do a search.

    In the search I found how to edit object property https://help.blueproddoc.com/rationaltest/rationalfunctionaltester/10.5.2/docs/topics/EditingObjectProperties.html?hl=finding%2Ctest%2Cobject%2Cmap%2Cobjects%2Cused%2Cscripts

    Let me know if this works.



    ------------------------------
    Lettie Ar-Rahmaan
    ------------------------------



  • 3.  RE: Finding the object with the current focus

    Rational Test- Rising Star
    Posted Fri May 19, 2023 03:49 PM

    Thanks, I've been through the documentation.and my "Software Test Engineering with IBM Functional Tester" text but I haven't found what I need for this test.  We drive most our test using the test object map, but if I'm doing a section 508 test from the keyboard, after I do a .inputKeys("{TAB}") statement hopefully some object on the screen will have the current focus.  I have a datastore that lists all the objects on the form in their Z order.  But as we all know sometimes the order on the screen doesn't match what happens when you press the tab key.  We do this visually, because we can see the object that has the current focus.  So, I need to find the object with the current focus and see if it matches the object where it is supposed to be.  It obviously is going to take somemore thinking.... :) 



    ------------------------------
    Thomas Taylor
    Information Specialist
    Internal Revenue Service
    Grand Junction CO
    970-2543420
    ------------------------------



  • 4.  RE: Finding the object with the current focus

    Posted Tue May 23, 2023 10:51 AM

    Hi Thomas,

    You can get the properties of an object using getProperties() or getRecognitionProperties() method

    For example, If we want to get properties of an 'X' object then we can we use the below code:

    Hashtable<Object, Object> props = X().getProperties();
    props.forEach((k,v)->System.out.println(k.toString() + " - "+v.toString()));



    ------------------------------
    sravan kumar reddy koteru
    ------------------------------