1
votes

When I try to execute my protractor scripts in IE_11 browser I am getting following error.However same script working fine in chrome and Firefox browsers.Saying element is not visible.However when I execute the script manually by pausing the browser,respective element is visible.

ElementNotVisibleError: Cannot click on element (WARNING: The server did no t provide any stacktrace information) Command duration or timeout: 141 milliseconds Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16' System info: host: 'XXXXXX', ip: '10.XXX.CCC.33', os.name: 'Windows 7', os.arc h: 'amd64', os.version: '6.1', java.version: '1.8.0_51' Driver info: org.openqa.selenium.ie.InternetExplorerDriver Capabilities [{browserAttachTimeout=0, enablePersistentHover=true, ie.forceCreat eProcessApi=false, pageLoadStrategy=normal, ie.usePerProcessProxy=false, ignoreZ oomSetting=false, handlesAlerts=true, version=11, platform=WINDOWS, nativeEvents =true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLi neSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBro wserUrl=http://localhost:3653/, takesScreenshot=true, javascriptEnabled=true, ig noreProtectedModeSettings=false, enableElementCacheCleanup=true, cssSelectorsEna bled=true, unexpectedAlertBehaviour=dismiss}] Session ID: 91db8197-e87b-4564-b1b4-9dd7389e19c6

1

1 Answers

3
votes

It sounds like you are having timing issues. You might try using Expected Conditions functionality (http://www.protractortest.org/#/api?view=ExpectedConditions). It even looks like their example fits what you need:

var EC = protractor.ExpectedConditions;
var button = $('#xyz');
var isClickable = EC.elementToBeClickable(button);

browser.get(URL);
browser.wait(isClickable, 5000); //wait for an element to become clickable
button.click();