Here is my code:
<div class="table row column" xpath="1">
<div class="table__head">
<div class="table__row">
<div class="table__cell sys-log__col-wrapper sys-log__col-id">
<div class="column small-2 sort_button_wrapper">
<button class="sort-ascending" ng-click="sortBy('Id', false)"></button>
<button class="sort-descending" ng-click="sortBy('Id', true)"></button>
</div>
ID
</div>
<div class="table__cell sys-log__col-wrapper sys-log__col-desc">Description</div>
</div>
</div>
${xpath_1} = //div[@class="table__row"]/div[1]
${xpath_2} = //div[@class="table__row"]/div[2]
I need to get ID as output for xpath_1
and Description as output for xpath_2
. but when I try to get output for below code I am getting:
${table_data}= Get Table Cell ${xpath_1}
The following error I am getting for this method
Keyword 'SeleniumLibrary.Get Table Cell' expected 3 to 4 arguments, got 1.
(or)
${table_data}= Get Text ${xpath_1}
empty space is coming as output for this method
Please suggest me how to get ID and Description as output from the above table using robot framework.
Using the example as a basis I've been unable to replicate your problem because when using
Get Text
keyword actually provides the desired ID value. Below are the files and approach for replicating this in your own setup.Create a new file:
div_value.html
In the directory where this file goes execute the following command:
I use RED, but other IDE's or text editors will work too. Create a robot file
div_value.robot
Using the debugger in RED I paused on the
No Operation
keyword line.