Click on table row based on that cells meets a condition

Hi,

<webctrl id='rad0' name='rad0' parentid='sorttab' parentname='sorttab' tableCol='1' tableRow='2' tag='TR' innertext='RandomText 123123 2021-01-04 FL TextText 5.3200XXXXX xxxxx zzzzz zzzzzz 1 123122015-02-04 LAL 4365242 Yes' />

Just to clarify:

  1. “5.3200XXXXX xxxxx” should be two cells. “5.3200” is a separate cell from “XXXXX xxxxx”
  2. “zzzzz zzzzzz 1” is one cell
  3. “123122015-02-04” should be two cells. “12312” is a separate cell from “2015-02-04” is one cell.

So a total of 16 columns where some cells are empty.

I will use the above as an example. Lets say i want to replace “5.3200XXXXX xxxxx” for variable.
Note that “5.3200XXXXX xxxxx” is two cells as stated above.

I also want to replace “123122015-02-04” for a variable. Note that “123122015-02-04” is two cells as stated above.

I also want to replace “LAL” with a variable.

How would I write it in the format *{{test1}}{{test2}}*{{test3}}... ?
Note that I dont care about the values in the other cells/innertext.

I have tried(does not work) these two formats:

innertext=' *{{test1}}{{test2}}*{{test3}}{{test4}}*{{test5}}*' />

and

innertext=' *{{test1}}*{{test2}}*{{test3}}*{{test4}}*{{test5}}*' />

I dont know if the spacing in the innertext is the problem or that some cells does not have spacing at all.

What do you guys/girls say? :slight_smile:

@Nithinkrishna Thank you for your help yesterday and it solved that task, I know have this one that is a bit “harder”.

1 Like

@atomic, No problem you are free to collaborate here :slight_smile:

Your approach is right. As I can see LAL is after 123122015-02-04 in the below selector

Only thing you need to make sure is - test5 variable is the one which should hold LAL

Thanks :slight_smile:

1 Like

Thank you :slight_smile:

{{test5}} is holding “LAL”

Note that “123122015-02-04” is not one cell. In the innertext you would think it is because it doesnt have any spacing. it should be like this “12312” “2015-02-04”.

{{test1}} = “5.3200"

{{test2}}= “XXXXX xxxxx”

{{test3}} = “12312”

{{test4}} = “2015-02-04”

{{test5}} = “LAL”

1 Like

@atomic,

innertext=’ {{test1}}{{test2}}{{test3}}{{test4}}{{test5}}’ />

I can see there is a space after ’ in inner text (at the start of the string)

can u try without initial space as below please

image

Thanks :slight_smile:

1 Like

OMG THANK YOU, it was the space between ´ and {{test1}} hahaha. How could I not see that haha?

Just for your information both this:

innertext='*{{test1}}{{test2}}*{{test3}}{{test4}}*{{test5}}*' />

and this

innertext='*{{test1}}*{{test2}}*{{test3}}*{{test4}}*{{test5}}*' />

worked now :slight_smile:

1 Like

Yep :slight_smile:, It happens

You can use which ever is reliable.

Happy Automation :+1:

1 Like

Thank you.

And you too :slight_smile:

1 Like

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