Hot answers tagged


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: Maybe you should first Convert To Number, those seem Floats:


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 Library SeleniumLibrary *** Test Cases *** Input Text Open Browser file:///D:/testout.html chrome Wait Until Page Contains Element xpath://*[contains(text(),"In ...


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:


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


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