cancel
Showing results for 
Search instead for 
Did you mean: 

Catchable fatal error: Argument 1 passed to Magento\Mtf\Config\Dom::_mergeNode() error

Catchable fatal error: Argument 1 passed to Magento\Mtf\Config\Dom::_mergeNode() error

I want to share a solution for a very common MATF error in Magento 2.1.8 version. If you want to run the single functional test cases in Magento 2.1.8. and getting the below error :

 

[Common Error] Catchable fatal error: Argument 1 passed to Magento\Mtf\Config\Dom::_mergeNode() must be an instance of DOMElement, null given, called in dev\tests\functional\vendor\magento\mtf\Magento\Mtf\Config\Dom.php on line 100 and defined in dev\tests\functional\vendor\magento\mtf\Magento\Mtf\Config\Dom.php on line 116

Then do the following changes to sort out this problem:

Go to \dev\tests\functional\etc\config.xml file and move the <handler></handler> under </config> like  this:

<config>
...
...
<handler>
<webapi priority="0">
    <token><Your_Application_Token_Number></token>
</webapi>
<curl priority="1"/>
<ui priority="2"/>
</handler>
</config>

Now run any single functional test case without any problem. 
Have a fun Smiley Happy

 

-- Ravindra
1 REPLY 1

Re: Catchable fatal error: Argument 1 passed to Magento\Mtf\Config\Dom::_mergeNode() error

I have handler under config, but still facing same issue