ADS KUL
ADS KUL

Reputation: 312

Log to Console and Should be equal issues in Robot Framework

I have below application under test. enter image description here

I am using Selenium2Library-Python-RobotFramework. Below is my code where I am fetching the expected price with the help of xpath. For original price I have already set the variables in variable.robot.

${ExpectedPriceProductAPrice} =   Get Text   xpath=//span[@id='Price']
sleep  2
Log To Console    Price is  ${ExpectedPriceProductAPrice}
${ExpectedPriceProductACount} =   Get Text   xpath=//span[@id='Count']
sleep  2
Log To Console    Count is   ${ExpectedPriceProductACount}

should be equal   ${ExpectedPriceProductAPrice}   ${OriginalPriceProductAPrice}
should be equal   ${ExpectedPriceProductACount}   ${OriginalPriceProductACount}
should be equal   ${ExpectedPriceProductBPrice}   ${OriginalPriceProductBPrice}
should be equal   ${ExpectedPriceProductBCount}   ${OriginalPriceProductBCount}

I am facing two issues :

  1. Values are not getting log to console.
  2. If should be equal is failed for first statement then it is not moving ahead to check all other should be equal conditions

Upvotes: 0

Views: 174

Answers (0)

Related Questions