Hot answers tagged

4

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 ...


3

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


2

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.


1

Get Value, returns the content of the 'value' attribute. Use Get Text instead *** Settings *** Documentation This is the script for Create Sales Visit Repository Library SeleniumLibrary *** Test Cases *** Input Text Open Browser file:///D:/testout.html chrome Wait Until Page Contains Element xpath://*[contains(text(),"In ...


1

Updated: Even I faced the issue in recent versions of auto it and python: Fix: Check your python architecture ( is it 32 or 64 bit) Just type python and see For 32: Open cmd in "Run as administrator" mode run the command pip install robotframework-autoitlibrary Now clone the autoit library source code: https://github.com/nokia/robotframework-...


1

Should we replicate the business logic in tests? NO. 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 ...


1

If your objective is to get the html source code, you can do that using driver.getPageSource() 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.


Only top voted, non community-wiki answers of a minimum length are eligible