0

Application in my project is very complex with number of backend systems and heavily written on javascript for frontend. Application works only in internet explorer and hence I am using InternetExplorerDriver.

I was successful in automating single browser window instance but when clicking some links which further opens new browser window where application is throwing "a javascript error occured"(error not with selenium). When I am doing the same flow manually by opening internet explorer and launching the application with URL then I am not seeing any error. I have tried all possible Desired Capabitilies and passed different values by trial and error method.

InternetExplorerDriverCode

Also I have simulated mouse and keyboard events through Actions method when I am trying to click the link. None of them working for me.

So I am trying to understand is there any difference how selenium interacts with browser and how manually we interact with browser. Please help me on this one. Thanks in advance.

Jagadish Dabbiru
  • 930
  • 9
  • 22
  • Can you try to do the same thing you tried manually? When the new window opens, Switch to the new window in selenium, copy the window url and close the window, Switch back to the original window and driver.get(newURL) ? – Naveen Jun 09 '19 at 17:38
  • Have you ever tried to use F12 developer tools to check the details javascript error message? Besides, I suggest you could directly navigate to the link's url using selenium, and check whether could open the url successful. If it works well, I suggest you could check the InternetExplorerOptions and try to create a web driver without using the options, and check whether it works well. – Zhi Lv Jun 10 '19 at 03:11
  • Thanks for comment. I cannot open the link directly with the url because few webservices will be triggered when i click the link like what is the customer loaded into the session, session id, customer details from the main window and loads into the new window. Based on the second comment i will try to see what is the javascript error. Thank you guys. – Jagadish Dabbiru Jun 10 '19 at 05:00

0 Answers0