visualSearch & clickAt


#1

Hi,
great tool, makes my life easier.

I’m facing a problem (cant share the website, sry):

I need to click on a “button”, it looks like this:
grafik

the problem is there stands always a different number and i cant use the “button” id.

<a ng-class="{'editing-disabled': !editingEnabled}" ng-click="show(formName)" e-form="formName" editable-textarea="value" e-maxlength="75" e-class="padding-xs border" e-rows="5" e-cols="40" e-ng-change="updateCharsLeft($data)" onshow="updateCharsLeft()" oncancel="editing.editingMode=false" onbeforesave="save({data: $data})" class="ng-scope ng-binding editable editable-empty">
            ---
        </a>

I used the visualSearch-command, it finds the “button”. But if i try to click that “button” with #efp, it clicks always the screenshot.

{

“CreationDate”: “2018-9-5”,
“Commands”: [
{
“Command”: “visualSearch”,
“Target”: “parent1.jpg”,
“Value”: “matches”
},
{
“Command”: “clickAt”,
“Target”: “#efp”,
“Value”: “2,2”
}
]

can you help me? thanks.


#2

What do you mean that it clicks “the screenshot”?


#3

https://forum.a9t9.com/uploads/db8324/original/1X/a253258dff472e7e0fe7df578a393ed8b645cd30.png

this image, i use it for the visualsearch command.


#4

Are you sure this is all the button?
As far as i understand, #efp clicks on the center of FOUND area, so if you have clickable only link at the right, than it will not fire a click-command correctly.
Does it solve your problem?


#5

thanks Dukuu,
is misunderstood that then.

Any Idea how i can click that button to the right? can i say - pls click the first right button?


#6

The simplest for me is to use xpath to locate element.
If you can’t use classes or other attributes as a unique identifier, use just a path to it from some known unique element.
As an example:
/html/body/div/div[2]/div[1]/div[3]/div[2]/div[2]/div[4]/div[1]/div[1]/div[4]/div[2]/a
You can copy that link via context menu in browser, when debug mode is enabled: http://i.prntscr.com/dii3on4LSASqCMEgTbpmRQ.png
And you can simplify it if you need, to, example:
//div[1]/div[4]/div[2]/a
or add some identifier in it:
//div[@id=“someIdHere”]/div[4]/div[2]/a

Does it work for your case?


#7

it works. thank you so much.:+1::+1: