Results 1 to 6 of 6

Thread: AssetRegister WebDriver Example - Login Click doesn't redirect user

  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    18
    Vote Rating
    0
      0  

    Default Answered: AssetRegister WebDriver Example - Login Click doesn't redirect user

    I'm experimenting with WebDriver scenarios and was looking for more or less the "hello world" example. I came across the AssetRegister one (https://github.com/DanielGallo/AssetRegisterTests) which seems good. I signed up for an account, updated the project url with my api key, and ran the tests. It gets through several, but when it's time to navigate back to the login page from the register page, it's failing to locate the login div by looking for locator @login. I went so far as to remove everything else, point the test at the register.aspx by default, and only use the single test that clicks on login, but the click is not redirecting the page. The click to go from login -> register, which is prior to the register -> login, works fine. Any ideas?

    The locator works in an in-browser scenario (but obviously I have to start on the register page and can't run any tests after it). Also, I'm using the embedded Chrome server, but I ran it also with a Browser Pool set up to run a local IE browser and had the same issue. I maintained the wait time of 5 seconds.


    e2eWebDriver.jpg

  2. Interesting observation - I'll need to take a look to see if the test fails for me, if the link isn't visible.

    Regarding your second reply above, please try the user tests again now. For some reason, your user record existed twice in the database (I think there's a bug in the app that if the "Register" button is clicked multiple times, it inserts multiple records in to the D, so when you save the user details it detects the duplicate email address. I've since deleted the duplicate entry. I'll fix that bug in the Asset Register app soon.

    Thanks!

  3. #2
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    Redwood City, CA
    Posts
    273
    Answers
    36
    Vote Rating
    32
      0  

    Default

    Hi,

    I see you're using the latest 2.2 EA of Sencha Test. I tried the same on my end using the latest EA, along with Chrome 62, and the tests all ran through fine. Out of interest, what is the error when you click on the red "X" for the login link test?

    Thanks.
    Daniel Gallo
    Senior Solutions Architect
    Sencha Inc.

  4. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    18
    Vote Rating
    0
      0  

    Default

    It says
    Expected 'https://se.sencha.com/AssetRegister/Register.aspx' to contain 'Login.aspx'.

    Which makes sense since the click doesn't fire. I tried it in 2.1 and still had the problem - however, I noticed that if I scrolled down to ensure that the link was in the viewport, it worked fine!!! So is it possible that webdriver scenario tests currently require links to be visible in the viewport for them to fire?

  5. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    18
    Vote Rating
    0
      0  

    Default

    also fyi - the user test fails for me every time, but I don't think it's anything related to Sencha Test. I realize it's possible AssetRegister isn't maintained anymore, but in case someone else stumbles on it, worth knowing.

    "Changing the display name of the user and saving should update the display name next to the logout button"

    I get an error that the user with the email address already exists, even if I just change the display name by hand.

    error_save.jpg

  6. #5
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    Redwood City, CA
    Posts
    273
    Answers
    36
    Vote Rating
    32
      0  

    Default

    Interesting observation - I'll need to take a look to see if the test fails for me, if the link isn't visible.

    Regarding your second reply above, please try the user tests again now. For some reason, your user record existed twice in the database (I think there's a bug in the app that if the "Register" button is clicked multiple times, it inserts multiple records in to the DB), so when you save the user details it detects the duplicate email address. I've since deleted the duplicate entry. I'll fix that bug in the Asset Register app soon.

    Thanks!
    Daniel Gallo
    Senior Solutions Architect
    Sencha Inc.

  7. #6
    Sencha User
    Join Date
    Mar 2012
    Posts
    18
    Vote Rating
    0
      0  

    Default

    Yep, the user tests all work now. Thanks!

Similar Threads

  1. Redirect after user login
    By Zdeno in forum Ext 6: Q&A
    Replies: 1
    Last Post: 22 Nov 2015, 5:10 AM
  2. Replies: 7
    Last Post: 28 Nov 2012, 9:55 PM
  3. Replies: 17
    Last Post: 16 Jan 2009, 3:14 AM
  4. Notes Server Login - How to redirect to Ext.Nd Login
    By Mike Amberg in forum Ext.nd for Notes/Domino
    Replies: 7
    Last Post: 3 Jun 2008, 1:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •