0

I have been writing selenium java testing script for a little while and recently discovered some issue when i am writing script for some relatively complex webpages based for IE, Firefox and Chrome.

1) when script run in Firefox, browser very often will become 'not responding', and "A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete." dialog shows. This almost never happens when user is manually performing the same operation.

2) something i found very strange is that although in my script the explicit wait are all ~20sec, when i run the test in Eclipse, it hangs for a long time and fail the test at last, and when finally test exit, it states that it has only been doing an explicit wait for some element for 20 sec. How come?

3) from a previous post in stackoverflow (When to use explicit wait vs implicit wait in Selenium Webdriver?), it seems that implicit is bad, so now i try to only use explicit wait in my script. Is it a correct way to write script with no implicit wait and add explicit wait for elements only when necessary? or to add explicit wait for every webelement?

4) the last issue is related to a post i read about long time ago, it states that for each webdriver running instance at least 2G memory need to be allocated. Right now when i am running the scripts, most of timing issues happen when humming noise of my computer is at its loudest. Is there a basic requirement on computing power. memory and more on machine that runs selenium testing? how do i know i am not running low on resource to run Selenium?

Could some one comment on some of the issues if you run into them before? Thanks,

Community
  • 1
  • 1
user1559625
  • 2,583
  • 5
  • 37
  • 75
  • Explicit is good way to handle elements which loads slow. You do not need to use explicit for every element , Use it only when necessary. – Helping Hands Oct 13 '15 at 11:51
  • @Helping Hands that's what i thought in general, but in practice, some element loads fast sometimes and slow othertimes, i do not even know if it's my machine, my browser or my internet connection. And scripts running perfectly on firefox can stuck on IE for some UI element for no obvious reasons. – user1559625 Oct 14 '15 at 12:50
  • I understand , I think you should analyze max. loading time of element and set same with explicit wait. – Helping Hands Oct 15 '15 at 04:56
  • There are a lot of questions in this question. You should focus on one question at a time. – JeffC Oct 16 '15 at 16:11
  • @JeffC yesterday unless it's a one line code question, there are no simple answers. Many of the answers here in stackoverflow contain information beyond what's literally asked. My question is only about browser hang and timing issue, and to some extent i think they are related. – user1559625 Oct 18 '15 at 02:26

0 Answers0