Hello Everyone,
I am trying to create a DYNAMIC SELECTOR that will always click on the latest/ bottommost BPA text ( which has an attachment hyperlink) from the table. I have been trying for couple of hours and I seem lost now.
#The only clickable text is BPA
#Every time I generate a report the total number of records increases and my selector is not the bottommost anymore.
Someone help me… I have tried the wild cards and played around with selectors , still not working.
Hi @Pema_Sherpa,
You can do two ways.
- Using extract Structure data extract tha data and using row count you can get that the last number.
2.using find children activity get the last element and you can click that one.
Refer below path
Regards,
Arivu
Hi @Pema_Sherpa ,
Use find children activity to get the last element and click that one.
Regards,
Arivu
I just used the find children activity and used the same selectors code in the click activity after that, it still clicks on the old text when I run it the second time.
@Pema_Sherpa In find children activity get the last element and click it.
Regards,
Arivu
Hi @Pema_Sherpa,
Find children output → innumerable
Assume as Children
Get the last element Children.last
Using click event pass the element as Children.last
Regards,
Arivu
The workflow has validation errors. Review and resolve them first.
System.Activities.InvalidWorkflowException: The workflow has validation errors. Review and resolve them first. —> System.Activities.InvalidWorkflowException: The following errors were encountered while processing the workflow tree:
‘DynamicActivity’: The private implementation of activity ‘1: DynamicActivity’ has the following validation error: The following overload groups are configured: Element, Selector. Only one overload group should have its arguments configured.
at System.Activities.Validation.ActivityValidationServices.ThrowIfViolationsExist(IList`1 validationErrors, ExceptionReason reasolve
@Pema_Sherpa, In click activity as arivu mentioned, pass children.last in element property
Regards,
Dominic
In click activity change the properties change selector to children.last
Regards,
Arivu
@arivu96, as it is an Uielement you need to pass it in element not in selector
Regards,
Dominic
Yes you are correct pass it into element property
Regards,
Arivu
Set the Scope property to “Find Descendents” .
Regards,
Arivu
@Pema_Sherpa
in find children activity use filtr as <webctrl tag='TR />
Regards,
Arivu
this is new pema.
An error has occured
Source: System.Xml
Message: Unable to cast object of type ‘Newtonsoft.Json.Linq.JValue’ to type ‘System.String’.
Exception Type: InvalidCastException
it gives out his error
@sherpa24,
can you elaborate, in which activity are you getting the issue
Regards,
Arivu
An error has occured
Source: System.Xml
Message: Unable to cast object of type ‘Newtonsoft.Json.Linq.JValue’ to type ‘System.String’.
Exception Type: InvalidCastException
System.InvalidCastException: Unable to cast object of type ‘Newtonsoft.Json.Linq.JValue’ to type ‘System.String’.
at System.Xml.XmlException…ctor(SerializationInfo info, StreamingContext context)
at Void .ctor(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)(Object )
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateISerializable(JsonReader reader, JsonISerializableContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateISerializableItem(JToken token, Type type, JsonISerializableContract contract, JsonProperty member)
at Newtonsoft.Json.Serialization.JsonFormatterConverter.Convert(Object value, Type type)
at System.Runtime.Serialization.SerializationInfo.GetValue(String name, Type type)
at System.Exception…ctor(SerializationInfo info, StreamingContext context)
at Void .ctor(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)(Object )
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateISerializable(JsonReader reader, JsonISerializableContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at UiPath.Shared.JsonParser.DeserializeObject[T](String jsonValue)
at UiPath.Models.UiPathDuplexProxy.<>c__DisplayClass21_0.b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
It is in find children activity.
Send screenshot or send me the xaml so that I try to resolve it
Regards,
Arivu