Many keyboards operation do not work with telerik 2024, but they worked well with telerik 2022

1 Answer 50 Views
Chrome
Jun
Top achievements
Rank 1
Iron
Iron
Jun asked on 26 Sep 2024, 06:53 AM

Hi Team, 

After we upgrade telerik 2024(we have tried Q1, QA2, QA3), we found some of our cases with keyboard operation do not work now, below is the list, could you please help to check, no exception, just not work actually. Not all, just some. And the old version Testing_Framework_2022_1_0601_1_Free could work well.

Publish shortcut key

F5 --- Refresh the page

Control + R  --- Refresh the page

Control + Tab  --- switch tab

Control + Shift + Tab --- switch tab

Alt + Left ---- go back 

Alt + Right  --- go forward

Shift + End  ---- select to the end

Control + multiple select ---- select multiple

Shift + select two range ---- select range

Private application keyboard

Control + Alt + L   ---open the navigation panel

Control + Shift + OemQuestion   ---- Open the help dialog

Control + Shift + H   ---- open home page

 

Thanks,

Jun

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 30 Sep 2024, 03:51 PM

Hi Jun,

There are a couple of threads you recently initiated which are related to using key presses within the tests. As we discussed in all of these conversations the current execution approach in Test Studio and the Testing Framework is different than what it used to be back in 2022.

Therefore, key presses within a web test need to be sent to handle some actions within the tested web application. If there is anything outside of the web page that accepts key presses (for example, interacting with the browser menus and tools), it cannot be handled in current Chrome browser automated through Test Studio Framework. 

The keyboard actions you've listed have their alternative. Please, check below suggestions: 

  • Refresh browser - ActiveBrowser.Refresh();
  • Go back - ActiveBrowser.GoBack();
  • Go forward - ActiveBrowser.GoForward();
  • Swtich tabs - there's a separate forum thread on this topic where we provided a proper solution
  • Using a combination of keyboard keys sent towards the tested application should work as expected with the solution suggested here

As to the key combinations you refer to as 'Private application keyboard' - are these some specific combinations which trigger anything in the tested application? Or they rely on some specific browser functions to trigger with the keyboard? Elaborate on the topic. 

Regards,
Elena
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Jun
Top achievements
Rank 1
Iron
Iron
commented on 17 Oct 2024, 03:36 AM

Hi Elena,

Sorry for late response, just more time to confirm what you have mentioned, Below is the finding from us.

Let's not consider telerik 2022 now, just test telerik 2024.

For Shift + End, which is confirmed to be sent towards the test application. After we test it did not work for without extension or headless browser. 

Below is the test code:

// Initialize the settings
mySettings = new Settings();

// Set the default browser
mySettings.Web.DefaultBrowser = BrowserType.ChromeHeadless; //we can change to switch different scenarios
mySettings.Web.UseBrowserExtension = false;

myManager = new Manager(mySettings);
// Start the manager
myManager.Start();

// Launch a new browser instance. [This will launch an IE instance given the setting above]
myManager.LaunchNewBrowser();


 // Navigate to a certain web page
  myManager.ActiveBrowser.NavigateTo("http://www.google.com");

// Perform your automation actions.
HtmlTextArea searchText = myManager.ActiveBrowser.Find.ByTagIndex<HtmlTextArea>("textarea", 0);
searchText.Text = "hello";

searchText.MouseClick();

myManager.ActiveBrowser.Desktop.KeyBoard.KeyPress(Keys.Home);
myManager.ActiveBrowser.Desktop.KeyBoard.KeyDown(Keys.Shift);
myManager.ActiveBrowser.Desktop.KeyBoard.KeyPress(Keys.End);
myManager.ActiveBrowser.Desktop.KeyBoard.KeyUp(Keys.Shift);

myManager.ActiveBrowser.Desktop.KeyBoard.KeyPress(Keys.Control | Keys.X);
myManager.ActiveBrowser.Desktop.KeyBoard.KeyPress(Keys.Control | Keys.A);
myManager.ActiveBrowser.Desktop.KeyBoard.KeyPress(Keys.Delete);
myManager.ActiveBrowser.Desktop.KeyBoard.KeyPress(Keys.Control | Keys.V);
actualText = searchText.Text;   //the value expected to be "hello"

 

The actual test result is like below, could you please help to confirm whether it's expected, actually now we run most of the cases with headless, but it doesn't work.

Elena
Telerik team
commented on 21 Oct 2024, 03:55 PM

Hi Jun, 

Thanks for providing a sample to test on our end. Let me explore how that test behaves and will let you know my findings. 

Regards,
Elena

Jun
Top achievements
Rank 1
Iron
Iron
commented on 23 Oct 2024, 01:56 AM | edited

Hi Elena, 

Thanks for feedback. After test more in telerik 2024, all the keyboard operations mentioned above work fine for chrome with extension, and not work for headless or without extension. Will wait for your findings~

Thanks,

Jun

Elena
Telerik team
commented on 24 Oct 2024, 07:44 AM

Hi Jun, 

We've tested the above scenario and there are a couple of things to clarify about headless and extensionless browser mode and key presses. 

  1. Combination of keys is to be sent as a pair of keys - for example Ctrl+X is covered by the below line: 
    ActiveBrowser.Desktop.KeyBoard.KeyPress(Keys.Control | Keys.X);
  2. The KeyUp() and KeyDown() functions are not applicable for these browser modes. 
  3. We currently have issue specifically witth the combinations Shift+End and Shift+Home.

That issue related to the combinations Shift+End and Shift+Home is reported on your behalf to our public feedback portal - find the public item here to follow its progress.

Regards,
Elena

Jun
Top achievements
Rank 1
Iron
Iron
commented on 31 Oct 2024, 01:07 AM | edited

Hi Elena, 

Thanks for update and clarity. that make sense and let explain my confusion.

For about #1 and #3, totally agree with you and no question.

For #2, want to confirm will you got a plan to support it?

And one more #4 want to double confirm again, seems three keys combination also not supported, for example, in our application,  below are not supported. Sorry it's hard for me to give an example code for public website. I will find and give you an example later.

Private application keyboard

Control + Alt + L   ---open the navigation panel

Control + Shift + OemQuestion   ---- Open the help dialog

Control + Shift + H   ---- open home page

 

Thanks,

Jun

Elena
Telerik team
commented on 04 Nov 2024, 04:21 PM

Hi Jun, 

We don't plan to support the KeyUp() and KeyDown() functions for the browser mode without extension. Having in mind that key combinations are supported by the KeyPress() function we don't see the need of supporting the other two functions. 

The last key combinations you share seem to be specific for the application you work on. Thus I don't have the option to test them and verify how these behave or misbehave. If you find a way to share a demo which I can explore further, we will be able to evaluate if there's anything wrong on our end. 

Thank you for your continuous cooperation.

Regards,
Elena

Tags
Chrome
Asked by
Jun
Top achievements
Rank 1
Iron
Iron
Answers by
Elena
Telerik team
Share this question
or