Maximo

Expand all | Collapse all

It works! Access the UI via an automation script (using getWebClientSession)

  • 1.  It works! Access the UI via an automation script (using getWebClientSession)

    Posted Mon February 03, 2020 01:05 PM
    Edited by User1971 Fri May 07, 2021 10:02 PM
    I thought I'd share something interesting I learned back in October 2019:

    In Maximo 7.6.1.1, we can use the service.webclientsession() method to access the UI:

    from psdi.common.context import UIContext
    wclause = service.webclientsession().getCurrentApp().getResultsBean().getMboSet().getUserAndQbeWhere() 
    service.error("The WHERE clause is : ", wclause);

    I think that could be handy in some scenarios.

    Some notes:



  • 2.  RE: It works! Access the UI via an automation script (using getWebClientSession)

    Posted Tue February 04, 2020 12:03 PM
    I think that's pretty cool too. Thanks for sharing.

    ------------------------------
    Robert Goff
    ------------------------------



  • 3.  RE: It works! Access the UI via an automation script (using getWebClientSession)

    Posted Fri May 07, 2021 10:02 PM
    FYI, a related post here:

    New java classes & methods in 7.6.1.2?


  • 4.  RE: It works! Access the UI via an automation script (using getWebClientSession)

    Posted Wed February 05, 2020 02:37 AM
    Hi,

    There is a thing made the life a bit more easier by using service method as follows:

    wcs = service.webclientsession()
    wcs...


    Don't need import UIContext and it can be written code more concise.

    Thanks


    • Add to Phrasebook
      • No word lists for English -> Japanese...
      • Create a new word list...
    • Copy
    • Add to Phrasebook
      • No word lists for English -> Japanese...
      • Create a new word list...
    • Copy


    ------------------------------
    YASUTAKA NISHIMURA
    ------------------------------



  • 5.  RE: It works! Access the UI via an automation script (using getWebClientSession)

    Posted Thu February 06, 2020 11:46 AM

    Cool.

    So this bit...
    UIContext.getCurrentContext().getWebClientSession().getCurrentApp().getResultsBean().getMboSet().getUserAndQbeWhere() 

    ...can be written more concisely as: 
                                                          service.webclientsession().getCurrentApp().getResultsBean().getMboSet().getUserAndQbeWhere() 



    ------------------------------
    Thanks
    ------------------------------