Cant find button and combobox

Best practices, code snippets for common functionality, examples, and guidelines.
katoa
Posts: 11
Joined: Mon Jun 14, 2021 4:06 pm

Cant find button and combobox

Post by katoa » Tue Dec 28, 2021 9:32 am

Hi,

I would like to ask some help with my test suites.
When I make test suites after I finsihed it, I run it 5-10 times, to make sure it's working perfectly.
After one day or when I rerun the programs, the Ranorex starts 'not find some elements' f.e. buttons and combobox.

Could you help me please? What is my mistakes?

Ranorex version: 10.1.3

Combobox:
Image not found in element {ComboBox:scbSajatAdatNev}.
Show/Hide Stacktrace
at Ranorex.Imaging.FindSingle(Element element, Bitmap feature, FindOptions options)at Ranorex.Location.GetElementLocation(Element element, Boolean relative)at Ranorex.Adapter.IsClickOutOfBounds(Location location)at Ranorex.Adapter.Click(MouseButtons buttons, Location location, Int32 times, Duration moveTime, Boolean showOutOfBoundsWarning)at Ranorex.Adapter.Click(Location location)at Keszlet.fml_Keszletigazolas_paramter.Ranorex.Core.Testing.ITestModule.Run() in C:\sERPaGUITest\Keszlet\Keszlet\Keszlet\fml_Keszletigazolas_paramter.cs:line 99at Ranorex.Core.Testing.TestModuleLeaf.RunInternal(DataContext parentDataContext, Int32 iteration, Int32 iterationCount, Boolean skipIteration)

The combobox still there:
combobox.png
Button:

Image not found in element {Button:Lejárati idő ajánlás}.
Show/Hide Stacktrace
at Ranorex.Imaging.FindSingle(Element element, Bitmap feature, FindOptions options)at Ranorex.Location.GetElementLocation(Element element, Boolean relative)at Ranorex.Adapter.IsClickOutOfBounds(Location location)at Ranorex.Adapter.Click(MouseButtons buttons, Location location, Int32 times, Duration moveTime, Boolean showOutOfBoundsWarning)at Ranorex.Adapter.Click(Location location)at Keszlet.close_Lejarati_ido_ajanlas_parameter_func.Ranorex.Core.Testing.ITestModule.Run() in C:\sERPaGUITest\Keszlet\Keszlet\Keszlet\close_Lejarati_ido_ajanlas_parameter_func.cs:line 83at Ranorex.Core.Testing.TestModuleLeaf.RunInternal(DataContext parentDataContext, Int32 iteration, Int32 iterationCount, Boolean skipIteration)

The button still there:
button1.png
Thank you in advance!
You do not have the required permissions to view the files attached to this post.

Elena_v
Posts: 18
Joined: Tue Jun 25, 2019 4:27 pm

Re: Cant find button and combobox

Post by Elena_v » Wed Dec 29, 2021 8:23 pm

Hi!
The problem is the path to the element. It most likely has dynamic properties that change when the application is newly started.
Check your items in the repository. Leave only static properties in the paths. Read more about this on the website.
https://www.ranorex.com/help/latest/ran ... roduction/

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7465
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Cant find button and combobox

Post by odklizec » Wed Dec 29, 2021 10:00 pm

Hi,

Please upload a Ranorex snapshot (NOT screenshot) of the problematic combo box and full xpath behind the failing element. Without, at very least, snapshot, there is not much anyone here can do or suggest. Elena may be right, about the xpath elements, but as mentioned, it’s impossible to tell for sure without seeing the snapshot.
Pavel Kudrys
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

katoa
Posts: 11
Joined: Mon Jun 14, 2021 4:06 pm

Re: Cant find button and combobox

Post by katoa » Tue Jan 11, 2022 2:05 pm

Hi!

First of all thank you for your help.
I've tried to reproduce the problem, but I did not manage to.

If I will, I will open another ticket.

Thank you again!