cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Epyros
New Member

Can't edit selector without getting errors

Hello, I've been trying Power Automate Desktop and I still can't edit the selector of an element to make it dynamic, let me explain:

 

(Sorry for the lack of a serious webpage, it's just for practice)

 

The webpage has a list o links, I've mapped one of them and the selector starts like this:

 

List of links:

Epyros_0-1609249191953.png

I mapped the first link and got this selector by default:

Epyros_1-1609249254997.png

The only thing I've been able to change is the ordinal on the 7th item (This way I can change the ordinal and click another link, but I want to reference them by the InnerText):

Epyros_2-1609249321227.png

Here I just added one element on the last item, the innertext (As far as I understand, this should work as its the same item and the text should match with the element):

Epyros_3-1609249439421.png

Sorry for the portuguese but here's the error:

Epyros_4-1609249523668.png

(Robin.Core.ActionException: Click link on web page failed. ---> System.NullReferenceException: Referência de objeto não definida para uma instância de um objeto.
em Robin.Modules.WebAutomation.Actions.WebAutomationRuntime.ClickLinkOnWebPage(WebBrowserInstanceVariant webBrowserInstanceVariant, TextVariant cssSelectorForLinkElement, Boolean waitForPageToLoad, TextVariant dialogButtonToPress, WebPageCourseOfActionIfDialogAppearsEnum courseOfActionIfDialogAppears)
em Robin.Modules.WebAutomation.Actions.WebAutomationActions.ClickLinkOnWebPage(Variant webBrowserInstance, Variant cssSelectorOfElementToClick, Variant dialogButtonToPress, Boolean waitForPageToLoad, Int32 courseOfActionIfDialogAppears)
--- Fim do rastreamento de pilha de exceções internas ---
em Robin.Modules.WebAutomation.Actions.ClickBase.Execute(ActionContext context)
em Robin.Runtime.Engine.ActionRunner.RunAction(String action, Dictionary`2 inputArguments, Dictionary`2 outputArguments, IActionStatement statement))

 

Have any idea of how to solve this?? So far I've come up with a loop that iterates the ordinal of the element, reads the inner text and compares until it gets the right element, but I've read in these forums that it should be possible to map it more precisely.

 

Sorry for my english, and thank you in advance

 

HNY

 

 

 

2 REPLIES 2
JosiasDeleu
Regular Visitor

I am facing the exact same problem.

As soon as I edit the selector, it stops working.

It does not let me use the InnerText attribute.

 

This is a key feature so that we can continue using PA.

I have already done another post, reporting this problem, but without a solution so far.

Nader_Badawy
New Member

you can use a custom selector:

a:contains("WhateverInnerTextYouNeed").

you can also use a variable instead of literal string.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Top Solution Authors
Top Kudoed Authors
Users online (2,574)