Selenium: missing POST request
Problem:
On Chrome 39 and IE 11 one of two POST requests was not triggered by Selenium, which caused functional issues.
Solution:
Investigation showed that the missing POST request was triggered by the window.onbeforeunload function from the application's JavaScript library. The function was not called due to what seemed to be a popup-related Selenium issue. The fix was to add the below line to the code:
((JavascriptExecutor)driver).executeScript( "window.onbeforeunload();" );
On Chrome 39 and IE 11 one of two POST requests was not triggered by Selenium, which caused functional issues.
Solution:
Investigation showed that the missing POST request was triggered by the window.onbeforeunload function from the application's JavaScript library. The function was not called due to what seemed to be a popup-related Selenium issue. The fix was to add the below line to the code:
((JavascriptExecutor)driver).executeScript( "window.onbeforeunload();" );
Comments
Post a Comment