I agree that it is a bad idea to reimplement the SUT's algorithm inside the test. It is bad because the test's algorithm is just as likely to be buggy as the SUT's algorithm. Or worse, the test may replicate a bug in the SUT.
If your test hard-codes the expected result rather than calculating the expected result, it may need to include additional comments ...
From the documentation I expect any "item" to be able to Convert To String: https://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Convert%20To%20String
Maybe you should first Convert To Number, those seem Floats: https://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Convert%20To%20Number
Your test should have as little logic as possible. This helps prevent additional bugs in your test which may lead to false positives/false negatives. Hardcoding your expected results is an acceptable approach. You shouldn't reimplement your feature inside of your tests.
Get Value, returns the content of the 'value' attribute.
Use Get Text instead
*** Settings ***
Documentation This is the script for Create Sales Visit Repository
*** Test Cases ***
Open Browser file:///D:/testout.html chrome
Wait Until Page Contains Element xpath://*[contains(text(),"In ...
Even I faced the issue in recent versions of auto it and python:
Check your python architecture ( is it 32 or 64 bit)
Just type python and see
Open cmd in "Run as administrator" mode
run the command pip install robotframework-autoitlibrary
Now clone the autoit library source code:
Should we replicate the business logic in tests?
Ideally once the software has done, what is supposed to be tested, a test should just assert the actual state with the expected pre-determined state of the SUT.
As far as calculating pre-determined expected state is concerned ,a
test's primary objective is to 'Verify' an expected state , not to
If your objective is to get the html source code, you can do that using
You generally can't access stuff like that, the way you are trying to, because selenium is sandboxed your browser. You can access chrome dev tools using the dev tools API or a testing framework like puppeteer which has access to dev tools API.