src/Browser.php
public function onComponent($component, $parentResolver)
    {
        $this->component = $component;

        // Here we will set the component elements on the resolver instance, which will allow
        // the developer to access short-cuts for CSS selectors on the component which can
        // allow for more expressive navigation and interaction with all the components.
        $this->resolver->pageElements(
            $component->elements() + $parentResolver->elements
        );

        $component->assert($this);

        $this->resolver->prefix = $this->resolver->format(
            $component->selector()
        );
    }
public function onComponent($component, $parentResolver)
    {
        $this->component = $component;

        // Here we will set the component elements on the resolver instance, which will allow
        // the developer to access short-cuts for CSS selectors on the component which can
        // allow for more expressive navigation and interaction with all the components.
        $this->resolver->pageElements(
            $component->elements() + $parentResolver->elements
        );

        $component->assert($this);

        $this->resolver->prefix = $this->resolver->format(
            $component->selector()
        );
    }
public function onComponent ( $ component , $ parentResolver ) { $ this -> component = $ component ; // Here we will set the component elements on the resolver instance, which will allow // the developer to access short-cuts for CSS selectors on the component which can // allow for more expressive navigation and interaction with all the components. $ this -> resolver -> pageElements ( $ component -> elements ( ) + $ parentResolver -> elements ) ; $ component -> assert ( $ this ) ; $ this -> resolver -> prefix = $ this -> resolver -> format ( $ component -> selector ( ) ) ; }
Set the current component state.

@param  \Laravel\Dusk\Component  $component
@param  \Laravel\Dusk\ElementResolver  $parentResolver
@return void
Set the current component state .