Selector problems for the search bar

Hello guys, I have a problem, that i dont really know how to solve anymore. The thing is, that I have a process that inserts a code to a search bar of this page and needs to click a specific line. The specific line is the one that has text “Signeda”, if there is no line, it searches for another called “KLARKSONAS” and ect. BUT, I have a problem, a big problem. I dont understand what i did wrong, but the selector doesnt always click things inside the search bar selector. Lets say, it goes from one page to another, it writes another code to the search bar, the search bar doesnt have “SIGNEDA” line in it, so it clicks anywhere else on the web page where it finds text Signeda in it. How to do so, that it would specificaly click only text in the search bar?
My clicks fuzzy selector is this:

“”

Another problem, the click activity for some reason now clicks the row in the screenshot for some reason, even tho it doesnt have aaname “Signeda” in it.

@Povilas_Jonikas

you can use check app state to check if row exits with word Signeda with following selector

<html app='chrome.exe' title='*' />
<webctrl parentid='ap-search' tag='SPAN' innertext='Signeda*' />

instead of signeda if you want use any other values you can use variable

1 Like

Hello @Darshan_Sable and thanks for your quick response.

And can you help me with one more thing? Lets say that it found the element? How to then click it and only it?

Also, i need to check 4 values in the rows. Is it possible to check if there is a element with Signeda*, FPS, Klarksonas, Polcar?

@Povilas_Jonikas

you can use regex in selector to include all 4 values with or condition..and to click only in search bar make sure to include an attribute related to search dropdown field so that it clicks on in that area

also using fuzzy can click on any location instead use strict with regex and attributes related to search dropdown

<webctrl tag='SPAN' innertext="Signeda\*|FPS|Klarksonas|Polcar" matching:innertext='regex' />

the above is an example regex selector..you might still need to include attributes specific to search bar dropdown

Hope this helps

cheers

1 Like

Thanks @Anil_G for the answer. So basically, now with your given Regex selector it will try to find any of the given values? But what will happen, when more then 1 of the values are present? Because the logic of my workflow should be like so - Signeda value gets the priority of the click activity. IF there lets say are Signeda and FPS rows, only signeda should be clicked, but if there are ex. FPS and KLARKSONAS, then it doesnt really matter.

@Povilas_Jonikas

the first one found would be clicked anyways…so you can give in same order and check

cheers

1 Like

@Povilas_Jonikas you can use same selector for click activity.

for Signeda, FPS, Klarksonas, Polcar each of them you can use for loop to check if any one exists. if anyone found exit the loop else set up a Boolean to false it means all four not found

1 Like

Thanks to both of u, you are legends! :slight_smile:

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.