Execute an action if len of a string in browser is more than 1

Is there a way to execute an action if len of a string is more than 1?

I tried using Check App State and Get Text but it didn’t work out as expected.

I would like to execute a click action If the len of the string below the “Billing Account Code” is more than 1.

Thanks for the help in advance!

Hi,

I think we can use GetText activity with proper selector. Probably we can use colName attribute.
So can you try to use UiExplorer then indicate target cell?

Or, as another approach, it’s also good to use DataScraping.

Regards,

1 Like

Hi @Justine

First use data scraping to get the table and then read the len of the firs row first column using dt.rows(0)(0).tostring and calculate the length .And i am not sure where you want to click but if the element tou want to click is spied then use click else try anchor base by using find element as anchor and then base as click

Cheers

1 Like

Hi @Yoichi , @Anil_G ;

I managed to use data scraping and have the data extracted into a table but somehow, the data in the excel file seems to differ from the data in data scraping.


workflow as flows:

  • use browser
  • data scrap
  • excel application scope
  • build data table
  • write range

Hi,

Build datatable is not necessary. For now, can you try to wirte extactDataTable to excel sheet using WriteRange activity directly?

Regards,

1 Like

Hi @Justine

From the datascrapping you will get the datatable output just send that output to read range . As @Yoichi pointed build datatable is not needed. You just need to add retrieved data to excel if you want to.

Cheers

1 Like

thanks all @Anil_G , @Yoichi ! i selected the wrong variable. managed to get it to work

1 Like

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