Using the WAVE plugin with Selenium

352 views
Skip to first unread message

PeterJef...@hotmail.co.uk

unread,
Apr 23, 2012, 5:03:13 AM4/23/12
to Selenium Users
Hi

Has anyone successfuly used the WAVE (web accessibility evaluation
tool) plugin within a Firefox profile running under Selnium Webdriver?

I've installed the .xpi plugin file in my runtime Firefox profile, as
with other plugins, but the WAVE tool is giving me Javascript errors
(possibly for missing files).

(I have posted the question on the WAVE site but thought I'd check
here too.)

It may be that I just need to launch my instance of Firefox from a
previously manually created profile, if anyone as a link to a thread
that explains how to do that under Selenium Webdriver (Webdriver 2),
with Java prefrerably ... I know it has been discussed but I haven't
found such a thread yet, though it's not my preferred solution.

Thanks
Peter

PeterJef...@hotmail.co.uk

unread,
Apr 23, 2012, 10:50:03 AM4/23/12
to Selenium Users
Interestingly, I can get webdriver to open a Firefox instance with a
manually created profile already set up to use the WAVE plugin.

This profile works manually, but fails when I open it through
WebDriver ... can anyone tell me why that might be?

This is the code I'm using to launch my manually created profile:

System.setProperty("webdriver.firefox.profile",
"MySeleniumProfile");
DesiredCapabilities capabilities =
DesiredCapabilities.firefox();
capabilities.setJavascriptEnabled(true);
WebDriver .driver = new FirefoxDriver(capabilities);

Thanks
Peter

On Apr 23, 10:03 am, "PeterJeffreyG...@Hotmail.co.uk"

Krishnan Mahadevan

unread,
Apr 23, 2012, 11:24:47 AM4/23/12
to seleniu...@googlegroups.com
Peter,
This should do the trick for you.

DesiredCapabilities caps = DesiredCapabilities.firefox();
Profile profile = new ProfilesIni().getProfile(" MySeleniumProfile");
caps.setCapability(FirefoxDriver.PROFILE, profile);
WebDriver driver = new FirefoxDriver(caps);

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


PeterJef...@hotmail.co.uk

unread,
Apr 24, 2012, 4:15:23 AM4/24/12
to Selenium Users
Hi Krishnan, and thanks for your suggestion.

I wasn't sure if this was subtly different to the method I was using,
but it was worth trying.

I had to change this line:

Profile profile = new ProfilesIni().getProfile("
MySeleniumProfile");

to:

FirefoxProfile profile = new
ProfilesIni().getProfile(GenericTest.testLine[3]);

... to get it working, but it gets the same error as the
"System.SetProperty" method I mentioned below ... that is, I think
there is a file path/access issue, possibly because the plugin is
being run in a java based enviroment rather than just a windows one, I
think, so I'm trying to delve into the plugin code to see if I can
identify the error.

Also, it seems that the WAVE team don't allow automation of their
plugin by default, so I'm waiting for approval to use it with
Selenium.

Thanks


On Apr 23, 4:24 pm, Krishnan Mahadevan
<krishnan.mahadevan1...@gmail.com> wrote:
> Peter,
> This should do the trick for you.
>
> DesiredCapabilities caps = DesiredCapabilities.firefox();
> Profile profile = new ProfilesIni().getProfile(" MySeleniumProfile");
> caps.setCapability(FirefoxDriver.PROFILE, profile);
> WebDriver driver = new FirefoxDriver(caps);
>
> Thanks & Regards
> Krishnan Mahadevan
>
> "All the desirable things in life are either illegal, expensive, fattening
> or in love with someone else!"
>
> On Mon, Apr 23, 2012 at 8:20 PM, PeterJeffreyG...@Hotmail.co.uk <
Reply all
Reply to author
Forward
0 new messages