Robotic Process Automation (RPA)

 View Only
  • 1.  Browser Scripts

    Posted Sat March 06, 2021 06:01 AM

    Hi there

     

    I have 2 Browser scripts

     

    Script 1 Starts a Browser / Navigates to a URL & Logs in. It also has the close browser.

    In the middle I use an Execute Script Command that calls a secondary script GetSiteData script and passes it the Browser object.

     

    In the GetSiteData Script I have a browser object set as a Script Input Param

     

    When I run the first script it all looks good and then as soon as the first command runs on the second script I get the following exception. NoSuitableContextException

     

    Have Tried

    Passing over the Broswer Object from Script 1 to Script 2

    In Script 2 I try a WebAttach first that throws a different exception

     

    Not sure if I can even do what I am trying to do.

     

    Thanks

     

     

     

     

    Troy DesBarres
    Customer Success Officer

    mobile. +1 (902) 209-9480 • office. +1 (902) 482-7103
    email. troy.desbarres@magiclampsoftware.net

    www.magiclampsoftware.net
    Realistic software solutions for business process automation

    TroysSchedule@magiclampsoftware.net/bookings//">Book a meeting with me
    MagicLamp Software places the highest priority on the security and privacy of our Clients. Therefore, we have put our efforts into ensuring that this message is free of errors and viruses. Despite our efforts, you should always scan all emails for any threats with proper software, as the sender does not accept liability for any damage inflicted by viewing the content of this email. 



  • 2.  RE: Browser Scripts

    Posted Mon March 08, 2021 06:45 AM
    Hi Troy,

    If I understand you correctly, you are trying to pass the browser handle created in script 1 to a child script 2.  This works for me.  See code snippet below:

    Script1
    defVar --name browserId --type Browser
    webStart --name browser --type "Chrome" browserId=value
     executeScript --name script2 --parameters "in_param_browserId=${browserId}"

    Script2

    defVar --name in_param_browserId --type Browser --parameter
     webAttach --browser ${in_param_browserId} --name browser



    ------------------------------
    NIGEL CROWTHER
    ------------------------------



  • 3.  RE: Browser Scripts

    Posted Mon March 08, 2021 07:43 AM

    Thanks Nigel I am sure that is how I had it setup. The thing is after you have worked on something for so long you forget the changes you made and what worked and what didn't. I will take that for a spin but I am sure it will work. Looks logical enough

     

    Thanks

    Troy

     

     

    Troy DesBarres
    Customer Success Officer

    mobile. +1 (902) 209-9480 • office. +1 (902) 482-7103
    email. troy.desbarres@magiclampsoftware.net

    www.magiclampsoftware.net
    Realistic software solutions for business process automation

    TroysSchedule@magiclampsoftware.net/bookings//">Book a meeting with me
    MagicLamp Software places the highest priority on the security and privacy of our Clients. Therefore, we have put our efforts into ensuring that this message is free of errors and viruses. Despite our efforts, you should always scan all emails for any threats with proper software, as the sender does not accept liability for any damage inflicted by viewing the content of this email.