I have task when I want to press button with "Delete" caption according to string (picture attached). There are many these sections in application and I want to press the Delete button according to specific H6 string.
I need to write click action to find the code with H6 value (this time "app111") and click on the button Delete.
I have tried something like this "rightOf('app111').find('button').click() or below('app111').find('button').click()" in many variations but I was not successful.
In some cases (when the tags are in straight path works for me: click('{//*[normalize-space(text()) = \'' + appName + '\']/../../div/table/tbody/tr/td[2]/a[2]}'), but this time H6 and DIV are on the same level. Now the structure is (more on picture attached):
H6
DIV
A
DIV
DIV
A
DIV
A
BUTTON
SPAN
How to write button click according to H6 value (click on next "Delete" button after H6 with specific string)
Thank you for some help!