Selinium for testing Moodle

Re: Selinium for testing Moodle

by Nicolas Connault -
Number of replies: 0
Great resource Alan, I only just came across your post while I was working on some Selenium tests of the quiz module. I've dug a bit deeper in the Selenium API, and I found a way to do almost anything without having to use explicit URLs (with dynamic ids) in my commands.

However, as you pointed out, Selenium can't access HTMLeditor boxes. I had to switch these off as part of my test.

I've compiled a rather simple test which illustrates how to deal with most web elements in creating portable, repeatable Selenium tests (see attachment). As Tim explained, the only element missing is language portability. Currently I rely on a number of english strings to locate various elements, it would be ideal if these were replaced with get_string() calls.