|
1072 | 1072 | " input_name = elem.text\n",
|
1073 | 1073 | "\n",
|
1074 | 1074 | " if input_type in [\"checkbox\", \"radio\"]:\n",
|
1075 |
| - " actions.add(\"check('%s', <boolean>)\" % html.escape(input_name))\n", |
| 1075 | + " actions.add(\"check('''%s''', <boolean>)\" % html.escape(input_name))\n", |
1076 | 1076 | " elif input_type in [\"text\", \"number\", \"email\", \"password\"]:\n",
|
1077 |
| - " actions.add(\"fill('%s', '<%s>')\" % (html.escape(input_name), html.escape(input_type)))\n", |
| 1077 | + " actions.add(\"fill('''%s''', '<%s>')\" % (html.escape(input_name), html.escape(input_type)))\n", |
1078 | 1078 | " elif input_type in [\"button\", \"submit\"]:\n",
|
1079 |
| - " actions.add(\"submit('%s')\" % html.escape(input_name))\n", |
| 1079 | + " actions.add(\"submit('''%s''')\" % html.escape(input_name))\n", |
1080 | 1080 | " elif input_type in [\"hidden\"]:\n",
|
1081 | 1081 | " pass\n",
|
1082 | 1082 | " else:\n",
|
1083 | 1083 | " # TODO: Handle more types here\n",
|
1084 |
| - " actions.add(\"fill('%s', <%s>)\" % (html.escape(input_name), html.escape(input_type)))\n", |
| 1084 | + " actions.add(\"fill('''%s''', <%s>)\" % (html.escape(input_name), html.escape(input_type)))\n", |
1085 | 1085 | " except StaleElementReferenceException:\n",
|
1086 | 1086 | " pass\n",
|
1087 | 1087 | "\n",
|
|
1131 | 1131 | " if button_name is None:\n",
|
1132 | 1132 | " button_name = elem.text\n",
|
1133 | 1133 | " if button_type == \"submit\":\n",
|
1134 |
| - " actions.add(\"submit('%s')\" % html.escape(button_name))\n", |
| 1134 | + " actions.add(\"submit('''%s''')\" % html.escape(button_name))\n", |
1135 | 1135 | " elif button_type != \"reset\":\n",
|
1136 |
| - " actions.add(\"click('%s')\" % html.escape(button_name))\n", |
| 1136 | + " actions.add(\"click('''%s''')\" % html.escape(button_name))\n", |
1137 | 1137 | " except StaleElementReferenceException:\n",
|
1138 | 1138 | " pass\n",
|
1139 | 1139 | "\n",
|
|
1181 | 1181 | " a_href = elem.get_attribute(\"href\")\n",
|
1182 | 1182 | " if a_href is not None:\n",
|
1183 | 1183 | " if self.follow_link(a_href):\n",
|
1184 |
| - " actions.add(\"click('%s')\" % html.escape(elem.text))\n", |
| 1184 | + " actions.add(\"click('''%s''')\" % html.escape(elem.text))\n", |
1185 | 1185 | " else:\n",
|
1186 |
| - " actions.add(\"ignore('%s')\" % html.escape(elem.text))\n", |
| 1186 | + " actions.add(\"ignore('''%s''')\" % html.escape(elem.text))\n", |
1187 | 1187 | " except StaleElementReferenceException:\n",
|
1188 | 1188 | " pass\n",
|
1189 | 1189 | "\n",
|
|
0 commit comments