Question
CenturyLink
US
Last activity: 16 Jul 2021 14:24 EDT
Options for dealing with interrogated web controls with changing tag/node names
If I'm understanding correctly, when interrogating web controls via Pega Robotics Interrogator:
- Each step in the element hierarchy towards the target control that is represented by a non-standard HTML node/tag name must be represented as an interrogated control under the adapter
- Pega silently stores the node/tag name of the element and uses it as a sort of silent match rule
The combination of these behaviors lead to an issue for us when interrogating controls in a Salesforce Lightning environment. Some portions of the hierarchy of Salesforce Lightning elements have a tendency to change their tag/node name semi-frequently, which also causes all controls under that one to stop matching, even if none of the match rules we've set up specifies the node/tag name to identify the controls.
I would normally use Pega to send JavaScript to the page to achieve the desired functionality, but Salesforce Lightning obfuscates almost all web elements from the 'document' object. I considered trying to pass the web element represented by an interrogated control to one such JavaScript function, but I have not found a way to access the actual web element represented by a matched control from Pega Studio. I expected it to be in the interrogated control properties, but was unable to find anything that looked to fill the part, and, as expected, passing the interrogatedWebControl.This property value to use as the represented web element in the script does not work.
If I'm understanding correctly, when interrogating web controls via Pega Robotics Interrogator:
- Each step in the element hierarchy towards the target control that is represented by a non-standard HTML node/tag name must be represented as an interrogated control under the adapter
- Pega silently stores the node/tag name of the element and uses it as a sort of silent match rule
The combination of these behaviors lead to an issue for us when interrogating controls in a Salesforce Lightning environment. Some portions of the hierarchy of Salesforce Lightning elements have a tendency to change their tag/node name semi-frequently, which also causes all controls under that one to stop matching, even if none of the match rules we've set up specifies the node/tag name to identify the controls.
I would normally use Pega to send JavaScript to the page to achieve the desired functionality, but Salesforce Lightning obfuscates almost all web elements from the 'document' object. I considered trying to pass the web element represented by an interrogated control to one such JavaScript function, but I have not found a way to access the actual web element represented by a matched control from Pega Studio. I expected it to be in the interrogated control properties, but was unable to find anything that looked to fill the part, and, as expected, passing the interrogatedWebControl.This property value to use as the represented web element in the script does not work.
Is there a way to disable the requirement for the node/tag name for interrogated controls? I've tried manually removing the relevant data from the target interrogated control in the adapter.os, but that just causes the control(s) in question to never match. If not, is there a way I can access the web elements represented by interrogated controls under a web adapter for use in a custom JavaScript function? Alternatively, are there any other suggestions for dealing with this sort of situation?