PHP 5.3+ Web Browser simulation test: Mink

Source: Internet
Author: User
Mink is an open source PHP browser/Controller simulation test tool. Mink can simulate the interaction between the Web app and the browser, testing the Web app for the correct behavior.
  New Gouttedriver (New Goutteclient ()), ' goutte2 ' = new Session (New Gouttedriver (New Goutteclient ())), ' Custom ' = new Session (new Mycustomdriver ($STARTURL))); Set the default session name$mink->setdefaultsessionname (' Goutte2 '); Visit a page$mink->getsession ()->visit ($STARTURL); Call to GetSession () without argument would always return a default session if have one (Goutte2 here) $mink->getsessio N ()->getpage ()->findlink (' Downloads ')->click (); Echo $mink->getsession ()->getpage () GetContent (); Call to GetSession () with argument would return session by its name$mink->getsession (' Custom ')->getpage ()->fin DLink (' Downloads ')->click (), Echo $mink->getsession (' Custom ')->getpage ()->getcontent (); This are done to make possible mixing sessions$mink->getsession (' goutte1 ')->getpage ()->findlink (' Chat ')- >click (); $mink->getsession (' Goutte2 ')->getpage ()->findlink (' Chat ')->click ();

Project home:http://www.open-open.com/lib/view/home/1430832116976

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.