Zend certified PHP/Magento developer

MFTF with protected files

I am doing an MFTF for the product page on a test environment with htpasswd (apache file protection), I enter the htpasswd credentials in the url in order to bypass the test.
ex: https://test:test@dev.website.com
but doing this throws a JS errors in the browser console “require is not a function”

enter image description here

due to this error the test fail because it can not click on elements.

Is there a way to do the MFTF test with htpasswd without having these errors?