What exactly does an "Invoke Action Focus" do?
I have a module with a step that clicks on a button on a web page in Google Chrome. Sometimes that click does not work, even though the button "Adapter Type" is "webelement". There is also a "Wait For Exists" step before the click action and sometimes the click is not completed, even after the "Wait For" has been successful.
Will putting an action to "Invoke Action Focus" before the click step (as shown below) help ensure the button is clicked?
[Ranorex 5.4.1 on Windows 7]
Thanks!
Invoke Action Focus - What does it do?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Invoke Action Focus - What does it do?
Hello Fergal,
The Focus() method tries to set the focus to the specific element. If the element is visible and the click is executed on the correct position there is no need to call Focus().
In your case, it is more likely that the webpage is not fully loaded and/or some background queries aren’t finished. Therefore, the click isn’t recognized correctly. Please ensure that the website is fully loaded before calling the click. Maybe you could also try to use the PerformClick() action instead of the Click() action.
Hope this helps.
Regards,
Robert
The Focus() method tries to set the focus to the specific element. If the element is visible and the click is executed on the correct position there is no need to call Focus().
In your case, it is more likely that the webpage is not fully loaded and/or some background queries aren’t finished. Therefore, the click isn’t recognized correctly. Please ensure that the website is fully loaded before calling the click. Maybe you could also try to use the PerformClick() action instead of the Click() action.
Hope this helps.
Regards,
Robert
-
- Certified Professional
- Posts: 455
- Joined: Tue Feb 18, 2014 2:14 pm
- Location: Co Louth, Ireland
- Contact:
Re: Invoke Action Focus - What does it do?
Thanks for your reply and suggestions Robert!
What is the difference between PerformClick() and Click() and in what way could PerformClick() be better than Click()?Support Team wrote:...you could also try to use the PerformClick() action instead of the Click() action.
Re: App get crashed while tap on element in iOS Instrumented app
Hi,
PerformClick simply clicks the pointed element without moving mouse pointer to the element. Click action, on the other hand, first moves the mouse pointer to the element, then clicks it. There is no general rule as of when to use PerformClick and when Click. I found PerformClick useful with certain web elements, which occasionally failed to register Click, especially on VM systems. But there is also a good number of elements, which does not work very well with PerformClick So if you are experiencing some problems with Click, try PerformClick and vice versa.
PerformClick simply clicks the pointed element without moving mouse pointer to the element. Click action, on the other hand, first moves the mouse pointer to the element, then clicks it. There is no general rule as of when to use PerformClick and when Click. I found PerformClick useful with certain web elements, which occasionally failed to register Click, especially on VM systems. But there is also a good number of elements, which does not work very well with PerformClick So if you are experiencing some problems with Click, try PerformClick and vice versa.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Certified Professional
- Posts: 455
- Joined: Tue Feb 18, 2014 2:14 pm
- Location: Co Louth, Ireland
- Contact:
Re: App get crashed while tap on element in iOS Instrumented app
Thanks very much for that odklizec, that's the clarification I was looking for.odklizec wrote:...PerformClick simply clicks the pointed element without moving mouse pointer to the element. Click action, on the other hand, first moves the mouse pointer to the element, then clicks it....
Re: Invoke Action Focus - What does it do?
You are welcome
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration