10 use Magento\Mtf\Block\Block;
11 use Magento\Mtf\Client\Locator;
43 if ($this->hasRender($widgetType)) {
44 return $this->callRender(
47 [
'widget' => $widget,
'widgetText' => $widgetText]
50 if (isset($this->widgetSelector)) {
51 return $this->_rootElement->find(
52 sprintf($this->widgetSelector, $widgetText),
53 Locator::SELECTOR_XPATH
56 throw new \Exception(
'Determine how to find the widget on the page.');
72 if ($this->hasRender($widgetType)) {
73 $this->callRender($widgetType,
'clickToWidget', [
'widget' => $widget,
'widgetText' => $widgetText]);
75 if (isset($this->widgetLinkSelector)) {
76 $this->_rootElement->find(
77 sprintf($this->widgetLinkSelector, $widgetText),
78 Locator::SELECTOR_XPATH
81 throw new \Exception(
'Determine how to find the widget on the page.');
94 return lcfirst(str_replace(
' ',
'', ucwords(strtolower($widget->getCode()))));