Forum Discussion

maxthomassin2's avatar
maxthomassin2
Occasional Contributor
13 years ago

Cant press Enter on button

Hello everyone,



I have some trouble pressing the enter key on a button. It's working for every other button but not this one. I compared their properties and they are similar. The parent is also correct.



I think the problem isnt not the Enter Key. I think its because I cant put the focus on the object even if i use item.focus() (im coding in JavaScript using TestComplete 7).



TestComplete find the button but it doest select it.



I attached a file with a picture



4 Replies

  • Why don't you use Click?

    Verify that this element can be focused manually using Tab key. If it can then just record the needed action and if it can be replayed then use the recorded code.
  • maxthomassin2's avatar
    maxthomassin2
    Occasional Contributor
     Im not doing a click because the mapping of the object isnt good. So when I click, it click somewhere else. Check my image.



    I can select the button manually, but not with TC.



    The recorded script did not help me cause they point me a a click with coordinate and I dont want to use this.





     all.HTML.Click(1205, 301);

     (all equals to my webpage.document.all)