WordPress database error: [INSERT, UPDATE command denied to user '51213-2'@'10.10.20.5' for table 'wp_options']
INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_doing_cron', '1714329737.6455340385437011718750', 'yes') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)


Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/rest-api/class-wp-rest-server.php on line 1372
{"id":825,"date":"2011-11-15T17:55:56","date_gmt":"2011-11-15T16:55:56","guid":{"rendered":"http:\/\/www.jonathanantoine.com\/?p=825"},"modified":"2012-01-10T18:24:45","modified_gmt":"2012-01-10T17:24:45","slug":"coded-ui-tests-the-recorder-encountered-a-wrong-control-while-recording-the-last-action","status":"publish","type":"post","link":"http:\/\/www.jonathanantoine.com\/2011\/11\/15\/coded-ui-tests-the-recorder-encountered-a-wrong-control-while-recording-the-last-action\/","title":{"rendered":"Coded UI Tests : the recorder encountered a wrong control while recording the last action."},"content":{"rendered":"

\"\"<\/a>One more quick post on Coded UI tests recording issue. Today, the coded UI test builder tool said to me “The recorder encountered a wrong control while recording the last action.” !<\/p>\n

After some search in my app, I found out that it’is related to a ScrollViewer in a TabControl.<\/p>\n

In this post we’ll see how I solved it…
\n<\/p>\n

The issue<\/h3>\n

The problem is easy to reproduce: inside a tabcontrol, add a TabItem and set its ContentTemplate with a DataTemplate containing a ScrollViewer. Then try to record any action inside the TabItem using the Coded UI Test Builder. You won’t be able to do it.
\n
\"\"<\/a><\/p>\n

You can even set the ContentTemplate of the TabControl as pointed out on the Connect web site<\/a>.<\/p>\n

Here is an example of the XAML which does not work:
\n[xml]<TabControl Margin="0" x:Name="MainTabControl">
\n <TabItem Header="Tab">
\n <TabItem.ContentTemplate>
\n <DataTemplate>
\n <ScrollViewer>
\n <DockPanel>
\n <Button DockPanel.Dock="Bottom" Content="Youpi !"
\n Click="onButtonClick" \/>
\n <TextBox Text="a value " \/>
\n <\/DockPanel>
\n <\/ScrollViewer>
\n <\/DataTemplate>
\n <\/TabItem.ContentTemplate>
\n <\/TabItem>
\n<\/TabControl>[\/xml]<\/p>\n

The solution<\/h3>\n

The solution is the same than for the TextBox issue<\/a> : you have to create a fixed version of the ScrollViewer and use it instead of the standard one.<\/p>\n

The fixed version simply provide an automation peer which returns true when the UI test framework ask him if it’s a ControlElement.<\/strong> Here is the regarding code :
\n[csharp]public class FixedScrollViewer : ScrollViewer
\n {
\n protected override AutomationPeer OnCreateAutomationPeer()
\n {
\n var peer = new FixedScrollViewerAutomationPeer(this);
\n return peer;
\n }
\n }<\/p>\n

public class FixedScrollViewerAutomationPeer : ScrollViewerAutomationPeer
\n {
\n public FixedScrollViewerAutomationPeer(ScrollViewer target)
\n : base(target)
\n {<\/p>\n

}
\n protected override bool IsContentElementCore()
\n {
\n var isContentElementCore = base.IsContentElementCore();
\n return isContentElementCore;
\n }<\/p>\n

protected override bool IsControlElementCore()
\n {
\n \/\/If in a template it returns false and it breaks the CUITB :'(
\n return true;
\n }
\n }[\/csharp]<\/p>\n

MS fix : Visual Studio 2011<\/h3>\n

This bug is on connect<\/a> and Mathew Aniyan, the Visual Studio ALM program manager, noticed us that it will be fixed in the next version (VS2011 and Framework 4.5).<\/p>\n

Regards,<\/p>\n","protected":false},"excerpt":{"rendered":"

One more quick post on Coded UI tests recording issue. Today, the coded UI test builder tool said to me “The recorder encountered a wrong control while recording the last action.” ! After some search…<\/p>\n","protected":false},"author":3,"featured_media":831,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[27,4],"tags":[],"_links":{"self":[{"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/posts\/825"}],"collection":[{"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/comments?post=825"}],"version-history":[{"count":8,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/posts\/825\/revisions"}],"predecessor-version":[{"id":960,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/posts\/825\/revisions\/960"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/media\/831"}],"wp:attachment":[{"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/media?parent=825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/categories?post=825"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jonathanantoine.com\/wp-json\/wp\/v2\/tags?post=825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}