Xpath with combination of Preceding-sibling and following-sibling

前端 未结 2 1525
不知归路
不知归路 2021-01-26 06:30

I am trying to read the values from this screen( Sections appears dynamically it can be more than one). We have to read each field like Local Radios, MAC Address, Version from G

2条回答
  •  花落未央
    2021-01-26 07:15

    Since you have tagged Robot Framework, i'll give a robot specific solution here:

    ${legal_key}=      Get Text    xpath://td[text()='Local Radios']
    ${legal_value}=    Get Text    xpath://td[text()='Local Radios']/following-sibling::td
    

    Similarly for all the other fields you want.

提交回复
热议问题