php - Invalid cookie on submitting a form with Codeception -


i'm trying test project codeception (acceptance tests). going fine until had submit form paypal button.
when debugging shows

i submit form "form:nth-child(3)", [uri] https://www.sandbox.paypal.com/cgi-bin/webscr [method] post [parameters] {"cmd":"_s-xclick","hosted_button_id":"buttonid"} error 

and goes

[runtimeexception] invalid cookie: cookie value must not empty 

i not set cookies during test. , have no clue why firing error up.

here's acceptance.suite.yml

class_name: acceptancetester modules:     enabled:         - phpbrowser:             url: http://test.mysite.com         - \helper\acceptance 

here's subscriptioncest.php:

<?php use \acceptancetester;  class subscriptioncest {     public function _before(acceptancetester $i)     {     }      public function _after(acceptancetester $i)     {     }      // main function     public function run(acceptancetester $i)     {         $i->am("new user");         $i->wantto("purchase membership");         $i->amonpage("/subscription");          $i->submitform("form:nth-child(3)", []);     } } 

and here's html of paypal form:

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="buttonid"> <input type="image" src="https://www.sandbox.paypal.com/en_us/i/btn/btn_subscribecc_lg.gif" border="0" name="submit" alt="paypal - safer, easier way pay online!"> <img alt="" border="0" src="https://www.sandbox.paypal.com/en_us/i/scr/pixel.gif" width="1" height="1"> </form> 

why error happen , how resolve problem? thanks.

so turned out bug, fixed. version 2.1 should have working charm. more information please check out https://github.com/codeception/codeception/issues/2234


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -