Question
TechMahindra
IN
Last activity: 11 Jun 2024 15:17 EDT
How to check the Radio button is enabled or not in Outlook
Hello Team,
The client requirement is to open the outlook and go to File->Options->Trust center->Trust center settings->Programmatic access-> Never warn me about suspicious activities.
Pega robotics bot to go through these options and need to check weather radio button is enabled or not for Never warn me about suspicious activity.
I have opened the outlook with windows adapter, and I am not able to check weather radio button is enabled or not.
Do I have any solution for this?
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 4 Jun 2024 9:39 EDT
Pegasystems Inc.
US
@Gopichand Muvva With Microsoft Office applications, Pega Robotics does not use traditional interrogation and instead uses Connectors to perform the most common functionality (for Outlook that being sending and receiving messages). This means you can't interrogate as thoroughly as other applications due to the volume of custom controls Microsoft Office applications use. For this particular task, I would suggest using a C# script to look for that key in the registry. I was able to locate a key after a few minutes searching the web that seems to reflect the setting I have.
I generally do not like posting C# scripts, but I might be able to do this in an automation if you'd prefer. If you are comfortable with a little C# though, then this should be fairly simple.
To answer your question though; if you can interrogate a control, then generally speaking, the Enabled property would reflect whether or not it is enabled.
Eclatprime Digital Private Limited
IN
@Gopichand Muvva Hi that radio buttons are disabled and u are using windows adaptor so that is not a feasible. so once connect with pega team. they will suggested.
Thanks
TechMahindra
IN
Hello @Muniramaiah K
we are migrating bots from Automation anywhere to Pega Robotics. In automation anywhere they have an option called Is Radio button enabled to check whether the radio button is enabled or not even we do not have the access to enable or disable. Do we have any such option in Pega robotics?
Accepted Solution
Updated: 4 Jun 2024 9:39 EDT
Pegasystems Inc.
US
@Gopichand Muvva With Microsoft Office applications, Pega Robotics does not use traditional interrogation and instead uses Connectors to perform the most common functionality (for Outlook that being sending and receiving messages). This means you can't interrogate as thoroughly as other applications due to the volume of custom controls Microsoft Office applications use. For this particular task, I would suggest using a C# script to look for that key in the registry. I was able to locate a key after a few minutes searching the web that seems to reflect the setting I have.
I generally do not like posting C# scripts, but I might be able to do this in an automation if you'd prefer. If you are comfortable with a little C# though, then this should be fairly simple.
To answer your question though; if you can interrogate a control, then generally speaking, the Enabled property would reflect whether or not it is enabled.
TechMahindra
IN
@ThomasSasnett I am comfortable with C# can you please help me on this
Pegasystems Inc.
US
@Gopichand MuvvaAfter some research, it does not appear that this key is valid for modern Office versions and the only way to access this is through Outlook itself. I will attach a script that you can use to get this setting.
TechMahindra
IN
@ThomasSasnett Ok Can you please share the script.
Pegasystems Inc.
US
@Gopichand Muvva I am still working on it. I will try to post it today.
Pegasystems Inc.
US
@Gopichand Muvva I am not able to get this script working easily. I believe the concept will work, but it is not behaving. I will keep trying, but this seems like it is going to require using UI Automation as I cannot locate that setting documented as being in the registry or available in Outlook interop.
Pegasystems Inc.
US
@ThomasSasnett One further point I would add, is this specific item would not be a good candidate for Robotic Process Automation as it is a single-use process and this information is likely available elsewhere. My suggestion for this specific item would be to get the answer to this question from the Outlook admin rather than automating it, especially since it should be a global setting for the users who would be running the automation.
That being said, I did discover something interesting in looking into UIAutomation to do this. It appears as though the File menu cannot be located by UIAutomation using the traditional methods (at least on my machine). I was able to use a TreeWalker to locate it, but the traditional means of using the FindFirst or FindAll methods of an automation element were not working for me for that specific control.