diff --git a/core/modules/color/color.js b/core/modules/color/color.js
index ed68732..0996bb8 100644
--- a/core/modules/color/color.js
+++ b/core/modules/color/color.js
@@ -21,7 +21,7 @@
       var j;
       var colors;
       // This behavior attaches by ID, so is only valid once on a page.
-      var form = $(context).find('#system-theme-settings .color-form').once('color');
+      var form = $(context).find('[data-drupal-selector="system-theme-settings"]').find('.color-form').once('color');
       if (form.length === 0) {
         return;
       }
@@ -66,7 +66,7 @@
       }
 
       // Set up colorScheme selector.
-      form.find('#edit-scheme').on('change', function () {
+      form.find('[data-drupal-selector="edit-scheme"]').on('change', function () {
         var schemes = settings.color.schemes;
         var colorScheme = this.options[this.selectedIndex].value;
         if (colorScheme !== '' && schemes[colorScheme]) {
@@ -74,7 +74,7 @@
           colors = schemes[colorScheme];
           for (var fieldName in colors) {
             if (colors.hasOwnProperty(fieldName)) {
-              callback($('#edit-palette-' + fieldName), colors[fieldName], false, true);
+              callback($('[data-drupal-selector="edit-palette-' + fieldName + '"]'), colors[fieldName], false, true);
             }
           }
           preview();
@@ -206,7 +206,7 @@
        * Resets the color scheme selector.
        */
       function resetScheme() {
-        form.find('#edit-scheme').each(function () {
+        form.find('[data-drupal-selector="edit-scheme"]').each(function () {
           this.selectedIndex = this.options.length - 1;
         });
       }
diff --git a/core/modules/color/preview.js b/core/modules/color/preview.js
index 0796ee9..29df5c0 100644
--- a/core/modules/color/preview.js
+++ b/core/modules/color/preview.js
@@ -37,8 +37,8 @@
       form.find('.color-preview').css('backgroundColor', form.find('.color-palette input[name="palette[base]"]').val());
 
       // Text preview.
-      form.find('#text').css('color', form.find('.color-palette input[name="palette[text]"]').val());
-      form.find('#text a, #text h2').css('color', form.find('.color-palette input[name="palette[link]"]').val());
+      form.find('[data-drupal-selector="text"]').css('color', form.find('.color-palette input[name="palette[text]"]').val());
+      form.find('[data-drupal-selector="text"] a, [data-drupal-selector="text"] h2').css('color', form.find('.color-palette input[name="palette[link]"]').val());
 
       function gradientLineColor(i, element) {
         for (var k in accum) {
diff --git a/core/modules/language/language.admin.js b/core/modules/language/language.admin.js
index 9d3daa4..8beb9bb 100644
--- a/core/modules/language/language.admin.js
+++ b/core/modules/language/language.admin.js
@@ -17,7 +17,7 @@
    */
   Drupal.behaviors.negotiationLanguage = {
     attach: function () {
-      var $configForm = $('#language-negotiation-configure-form');
+      var $configForm = $('[data-drupal-selector="language-negotiation-configure-form"]');
       var inputSelector = 'input[name$="[configurable]"]';
       // Given a customization checkbox derive the language type being changed.
       function toggleTable(checkbox) {
diff --git a/core/modules/node/node.preview.js b/core/modules/node/node.preview.js
index 4054183..7ee0bbf 100644
--- a/core/modules/node/node.preview.js
+++ b/core/modules/node/node.preview.js
@@ -51,7 +51,7 @@
 
       var $preview = $(context).find('.content').once('node-preview');
       if ($(context).find('.node-preview-container').length) {
-        $preview.on('click.preview', 'a:not([href^=#], #edit-backlink, #toolbar-administration a)', clickPreviewModal);
+        $preview.on('click.preview', 'a:not([href^=#], [data-drupal-selector="edit-backlink"], [data-drupal-selector="toolbar-administration"] a)', clickPreviewModal);
       }
     },
     detach: function (context, settings, trigger) {
diff --git a/core/modules/simpletest/simpletest.js b/core/modules/simpletest/simpletest.js
index dfe5fba..a230fe7 100644
--- a/core/modules/simpletest/simpletest.js
+++ b/core/modules/simpletest/simpletest.js
@@ -107,14 +107,14 @@
           // Indicate that a search has been performed, and hide the
           // "select all" checkbox.
           searched = true;
-          $('#simpletest-form-table thead th.select-all input').hide();
+          $('[data-drupal-selector="simpletest-form-table"] thead th.select-all input').hide();
 
           $rows.each(showTestRow);
         }
         // Restore to the original state if any searching has occurred.
         else if (searched) {
           searched = false;
-          $('#simpletest-form-table thead th.select-all input').show();
+          $('[data-drupal-selector="simpletest-form-table"] thead th.select-all input').show();
           // Restore all rows to their original display state.
           $rows.css('display', '');
         }
diff --git a/core/modules/system/tests/fixtures/HtaccessTest/access_test.module~ b/core/modules/system/tests/fixtures/HtaccessTest/access_test.module~
old mode 100644
new mode 100755
diff --git a/core/modules/system/tests/fixtures/HtaccessTest/access_test.php~ b/core/modules/system/tests/fixtures/HtaccessTest/access_test.php~
old mode 100644
new mode 100755
diff --git a/core/modules/toolbar/js/toolbar.js b/core/modules/toolbar/js/toolbar.js
index 8accad9..58bc3ea 100644
--- a/core/modules/toolbar/js/toolbar.js
+++ b/core/modules/toolbar/js/toolbar.js
@@ -47,7 +47,7 @@
         return;
       }
       // Process the administrative toolbar.
-      $(context).find('#toolbar-administration').once('toolbar').each(function () {
+      $(context).find('[data-drupal-selector="toolbar-administration"]').once('toolbar').each(function () {
 
         // Establish the toolbar models and views.
         var model = Drupal.toolbar.models.toolbarModel = new Drupal.toolbar.ToolbarModel({
diff --git a/core/modules/tour/js/tour.js b/core/modules/tour/js/tour.js
index 2c7050f..ca17088 100644
--- a/core/modules/tour/js/tour.js
+++ b/core/modules/tour/js/tour.js
@@ -31,7 +31,7 @@
       $('body').once('tour').each(function () {
         var model = new Drupal.tour.models.StateModel();
         new Drupal.tour.views.ToggleTourView({
-          el: $(context).find('#toolbar-tab-tour'),
+          el: $(context).find('[data-drupal-selector="toolbar-tab-tour"]'),
           model: model
         });
 
@@ -42,7 +42,7 @@
           })
           // Initialization: check whether a tour is available on the current
           // page.
-          .set('tour', $(context).find('ol#tour'));
+          .set('tour', $(context).find('ol[data-drupal-selector="tour"]'));
 
         // Start the tour immediately if toggled via query string.
         if (/tour=?/i.test(queryString)) {
@@ -237,7 +237,7 @@
           }
           // Remove tip from the DOM if there is no corresponding page element.
           if ((!itemId && !itemClass) ||
-            (itemId && $document.find('#' + itemId).length) ||
+            (itemId && $document.find('[data-drupal-selector="' + itemId + '"]').length) ||
             (itemClass && $document.find('.' + itemClass).length)) {
             return;
           }
