When running Codeception and Selenium on Ubuntu 18 this was working fine:
example PhpDriver test:
public function loadWidgetPage(AcceptanceTester $I)
{
$I->amOnPage("/en/system/widget.php?id=22002");
$I->see("Widget:");
$I->dontSee("error");
$I->dontSeeInSource("Fatal error");
}
Now I am trying to run the same test with Codeception and Selenium Standalone on Ubuntu 22.
I get
Failed asserting that on page /en/system/widget.php?id=22002
--> Widget - | Acme Widget Settings [redacted]
[Content too long to display. See complete response in '/home/vagrant/widgeter/tests/_output/' directory]
--> does not contain "error".
However, the word "error" is being detected in things like hidden fields or even alert text strings:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("#inquiry").bind("click", function(e) {
$.post("/en/system/inquiry.php", postData,
function(data){
if(data == "NG"){
alert("Error erasing inquiry. Are you logged in?");
}
}
);
});
</script>
Can Selenium Standalone ignore strings invisible to the user?
My Ubuntu version:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy