0

I want to store in a variable a list of values of column 2 that are in a table of 9 columns inside a iframe.

I recorded a macro in Selenium IDE++ (Kantu for chrome) where I selected (click) 3 items of the table that are in second column. The text of the items are 552, 559 and 753 appears inside the Xpath of each value. Finally in my recorded macro I clicked on the link for first item which value is 552.

Then I would like to know how to store previously in a variable, all values in column 2 and store it in a variable in order to apply then a loop over each value?

Bwlow the commands I have so far from macro recorder.

+---------------+-----------------------------------------+---------+
|               |                                         |         |
|   Command     |   Target                                |   Value |
|               |                                         |         |
+---------------+-----------------------------------------+---------+
|               |                                         |         |
|   open        |   http://URL                            |         |
|               |                                         |         |
+---------------+-----------------------------------------+---------+
|               |                                         |         |
|   selectFrame |   name=frame1                           |         |
|               |                                         |         |
+---------------+-----------------------------------------+---------+
|               |                                         |         |
|   selectFrame |   id=frameABC                           |         |
|               |                                         |         |
+---------------+-----------------------------------------+---------+
|               |                                         |         |
|   click       |   xpath=//*[@id="ABC_552_120_24"]/td[2] |         |
|               |                                         |         |
+---------------+-----------------------------------------+---------+
|               |                                         |         |
|   click       |   xpath=//*[@id="ABC_559_121_24"]/td[2] |         |
|               |                                         |         |
+---------------+-----------------------------------------+---------+
|               |                                         |         |
|   click       |   xpath=//*[@id="ABC_753_131_47"]/td[2] |         |
|               |                                         |         |
+---------------+-----------------------------------------+---------+
|               |                                         |         |
|   click       |   link=552                              |         |
|               |                                         |         |
+---------------+-----------------------------------------+---------+

Thanks for any help.
Ger Cas
  • 2,188
  • 2
  • 18
  • 45
  • @JimGrigoryan Hi Jim. Visibly in table in column 2 are 552, 559 and 753. Those values at the same time are links. So, I want to store in a variable array all the values in column 2 in order to apply a loop over the array to use it later to open each link. So the values stored in array would be `552, 559, 753` – Ger Cas Jun 25 '19 at 12:57
  • @JimGrigoryan The issue is to use `storeText` I need to know the Xpath of the table, but when I record the macro, I cannot select the table to see how Kantu finds it, I clicked on each link to see what is recorded, but the Xpath of each value contains the string of each value itself within it. So, I cannot use the Xpath of each value if I don't know previously the values in column 2 and how many they are. I hope make sense – Ger Cas Jun 25 '19 at 14:27

0 Answers0