Unable to fetch the text from the grid in robot framework and selenium

48 views Asked by At

I am using Python-Robot framework-Selenium Library2. One grid is under testing. I want to fetch the value/text from first row of the grid and save to one variable. Text is something like 'MM'. I have tried with all the xpaths. From robot framework I have used Get Text, Get Value, Get Element Attribute and all possible functions from selenium 2 library but it is not working.

Couple of examples of my tries;

  1. ${Code} = Get Text xpath=//*[@id="table"]/tbody/tr[${rows}]/td[22]
  2. ${Code} = Get Text //tr[@id='1b2-455']//td[contains(text(),'MM')]
  3. ${code} = Get Element Attribute xpath=//*[@id="table"]/tbody/tr[${rows}]/td[22] value

Any suggestion? Thanks !

0

There are 0 answers