Forum Discussion

ischerbakov's avatar
ischerbakov
Occasional Contributor
10 years ago
Solved

Problem with simulating pressing Ctrl+A and Enter keys in the Flex under Chrome

Hello!
I test Flex application which use rich text editor.
For initial clearing of text I use simulation of keypresses Ctrl+A, Del:
/////////////////////////////
var editor = RockstarFlex.FindChild(["ObjectType"], ["SpriteIME"], 3);
editor.Click(editor.Width - 1, editor.Height - 1);
RockstarFlex.Keys("^A");
RockstarFlex.Keys("[Del]");
/////////////////////////////

It's worked fine in the Internet Explorer 10, but in the Google Chrome (39.0.2171.65m) combination "^A" does not work. Test engine "eats" these strings, but in the UI I can't see that text was selected.

Another problem, which I can reproduce only under Chrome (but cannot reproduce under MSIE10) is the following:
Color palette should be closed by clicking "Enter" key and value from textBox should be saved. However, if I run test from Chrome, palette closes, but color does not saves. If I do same actions manually from keyboard, all works fine.

Thanks,
Ilya

  • Use: 

    RockstarFlex.Keys("^a");

     Instead of: 

    RockstarFlex.Keys("^A");

     Would need a code example for this issue:

        "Color palette should be closed by clicking "Enter" key and value from textBox should be saved. However, if I run test from Chrome, palette closes, but color does not saves. If I do same actions manually from keyboard, all works fine."

  •  

3 Replies

  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor

    Use: 

    RockstarFlex.Keys("^a");

     Instead of: 

    RockstarFlex.Keys("^A");

     Would need a code example for this issue:

        "Color palette should be closed by clicking "Enter" key and value from textBox should be saved. However, if I run test from Chrome, palette closes, but color does not saves. If I do same actions manually from keyboard, all works fine."

    • ischerbakov's avatar
      ischerbakov
      Occasional Contributor

       

      • ischerbakov's avatar
        ischerbakov
        Occasional Contributor

        Problem with Enter key:

         

        There is not-worked code:

        editBox.Click();
        editBox.FlexObject.text = fontColor;
        editBox.Click();
        editBox.Keys("[Enter]");

         

        But there is worked code:

        editBox.Click();
         editBox.Keys("^a[Del]");
         Delay(shortDelay);
         editBox.Keys(fontColor + "[Enter]");