This is a migrated thread and some comments may be shown as answers.

Simulate real typing causes focus lost

15 Answers 292 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Uroš
Top achievements
Rank 2
Uroš asked on 09 Dec 2015, 02:09 PM
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. 

15 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 09 Dec 2015, 09:26 PM
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!
0
Uroš
Top achievements
Rank 2
answered on 14 Dec 2015, 07:48 AM
Yes, your suggested solution is working, but I have encountered another problem with the remote execution when I converted steps to coded. See att. 
0
Cody
Telerik team
answered on 14 Dec 2015, 04:29 PM
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!
0
Uroš
Top achievements
Rank 2
answered on 15 Dec 2015, 12:08 PM

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?)



0
Uroš
Top achievements
Rank 2
answered on 15 Dec 2015, 12:08 PM

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?)



0
Uroš
Top achievements
Rank 2
answered on 15 Dec 2015, 12:09 PM

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.




0
Cody
Telerik team
answered on 15 Dec 2015, 04:19 PM
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!
0
Uroš
Top achievements
Rank 2
answered on 16 Dec 2015, 01:58 PM
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?
0
Cody
Telerik team
answered on 16 Dec 2015, 02:45 PM
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!
0
Uroš
Top achievements
Rank 2
answered on 17 Dec 2015, 10:05 AM
Unfortunately this week it's not OK for me, because I am working out of office. Any options for the next week?
0
Cody
Telerik team
answered on 17 Dec 2015, 02:55 PM
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!
0
Uroš
Top achievements
Rank 2
answered on 21 Dec 2015, 01:49 PM

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? 

0
Cody
Telerik team
answered on 21 Dec 2015, 05:15 PM
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!
0
Matthew
Top achievements
Rank 1
answered on 24 Aug 2018, 08:35 PM
Cody, can we make this a feature request so we don't have to convert every step that is having this issue into a coded step? It's been 3 years since this has been posted, is there already a work around?
0
Elena
Telerik team
answered on 28 Aug 2018, 08:38 AM
Hi Matthew,

Thank you for your note. 

There is a feature request on the topic submitted to our public feedback portal - please find that here. We intend to implement a step property which allow you to choose whether the element to be scrolled to top or bottom. 

Probably we will not have the chance to include that in our next official release planned for end of September. I hope the upcoming year the feature will find place in the product road map. 

Thank you for your understanding! 

Regards,
Elena Tsvetkova
Progress Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Uroš
Top achievements
Rank 2
Answers by
Cody
Telerik team
Uroš
Top achievements
Rank 2
Matthew
Top achievements
Rank 1
Elena
Telerik team
Share this question
or