Share
Go down
fimo
Posts : 1
Join date : 2015-07-13

Selenium click event does not trigger angularjs event

on Mon Jul 13, 2015 7:22 pm
I have this page where an angularjs modal-content popup, in there i fill up some fields and click save. After save is initiated, popup should dissapear an event should happen and so on.

My selenium test does all that perfectly except that when it clicks on the save button, popup dissapears but no event is triggered or saved so when i open up the window again everything is empty. I've tried stuff that i know with selenium and it still doesn't work. Can anyone help me out here?

This is the save button:

   
Code:
 <button class="save-button" data-ng-click="onSettingsSave()" ng-hide="readOnlyMode || !canSave()">Save</button>



Stuff i've tried:

   
Code:
var saveButton = driver.FindElement(By.CssSelector("button.save-button"));
saveButton.Click();

var saveButton = driver.FindElement(By.XPath(saveXpath));
saveButton.SendKeys(Keys.Enter);

((IJavaScriptExecutor)driver).ExecuteScript("arguments[0].focus();",saveButton);
((IJavaScriptExecutor)driver).ExecuteScript("arguments[0].click();",saveButton );

AgoBalan
Amateur
Amateur
Posts : 36
Join date : 2015-02-23

Re: Selenium click event does not trigger angularjs event

on Tue Jul 14, 2015 11:47 am
in there i fill up some fields and click save, r u really sure it s clicking on the expected button
AgoBalan
Amateur
Amateur
Posts : 36
Join date : 2015-02-23

Re: Selenium click event does not trigger angularjs event

on Tue Jul 14, 2015 11:48 am
webdriver has nothing to play with trigeer the scrpit ,its your application has to trigger on clkicking the button save..
So make sure, ur code clicks excatly on the save button
seluserqwb1
Active particpant
Active particpant
Posts : 20
Join date : 2015-06-29

Re: Selenium click event does not trigger angularjs event

on Tue Jul 14, 2015 6:00 pm
Please post your question in official webdriver forum  - 
www.seleniumtests.com/p/selenium-2-forum.html
Sponsored content

Re: Selenium click event does not trigger angularjs event

Back to top
Permissions in this forum:
You cannot reply to topics in this forum