When using firefox and selenium we get an exception generated when a
disabled button click is attempted. This should happen in the test but
we need to catch the exception to make sure it doesn't cause the test to
fail.
[YOCTO #10056]
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
from django.core.urlresolvers import reverse
from tests.browser.selenium_helpers import SeleniumTestCase
from selenium.webdriver.support.ui import Select
+from selenium.common.exceptions import InvalidElementStateException
from orm.models import Project, Release, BitbakeVersion
# Try and click it anyway, if it submits we'll have a new project in
# the db and assert then
- self.click("#create-project-button")
+ try:
+ self.click("#create-project-button")
+ except InvalidElementStateException:
+ pass
self.assertTrue(
(Project.objects.filter(name=project_name).count() == 1),