Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
PhpBrowser does not honouring <base href=""> meta tag #3764
What are you trying to achieve?
By using PhpBrowser trying to click an anchor link.
What do you get instead?
current URL becomes 'http://example.com/sitefolder/folder/service/service/action' as if there is no
$I->amOnPage('/service/panel'); $I->seeLink('Action', 'service/action'); $I->click(['link' => 'Action']); $I->seeCurrentUrlEquals('http://example.com/sitefolder/folder/service/action');
class_name: AcceptanceTester modules: enabled: - Asserts - PhpBrowser: url: http://example.com/sitefolder/folder - \Module\RESTAPI: depends: PhpBrowser - Db: dsn: 'pgsql:host=localhost;dbname=dbname' user: 'username' password: 'password' dump: dump.sql populate: true cleanup: false reconnect: false
It seems modifying click() function from InnerBrowser class, within a Module which extends \Codeception\Module\REST is nearly impossible due to lots of missing function errors caused by deep rooted dependency tree. No luck with getAbsoluteUrlFor() function either.
I have to clone whole InnerBrowser class into my custom module to fix this issue without modifying codeception itself I think. Any suggestions?
By comparing 2.1.5 with 2.2.6 I found that anchor link processing code of click() function in InnerBrowser
Does these two code block doing exactly the same thing?
What is the source of Link class in clientClick function?
It seems to have getUri() function of its own. May it be using the baseHref value from Crawler somehow?
Don't try to clone InnerBrowser, fix it instead.
Or I can try to fix it this weekend.