Hi there,
we are creating automated tests for testing Microsoft Outlook.
We have troubles by runnig a test on a Microsoft Surface Book (which has a high resulution display).
We are clicking the button for creating a new meeting (see screenshot from spy in attachment).
This button is detected as button on our regular laptops. When executing this testcase on Surface Book, the button is not found. We checked it with Ranorex on the Surface Book: On this laptop it is not detected as button, it is a menuitem. See attached screenshot.
Same outlook version, different gui element on different hardware Holy shit!
I need a solution to write a generic role in the rxpath instead of "button" or "menuitem". I tried to replace "button" with "element", but this doesn't work.
Any suggestions?
Regards
Patrick
Find an element with xpath which can be a button OR a menuitem
- Patrick Hollerbach
- Posts: 34
- Joined: Thu Jan 02, 2014 4:00 pm
- Location: Frankurt, Germany
Find an element with xpath which can be a button OR a menuitem
You do not have the required permissions to view the files attached to this post.
Re: Find an element with xpath which can be a button OR a menuitem
Hi,
Could you please post a Ranorex snapshot (ideally, a snasphot for each state)? Screenshots are not so helpful Anyway, what you can do is to replace exact element type with '*'. So the xpath could look like this:
This should identify element, regardless of its type. But be careful about using such "shortcut"! This workaround could return multiple elements, instead of just one!
Could you please post a Ranorex snapshot (ideally, a snasphot for each state)? Screenshots are not so helpful Anyway, what you can do is to replace exact element type with '*'. So the xpath could look like this:
Code: Select all
//*[@innertext='blablabla']
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