Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

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

Selenium click event does not trigger angularjs event Empty Selenium click event does not trigger angularjs event

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 );

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

Selenium click event does not trigger angularjs event Empty Re: Selenium click event does not trigger angularjs event

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
avatar
AgoBalan
Amateur
Amateur
Posts : 36
Join date : 2015-02-23

Selenium click event does not trigger angularjs event Empty Re: Selenium click event does not trigger angularjs event

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
avatar
seluserqwb1
Active particpant
Active particpant
Posts : 20
Join date : 2015-06-29

Selenium click event does not trigger angularjs event Empty Re: Selenium click event does not trigger angularjs event

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

Selenium click event does not trigger angularjs event Empty Re: Selenium click event does not trigger angularjs event

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