I don't see the interest of keeping even more logs.
> Selenium doesn’t provide any indication to user as to what was carried
> out during execution of a method. Like typing in a text box. This sort
> of message would be highly comprehensible to non technical QA to know
> what was done during exe of a method
If your goal is to help non technical QA to understand what's behind
every function, adding more information will only confuse them.
Instead, you should try to improve the readability of your functions,
by using locators that speak to them.
For example, replacing "type id input" by "type text_locator input",
where text_locator describes where you type.
Name: <input type=text id=whatever>
you should be able to use 'Name' as the locator, not whatever
> Selenium doesn’t provide exception handling hence if element locator
> is not found then execution of a method would be aborted, which is
> highly Inconvenient in case of non mandatory / least significant
> objects in a page.
This is a different need !
In my opinion, a test is a test, and must not have any optional path.
If an element is not present, then it fails, you must not have a way
to continue the test.
We see this difference of behavior in verify/assert, where verify
simply logs an error and continues, contrary to assert.
Your safetype introduces a second behavior, and it's dangerous in a
test, since people will probably start using safetype instead of type.
BTW, your safeType is very verbose, and boring to type.
If you use it once or twice, then you should add it in user-
extensions.js.
Finally, last point: saving a snapshot of your page is not the best
way to save an error.
You should instead save the HTML content of the page, so that you can
locate your error (to my knowledge, having a picture will not help you
finding the problem).
It's a million time easier to locate an error in an HTML page than in
a picture !
In our case, we have some non technical QA who maintain script tests
with Selenium IDE, and when an error appears, a snapshot of the page
is saved on the build server.
The build server contains the whole CSS/Javascript/pictures so they
can check in just one click where the error lies !
When the error is harder to locate, they simply load Selenium IDE,
load the test suite, place a breakpoint where the error is, and run
the script until this point.
So, after all this text, I think that if you have several non
technical QA working on your project, I strongly recommend you to use
Selenium IDE, instead of using the scripting language. It's a lot more
easy to understand and especially to MAINTAIN !
In our case, the application is still moving a lot, and the QA fixes
the problems in 99% of the cases (since executing our tests take 4
hours, it's impossible to fix the problems BEFORE committing).
Another interesting effect of Selenium IDE is that it's very easy to
add tests, compared to scripting them manually.
Note that Selenium IDE needs some manual tweaking to test certain
things (like Flash elements, etc...).
JC