Simulate real typing causes focus lost

14 posts, 0 answers
  1. Uroš
    Uroš avatar
    37 posts
    Member since:
    Dec 2013

    Posted 09 Dec 2015 Link to this post

    I have input fields with a validation thus real typing must be enabled. When a test execution gets to the first input field with with simulate real typing, it scrolls the page to the bottom what causes invalid element selection (element for menu is selected). See att. video. 
  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 09 Dec 2015 Link to this post

    Hello Uroš,

    This is a somewhat common problem. Your application has an overlay <div> element at the top of the browser window. Test Studio, when you have SimulateRealTyping, selected always wants to scroll the element to the top of the browser window in order to make sure it's visible in the browsers window before trying to type into the input box. Unfortunately in your case this has the side effect of scrolling it underneath your overlay div.

    The only way to over come this is to convert the step to code then comment out the ScrollToVisible line of code, like this:
    // Enter text 'passUser' in 'UsernameText'
    Actions.SetText(Pages.CAFFA.UsernameText, "");
    //Pages.CAFFA.UsernameText.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop);
    ActiveBrowser.Window.SetFocus();
    Pages.CAFFA.UsernameText.Focus();
    Pages.CAFFA.UsernameText.MouseClick();
    Manager.Desktop.KeyBoard.TypeText("passUser", 50, 100, true);

    The side effect is now you have to take extra care to insure the input box is visible before that step runs. Else typing won't go into that input field.

    I hope this helps.

    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Uroš
    Uroš avatar
    37 posts
    Member since:
    Dec 2013

    Posted 14 Dec 2015 in reply to Cody Link to this post

    Yes, your suggested solution is working, but I have encountered another problem with the remote execution when I converted steps to coded. See att. 
  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 14 Dec 2015 Link to this post

    Hi Uroš,

    Here's a video that should walk you through how to resolve this problem:
    http://screencast.com/t/oCAGxXuC5L

    Let me know if you get stuck and you still need help.

    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  5. Uroš
    Uroš avatar
    37 posts
    Member since:
    Dec 2013

    Posted 15 Dec 2015 Link to this post

    I have tried you advice, but I did not help. Than I also tried to delete the existing test, clear all related records from DB with TestStudioStorageDBBrowser.exe and created a new test. Once again when I converted steps to coded, the whole test list fails for the same reason.

     Compile failed: c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(61,49) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'AddressText' and no extension method 'AddressText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)
    c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(64,33) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'AddressText' and no extension method 'AddressText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)
    c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(65,33) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'AddressText' and no extension method 'AddressText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)
    c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(74,49) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'CityText' and no extension method 'CityText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)
    c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(77,33) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'CityText' and no extension method 'CityText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)
    c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(78,33) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'CityText' and no extension method 'CityText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)
    c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(87,49) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'ZipText' and no extension method 'ZipText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)
    c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(90,33) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'ZipText' and no extension method 'ZipText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)
    c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(91,33) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'ZipText' and no extension method 'ZipText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)



  6. Uroš
    Uroš avatar
    37 posts
    Member since:
    Dec 2013

    Posted 15 Dec 2015 Link to this post

    I have tried you advice, but I did not help. Than I also tried to delete the existing test, clear all related records from DB with TestStudioStorageDBBrowser.exe and created a new test. Once again when I converted steps to coded, the whole test list fails for the same reason.

     Compile failed: c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(61,49) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'AddressText' and no extension method 'AddressText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)
    c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(64,33) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'AddressText' and no extension method 'AddressText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)
    c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(65,33) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'AddressText' and no extension method 'AddressText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)
    c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(74,49) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'CityText' and no extension method 'CityText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)
    c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(77,33) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'CityText' and no extension method 'CityText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)
    c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(78,33) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'CityText' and no extension method 'CityText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)
    c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(87,49) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'ZipText' and no extension method 'ZipText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)
    c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(90,33) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'ZipText' and no extension method 'ZipText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)
    c:\Users\Administrator\AppData\Local\Temp\5\Projects\42680f4d-1d49-48d5-b338-8207b917872b\Trunk\Team.Trial.Account\Upgrade.to.Paid.tstest.cs(91,33) : error CS1061: 'TestProject1.Pages.MyHoursPivot0Page' does not contain a definition for 'ZipText' and no extension method 'ZipText' accepting a first argument of type 'TestProject1.Pages.MyHoursPivot0Page' could be found (are you missing a using directive or an assembly reference?)



  7. Uroš
    Uroš avatar
    37 posts
    Member since:
    Dec 2013

    Posted 15 Dec 2015 in reply to Cody Link to this post

    I have tried you advice, but I did not help. Than I also tried to delete the existing test, clear all related records from DB with TestStudioStorageDBBrowser.exe and created a new test. Once again when I converted steps to coded, the whole test list fails for the same reason.




  8. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 15 Dec 2015 Link to this post

    Hi Uroš,

    I'd like to look at this problem on your machine via GoToMeeting. Let me know what timezone you're in and your availability and I'll setup the meeting. I'm located in Austin, Texas, which is Central time zone.

    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  9. Uroš
    Uroš avatar
    37 posts
    Member since:
    Dec 2013

    Posted 16 Dec 2015 in reply to Cody Link to this post

    That would be nice. I am located in Central European Time zone (UTC+1), so I suggest meeting on 22.12.2015 at 15:00 (UTC+1). That would be 8:00 am at your side?
  10. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 16 Dec 2015 Link to this post

    Hello Uroš,

    Sounds good. Tomorrow at 9am works much better for me, which would be 4pm or 16:00 there.

    1.  Please join my meeting, Thursday, December 17, 2015 at 9:00 AM Central Standard Time.
    https://global.gotomeeting.com/join/566626237

    2.  Use your microphone and speakers (VoIP) - a headset is recommended.  Or, call in using your telephone.

    Dial +1 (312) 757-3121
    Access Code: 566-626-237
    Audio PIN: Shown after joining the meeting

    Meeting ID: 566-626-237



    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  11. Uroš
    Uroš avatar
    37 posts
    Member since:
    Dec 2013

    Posted 17 Dec 2015 in reply to Cody Link to this post

    Unfortunately this week it's not OK for me, because I am working out of office. Any options for the next week?
  12. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 17 Dec 2015 Link to this post

    Hi,

    Sure I can do that. I Monday ok?

    1.  Please join my meeting, Monday, December 21, 2015 at 9:00 AM Central Standard Time.
    https://global.gotomeeting.com/join/566626237

    2.  Use your microphone and speakers (VoIP) - a headset is recommended.  Or, call in using your telephone.

    Dial +1 (312) 757-3121
    Access Code: 566-626-237
    Audio PIN: Shown after joining the meeting

    Meeting ID: 566-626-237



    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  13. Uroš
    Uroš avatar
    37 posts
    Member since:
    Dec 2013

    Posted 21 Dec 2015 in reply to Cody Link to this post

    Sorry, I need to cancel the proposed meeting again. I will contact you when I will have enough time for the remote session.

    BTW, I have found one workaround that worked. I have created a new project and copied test scenario from the original project and the issue with coded steps is not present any more.Could this issue appear if you have multiple projects with the same assembly and namespace? 

  14. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 21 Dec 2015 Link to this post

    Hi Uroš,

    No problem on the delay. It can contact us whenever you're ready to move forward. Because I do not yet understand exactly what is causing the technical problem I cannot explain why your workaround has solved it. Nor can I answer your question whether or not multiple projects with the same assembly namespace is part of the issue or not. Until I can see and understand the problem I cannot advise you how to avoid this technical issue in the future.

    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top