@@ -114,7 +114,7 @@ builder.selenium2.io.addLangFormatter({
114114 ".then(function () {\n" +
115115 " log('{stepTypeName} {locator}');\n" +
116116 " return $browser.waitForAndFindElement(By.{locatorBy}({locator}), DefaultTimeout); })\n" +
117- ".then(function (el) { $browser.actions(). click(el).perform(); })\n\n" ,
117+ ".then(function (el) { el. click() })\n\n" ,
118118 "doubleClickElement" :
119119 ".then(function () {\n" +
120120 " log('{stepTypeName} {locator}');\n" +
@@ -147,14 +147,16 @@ builder.selenium2.io.addLangFormatter({
147147 ".then(function () {\n" +
148148 " log('{stepTypeName} {locator}');\n" +
149149 " return $browser.waitForAndFindElement(By.{locatorBy}({locator}), DefaultTimeout); })\n" +
150- ".then(function(el) { return el.isSelected(); })\n" +
151- ".then(function(bool) { if (!bool) { $browser.actions().click($browser.findElement(By.{locatorBy}({locator}))).perform(); } })\n\n" ,
150+ ".then(function(el) { el.isSelected()\n" +
151+ " .then(function(bool) { if (!bool) { el.click(); } });\n" +
152+ "})\n\n" ,
152153 "setElementNotSelected" :
153154 ".then(function () {\n" +
154155 " log('{stepTypeName} {locator}');\n" +
155156 " return $browser.waitForAndFindElement(By.{locatorBy}({locator}), DefaultTimeout); })\n" +
156- ".then(function(el) { return el.isSelected(); })\n" +
157- ".then(function(bool) { if (bool) { $browser.actions().click($browser.findElement(By.{locatorBy}({locator}))).perform(); } })\n\n" ,
157+ ".then(function(el) { el.isSelected()\n" +
158+ " .then(function(bool) { if (bool) { el.click(); } });\n" +
159+ "})\n\n" ,
158160 "clearSelections" :
159161 ".then(function () {\n" +
160162 " log('{stepTypeName} {locator}');\n" +
0 commit comments