Question
ServiceNow
JP
Last activity: 27 Feb 2018 1:54 EST
"Visible" attribute specification in a match rule
Can we somehow specify "Visible" attribute value as a match rule for Web adapter?
As for now, we have multiple hits in Targets, and need to pick up the one from the list. It can be achieved by "Visible" attribute specification in this customer's case.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
Here is a script you can pass the WebPage into to see if it is Visible.
Pegasystems Inc.
US
There's a property of the control named "UnmatchOnHidden". You may try that to see if that works for you. In addition, you could also check that property in your automation and skip your automation logic based on that property (i.e. don't do it if it is invisible).
ServiceNow
JP
Thank you! But "UnmatchOnHidden" property seems to be the one for Windows adapter, not for Web Adapter, according to the help pages. Can we somehow use it for Web browser?
Standard Chartered Global Business Services
IN
If the 'OuterHtml' (or InnerHtml) of the control specifies this value 'Visible' (whether visible or not), you may add the 'Attribute Value Match Rule' and specify the Attribute 'OuterHtml' and in the 'Text' property of this match rule, you may define the match as required.
Nihon Insight Technologies Corporation
JP
Thank you everyone.
I am one of the member of the project which met this problem.
It seems to be resolved by setting the value of usekey property to "true".
All of targets become to be attached to one control and when a automation process runs,
a appropriate target (having visible=true) is automatically selected by a robot even though there are some candidate target(In the condition that there is only one target which have visible=true).
I set the value of key property to "none" on the design blocks in the automation flow.
Pegasystems Inc.
US
I would not recommend leaving this to chance. When you set UseKeys to true you get a CloneCollection which you can iterate through using the GetClones method. You can then check each clone for the Visible property to ensure you are operating on the correct one.
Nihon Insight Technologies Corporation
JP
Thank you jeff.
I tried to do that, but the the control on which i set UseKey propery is "OpenSpan.Adapters.Web.Controls.WebPage".
It doesn't have visible property.
I can see the visible property only in
Match Rules Window (of WebPage control)
> Selected Target Area (whose NativeTypeName is OpenSpan.Adapters.Web.HtmlDocument)
> ParentTarget (whose NativeWindowname is Internet Explorer_Server)
> Visible
Could you give me some advices ?
Accepted Solution
Pegasystems Inc.
US
Here is a script you can pass the WebPage into to see if it is Visible.
Nihon Insight Technologies Corporation
JP
Thanks a lot. I think it must work well.