Score:0

Codeception + Selenium Standalone sees strings not visible in browser

us flag

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
ru flag
What exact version of Ubuntu are you using? Show the output of `lsb_release -a`
Thunder Rabbit avatar
us flag
Thank you, @ThomasWard . Ubuntu version added in question.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.