Bug 32718 - StyleId on ToolbarItem appears to be ignored
Summary: StyleId on ToolbarItem appears to be ignored
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.3
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
: 57589 ()
Depends on:
Blocks:
 
Reported: 2015-08-03 13:28 UTC by John Hardman
Modified: 2018-01-23 17:28 UTC (History)
13 users (show)

Tags: StyleId ToolbarItem Xamarin.Forms Xamarin.UITest ac
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description John Hardman 2015-08-03 13:28:48 UTC
The StyleId property on ToolbarItems appears to be ignored/lost. This makes automated testing problematic.
For details see the forum thread at the following URL, which describes the problem perfectly:

http://forums.xamarin.com/discussion/33416/ui-tests-styleid-on-toolbaritem-and-other-elements#latest
Comment 1 FieldstrikeMobile 2016-06-08 12:50:46 UTC
This is also true for the new AutomationId
Comment 2 Shawn Castrianni 2016-06-15 18:15:55 UTC
I just tested a Xamarin.Forms app on iOS where I created a ToolbarItem and set the AutomationId.  When I ran a REPL window, I was able to see the AutomationId value set on the Id of the native UINavigationButton control.  At least for X.F running on iOS, I have confirmed this works now for:

Xamarin.Forms 2.2.0.45
Xamarin.TestCloud.Agent 0.19.1
Comment 3 FieldstrikeMobile 2016-06-16 07:47:59 UTC
@shawnCastrianni actually you are correct! I forgot that my page is actually taking a list of toolbar items on one page and adding them to another.

My bad!
Comment 4 Samantha Houts [MSFT] 2016-12-02 20:39:33 UTC
@John Hardman: Is this still an issue, or are you able to use AutomationId instead?

Thanks!
Comment 5 Shawn Castrianni 2016-12-05 15:30:50 UTC
I guess it is fixed based on my AutomationId test above on June 15, 2016
Comment 6 John Hardman 2016-12-05 15:59:01 UTC
@Samantha Houts - I'm holding off on further UITest automation until I know whether/when Windows platforms will be supported. Happy for this to be closed based on Shawn's test. Will re-open if I return to UITest and encounter the problem again in future.
Comment 7 Samantha Houts [MSFT] 2016-12-05 17:55:40 UTC
Fair enough! We'll keep an eye out for this to be reopened. Thanks!!
Comment 8 Sheetal Naik 2017-05-08 12:18:25 UTC
Hi I tried using Style ID and Automation ID in the toolbar items of my Xamarin.Android project but it doesn't work. The issue is not resolved.
Comment 9 Samantha Houts [MSFT] 2017-05-09 00:44:02 UTC
I'm afraid ToolbarItems on Android lack the required property to set AutomationId. This property may be available with API 26+, so we will revisit this issue at that time. Until then, we may have to consider this a platform limitation.
Comment 10 Samantha Houts [MSFT] 2017-06-20 19:34:45 UTC
*** Bug 57589 has been marked as a duplicate of this bug. ***
Comment 11 Mark Muniz 2018-01-23 17:28:10 UTC
I am still experiencing this issue on iOS 9.0.2 and below. Other iOS versions work fine.