Profiles #58

Merged
merged 2 commits into from Jul 10, 2012

Conversation

Projects
None yet
4 participants
Contributor

bebef1987 commented Jul 9, 2012

No description provided.

Contributor

zacc commented Jul 9, 2012

The test fails at:

  manage_profiles_pg.filter_profiles_by_name(name=profile['name'])

tests/test_manage_profiles_page.py:21:

My suspicion is that the test is assuming that after creating the profile it is returning to the manage/profiles/ page whereas it is actually returning to the /manage/profile/add page.

Either the test workflow has been changed or the app workflow has changed. Probiably the former as we have done so much work on it today.
However the nature of the page objects lends itself to these assumptions in the test.

@@ -20,11 +20,11 @@ def test_that_user_can_create_and_delete_profile(self, mozwebqa_logged_in):
manage_profiles_pg.filter_profiles_by_name(name=profile['name'])
@klrmn

klrmn Jul 9, 2012

Contributor

the test failed for me at this line.

E NoSuchElementException: Message: u'Unable to locate element: {"method":"id","selector":"text-filter"}\nCommand duration or timeout: 14.25 seconds\nFor documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html\nBuild info: version: '2.24.1', revision: '17205', time: '2012-06-19 17:28:14'\nSystem info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.7.0_04'\nDriver info: driver.version: EventFiringWebDriver\nSession ID: 67cda6fe-e8bc-424b-846d-f696610bc347' ; Screenshot: available via screen ; Stacktrace: Method newInstance0 threw an error in None

profile_category_field.send_keys(profile['category'])
profile_category_field.send_keys(Keys.RETURN)
- element_field = self.selenium.find_element(*self._add_element_input_locator)
+ element_field = self.selenium.find_element(*_add_element_input_locator)
Contributor

klrmn commented Jul 9, 2012

side note, i got started working on TestRunTestsPage, but it appears to be dependent upon the changes in this pull.
it's https://github.com/klrmn/moztrap-tests/tree/migrate_run_tests if you want to look at it.

Collaborator

rbillings commented Jul 9, 2012

AFAICT the workflow has not changed. After profile creation, the page does go to manage/profiles.

Contributor

zacc commented Jul 10, 2012

Thanks @rbillings and @klrmn , that's the same error I was having @klrmn. @bebef1987 can you step through this test manually and work out why it is going to the wrong page?

Contributor

bebef1987 commented Jul 10, 2012

(moz-trap_wd)florinstrugariu@P4298:~/webqa/moztrap-tests/bebe/caseconductor-tests$ py.test --host=qa-selenium.mv.mozilla.com --browsername=firefox --browserver=11 --platform=windows --credentials=/home/florinstrugariu/webqa/Credentials/Mozilla/webqa-credentials/moztrap.yaml --baseurl=https://moztrap-dev.allizom.org/ --destructive -k test_that_user_can_create_and_delete_profile
============================= test session starts ==============================
platform linux2 -- Python 2.7.2 -- pytest-2.2.4
collected 17 items

tests/test_manage_profiles_page.py .

=== 16 tests deselected by '-ktest_that_user_can_create_and_delete_profile' ====
=================== 1 passed, 16 deselected in 65.13 seconds ===================

Contributor

bebef1987 commented Jul 10, 2012

the test passes on my end

Make sure you create the profile with the correct test account :D

Contributor

zacc commented Jul 10, 2012

Are you using the shared QA credentials?

Contributor

bebef1987 commented Jul 10, 2012

yes

Contributor

zacc commented Jul 10, 2012

OK I have found the issue
at line 59 off create_profile_page.py the step is to click the checkbox of the category (this is right next to the dropdown menu). For myself and @klrmn the checkbox is not being ticked correctly but the step is passing, so the following step (click submit) is being performed too. This fails validation and is not completed so the test is going to the wrong page.

I can't explain why it is clicking for Bebe and not for others but next step is to click the checkbox properly.

Contributor

zacc commented Jul 10, 2012

I have just tested clicking the label element instead of hte input element and it works.

@@ -5,7 +5,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from selenium.webdriver.common.by import By
-from selenium.webdriver.support.select import Select
+
+from selenium.webdriver.support.ui import WebDriverWait
@zacc

zacc Jul 10, 2012

Contributor

I thought this was from selenium.webdriver.support.wait but this seems to work anyway.

Contributor

zacc commented Jul 10, 2012

Fix passes, @klrmn I am sure this will work for you too so I am going to merge but if issues please let us know.

zacc pushed a commit that referenced this pull request Jul 10, 2012

@zacc zacc merged commit 3e78b62 into mozilla:webdriver Jul 10, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment