Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Selenium click event does not trigger angularjs event

View previous topic View next topic Go down

Selenium click event does not trigger angularjs event

Post by fimo 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 );


fimo

Posts : 1
Join date : 2015-07-13

Back to top Go down

Re: Selenium click event does not trigger angularjs event

Post by AgoBalan 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

Back to top Go down

Re: Selenium click event does not trigger angularjs event

Post by AgoBalan 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

AgoBalan
Amateur
Amateur

Posts : 36
Join date : 2015-02-23

Back to top Go down

Re: Selenium click event does not trigger angularjs event

Post by seluserqwb1 on Tue Jul 14, 2015 6:00 pm

Please post your question in official webdriver forum  - 
www.seleniumtests.com/p/selenium-2-forum.html

seluserqwb1
Active particpant
Active particpant

Posts : 20
Join date : 2015-06-29

Back to top Go down

Re: Selenium click event does not trigger angularjs event

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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