Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7871485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:55:14+00:00 2026-06-03T01:55:14+00:00

i am using selenium with phpunit to test some of my web stuff but

  • 0

i am using selenium with phpunit to test some of my web stuff but it seems to fail even though i can see the text that i am testing for in the failing screenshot- my test is listed below

<?php
include('setupclass.php');
class AddNewPicStationTest extends setupclass
{


    protected function setUp()
    {
        parent::setUp();
    }

    public function testMyTestCase()
    {
        $this->open($this->apppath);
        $this->click("css=a > img");
        $this->waitForPageToLoad("30000");
        $this->type("name=username", "");
        $this->type("name=password", "");
        $this->click("name=submit");
        $this->waitForPageToLoad("30000");
        $this->click("link=ADD LIKESTATION");
        $this->waitForPageToLoad("30000");
        $this->click("link=HOME");
        $this->waitForPageToLoad("30000");
        $this->click("link=ADD PICSTATION");
        $this->waitForPageToLoad("30000");
        $this->type("id=title", "Test title 2");
        $this->type("id=message", "test description 2");
        $this->click("id=tip5");
        $this->type("id=album_title", "test album title 2");
        $this->type("id=album_description", "test album description 2");
        $this->click("//input[@value='Login']");
        $this->click("xpath=(//input[@name='group1'])[2]");
        $this->type("name=station_pic_upload", "C:\\Users\\chris laptop\\Desktop\\Logo.png");
        $this->click("name=g");
        $this->waitForPageToLoad("30000");

        **$this->assertTrue($this->isTextPresent("Test title 2"),"object created");**
        $this->assertFalse($this->isTextPresent("Error"),"Error is present");
        $this->assertFalse($this->isTextPresent("Profiler"),"PRofiler is running");

        $this->click("link=LOGOUT");
        $this->waitForPageToLoad("30000");
    }
}
?>

the asterisk line fails even though it is present in the screen grab.. i am new to this and any help would be appreciated

this is my page below that the test is looking for- STATION TITLE

<table width="620px" align="left" style="text-align:left;">
        <tr style="font-weight:bold;background-color:#f1f1f1">
            <td colspan="5" STYLE="text-align:center;font-weight:bold">FACEBOOK PIC STATIONS</td>
        </tr>
        <tr style="font-weight:bold;background-color:#f1f1f1">
            <td width="15%">STATION ID</td>
            <td width="50%">STATION TITLE</td>
            <td width="10%">STATION STATS</td>
            <td width="15%">LAST POST</td>
            <td width="10%"></td>

        </tr>
        <?foreach($picstations->result() as $row){?>
            <tr>
                <td><?=anchor('socialmedia/edit_picstation/'.$row->station_id,$row->station_id);?> </td>
                <td><?=anchor('socialmedia/edit_picstation/'.$row->station_id,$row->title);?> </td>
                <td><?=anchor('stats/home/station_stats/'.$row->station_id,'STATS');?> </td>
                <td><?=$this->upd8r_date->get_last_post_from_station_time($row->station_id)?></td>
                <td><?=anchor('socialmedia/delete/'.$row->station_id,'delete');?></td>
            </tr>
        <?}?>
    </table>

and heres my phpunit output-

1) AddNewPicStationTest::testMyTestCase
Current URL: http://localhost/upd8r_new/socialmedia/add_picstation
Screenshot: http://localhost/upd8r_new/tests/screenshots/692eb179f8146d2a8491442
68dd2a99a.png

object created
Failed asserting that false is true.

C:\xampplite\php\phpunit:46

FAILURES!
Tests: 1, Assertions: 1, Errors: 1.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:55:15+00:00Added an answer on June 3, 2026 at 1:55 am

    just to add some closure- if you looking at this question and struggling with the same issue- I’m using selenium and phpunit on windows 7.

    Altering waitForPageToload(1) wasn’t doing anything so I added sleep(1); to the code and this allowed the tests to run and pass correctly

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to do set up some Selenium WebTests using PHPUnit, but php is
I using PHPUnit and Selenium Server to testing Yii Application, but whenever i tried
I am using Selenium IDE Firefox plugin to create some test cases. I click
I'm using Selenium IDE to occasionally test my web applications. However, since Selenium IDE
I'm using selenium-client to run a few tests, but Selenium seems to be using
I'm using selenium in my test suite, but since it's slow to set up,
Using, Centos, Apache, PHPUnit, Selenium RC, I was trying to test selenium RC which
I am using the following code to access a link (for phpunit/selenium): //td[normalize-space() ='Test
I'm using PHPUnit's Selenium extension to do web testing. I'm finding it very slow,
I am using Selenium to give rating to some video. The page source for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.