-
Notifications
You must be signed in to change notification settings - Fork 0
/
SaucedemoFirefoxReport.html
346 lines (309 loc) · 35.2 KB
/
SaucedemoFirefoxReport.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>SaucedemoFirefoxReport.html</title>
<link href="assets/style.css" rel="stylesheet" type="text/css"/></head>
<body onLoad="init()">
<script>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
function toArray(iter) {
if (iter === null) {
return null;
}
return Array.prototype.slice.call(iter);
}
function find(selector, elem) { // eslint-disable-line no-redeclare
if (!elem) {
elem = document;
}
return elem.querySelector(selector);
}
function findAll(selector, elem) {
if (!elem) {
elem = document;
}
return toArray(elem.querySelectorAll(selector));
}
function sortColumn(elem) {
toggleSortStates(elem);
const colIndex = toArray(elem.parentNode.childNodes).indexOf(elem);
let key;
if (elem.classList.contains('result')) {
key = keyResult;
} else if (elem.classList.contains('links')) {
key = keyLink;
} else {
key = keyAlpha;
}
sortTable(elem, key(colIndex));
}
function showAllExtras() { // eslint-disable-line no-unused-vars
findAll('.col-result').forEach(showExtras);
}
function hideAllExtras() { // eslint-disable-line no-unused-vars
findAll('.col-result').forEach(hideExtras);
}
function showExtras(colresultElem) {
const extras = colresultElem.parentNode.nextElementSibling;
const expandcollapse = colresultElem.firstElementChild;
extras.classList.remove('collapsed');
expandcollapse.classList.remove('expander');
expandcollapse.classList.add('collapser');
}
function hideExtras(colresultElem) {
const extras = colresultElem.parentNode.nextElementSibling;
const expandcollapse = colresultElem.firstElementChild;
extras.classList.add('collapsed');
expandcollapse.classList.remove('collapser');
expandcollapse.classList.add('expander');
}
function showFilters() {
let visibleString = getQueryParameter('visible') || 'all';
visibleString = visibleString.toLowerCase();
const checkedItems = visibleString.split(',');
const filterItems = document.getElementsByClassName('filter');
for (let i = 0; i < filterItems.length; i++) {
filterItems[i].hidden = false;
if (visibleString != 'all') {
filterItems[i].checked = checkedItems.includes(filterItems[i].getAttribute('data-test-result'));
filterTable(filterItems[i]);
}
}
}
function addCollapse() {
// Add links for show/hide all
const resulttable = find('table#results-table');
const showhideall = document.createElement('p');
showhideall.innerHTML = '<a href="javascript:showAllExtras()">Show all details</a> / ' +
'<a href="javascript:hideAllExtras()">Hide all details</a>';
resulttable.parentElement.insertBefore(showhideall, resulttable);
// Add show/hide link to each result
findAll('.col-result').forEach(function(elem) {
const collapsed = getQueryParameter('collapsed') || 'Passed';
const extras = elem.parentNode.nextElementSibling;
const expandcollapse = document.createElement('span');
if (extras.classList.contains('collapsed')) {
expandcollapse.classList.add('expander');
} else if (collapsed.includes(elem.innerHTML)) {
extras.classList.add('collapsed');
expandcollapse.classList.add('expander');
} else {
expandcollapse.classList.add('collapser');
}
elem.appendChild(expandcollapse);
elem.addEventListener('click', function(event) {
if (event.currentTarget.parentNode.nextElementSibling.classList.contains('collapsed')) {
showExtras(event.currentTarget);
} else {
hideExtras(event.currentTarget);
}
});
});
}
function getQueryParameter(name) {
const match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}
function init () { // eslint-disable-line no-unused-vars
resetSortHeaders();
addCollapse();
showFilters();
sortColumn(find('.initial-sort'));
findAll('.sortable').forEach(function(elem) {
elem.addEventListener('click',
function() {
sortColumn(elem);
}, false);
});
}
function sortTable(clicked, keyFunc) {
const rows = findAll('.results-table-row');
const reversed = !clicked.classList.contains('asc');
const sortedRows = sort(rows, keyFunc, reversed);
/* Whole table is removed here because browsers acts much slower
* when appending existing elements.
*/
const thead = document.getElementById('results-table-head');
document.getElementById('results-table').remove();
const parent = document.createElement('table');
parent.id = 'results-table';
parent.appendChild(thead);
sortedRows.forEach(function(elem) {
parent.appendChild(elem);
});
document.getElementsByTagName('BODY')[0].appendChild(parent);
}
function sort(items, keyFunc, reversed) {
const sortArray = items.map(function(item, i) {
return [keyFunc(item), i];
});
sortArray.sort(function(a, b) {
const keyA = a[0];
const keyB = b[0];
if (keyA == keyB) return 0;
if (reversed) {
return keyA < keyB ? 1 : -1;
} else {
return keyA > keyB ? 1 : -1;
}
});
return sortArray.map(function(item) {
const index = item[1];
return items[index];
});
}
function keyAlpha(colIndex) {
return function(elem) {
return elem.childNodes[1].childNodes[colIndex].firstChild.data.toLowerCase();
};
}
function keyLink(colIndex) {
return function(elem) {
const dataCell = elem.childNodes[1].childNodes[colIndex].firstChild;
return dataCell == null ? '' : dataCell.innerText.toLowerCase();
};
}
function keyResult(colIndex) {
return function(elem) {
const strings = ['Error', 'Failed', 'Rerun', 'XFailed', 'XPassed',
'Skipped', 'Passed'];
return strings.indexOf(elem.childNodes[1].childNodes[colIndex].firstChild.data);
};
}
function resetSortHeaders() {
findAll('.sort-icon').forEach(function(elem) {
elem.parentNode.removeChild(elem);
});
findAll('.sortable').forEach(function(elem) {
const icon = document.createElement('div');
icon.className = 'sort-icon';
icon.textContent = 'vvv';
elem.insertBefore(icon, elem.firstChild);
elem.classList.remove('desc', 'active');
elem.classList.add('asc', 'inactive');
});
}
function toggleSortStates(elem) {
//if active, toggle between asc and desc
if (elem.classList.contains('active')) {
elem.classList.toggle('asc');
elem.classList.toggle('desc');
}
//if inactive, reset all other functions and add ascending active
if (elem.classList.contains('inactive')) {
resetSortHeaders();
elem.classList.remove('inactive');
elem.classList.add('active');
}
}
function isAllRowsHidden(value) {
return value.hidden == false;
}
function filterTable(elem) { // eslint-disable-line no-unused-vars
const outcomeAtt = 'data-test-result';
const outcome = elem.getAttribute(outcomeAtt);
const classOutcome = outcome + ' results-table-row';
const outcomeRows = document.getElementsByClassName(classOutcome);
for(let i = 0; i < outcomeRows.length; i++){
outcomeRows[i].hidden = !elem.checked;
}
const rows = findAll('.results-table-row').filter(isAllRowsHidden);
const allRowsHidden = rows.length == 0 ? true : false;
const notFoundMessage = document.getElementById('not-found-message');
notFoundMessage.hidden = !allRowsHidden;
}
</script>
<h1>SaucedemoFirefoxReport.html</h1>
<p>Report generated on 01-Mar-2023 at 12:10:43 by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a> v3.2.0</p>
<h2>Environment</h2>
<table id="environment">
<tr>
<td>JAVA_HOME</td>
<td>/usr/local/Cellar/openjdk/19.0.2/libexec/openjdk.jdk/Contents/Home</td></tr>
<tr>
<td>Packages</td>
<td>{"pluggy": "1.0.0", "pytest": "7.2.1"}</td></tr>
<tr>
<td>Platform</td>
<td>macOS-12.3-x86_64-i386-64bit</td></tr>
<tr>
<td>Plugins</td>
<td>{"html": "3.2.0", "metadata": "2.0.4"}</td></tr>
<tr>
<td>Python</td>
<td>3.11.1</td></tr></table>
<h2>Summary</h2>
<p>5 tests ran in 98.34 seconds. </p>
<p class="filter" hidden="true">(Un)check the boxes to filter the results.</p><input checked="true" class="filter" data-test-result="passed" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="passed">3 passed</span>, <input checked="true" class="filter" data-test-result="skipped" disabled="true" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="skipped">0 skipped</span>, <input checked="true" class="filter" data-test-result="failed" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="failed">2 failed</span>, <input checked="true" class="filter" data-test-result="error" disabled="true" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="error">0 errors</span>, <input checked="true" class="filter" data-test-result="xfailed" disabled="true" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="xfailed">0 expected failures</span>, <input checked="true" class="filter" data-test-result="xpassed" disabled="true" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="xpassed">0 unexpected passes</span>
<h2>Results</h2>
<table id="results-table">
<thead id="results-table-head">
<tr>
<th class="sortable result initial-sort" col="result">Result</th>
<th class="sortable" col="name">Test</th>
<th class="sortable" col="duration">Duration</th>
<th class="sortable links" col="links">Links</th></tr>
<tr hidden="true" id="not-found-message">
<th colspan="4">No results found. Try to check the filters</th></tr></thead>
<tbody class="failed results-table-row">
<tr>
<td class="col-result">Failed</td>
<td class="col-name">TestCases/test_product.py::SaucedemoProduct::test_a_success_product_open_detail</td>
<td class="col-duration">20.36</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log">self = <TestCases.test_product.SaucedemoProduct testMethod=test_a_success_product_open_detail><br/><br/> def test_a_success_product_open_detail(self):<br/> # step to login<br/> loginPage = LoginPage(self.browser)<br/> loginPage.setUsername(self.username)<br/> loginPage.setPassword(self.password)<br/> loginPage.clickLogin()<br/> time.sleep(5)<br/> # assert product available<br/> productListingPage = ProductListingPage(self.browser)<br/> third_product_name = productListingPage.getThirdProduct().text<br/> self.assertEqual("Sauce Labs Bolt T-Shirt", third_product_name)<br/> # step to open detail page<br/>> productListingPage.getThirdProduct().click()<br/><br/>TestCases/test_product.py:39: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/>../../../.pyenv/versions/3.11.1/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py:93: in click<br/> self._execute(Command.CLICK_ELEMENT)<br/>../../../.pyenv/versions/3.11.1/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py:403: in _execute<br/> return self._parent.execute(command, params)<br/>../../../.pyenv/versions/3.11.1/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py:440: in execute<br/> self.error_handler.check_response(response)<br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/><br/>self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x110bb31d0><br/>response = {'status': 400, 'value': '{"value":{"error":"element click intercepted","message":"Element <div class=\\"inventory_ite...sys.mjs:198:29\\nreceiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:86:31\\n"}}'}<br/><br/> def check_response(self, response: Dict[str, Any]) -> None:<br/> """Checks that a JSON response from the WebDriver does not have an<br/> error.<br/> <br/> :Args:<br/> - response - The JSON response from the WebDriver server as a dictionary<br/> object.<br/> <br/> :Raises: If the response contains an error message.<br/> """<br/> status = response.get("status", None)<br/> if not status or status == ErrorCode.SUCCESS:<br/> return<br/> value = None<br/> message = response.get("message", "")<br/> screen: str = response.get("screen", "")<br/> stacktrace = None<br/> if isinstance(status, int):<br/> value_json = response.get("value", None)<br/> if value_json and isinstance(value_json, str):<br/> import json<br/> <br/> try:<br/> value = json.loads(value_json)<br/> if len(value.keys()) == 1:<br/> value = value["value"]<br/> status = value.get("error", None)<br/> if not status:<br/> status = value.get("status", ErrorCode.UNKNOWN_ERROR)<br/> message = value.get("value") or value.get("message")<br/> if not isinstance(message, str):<br/> value = message<br/> message = message.get("message")<br/> else:<br/> message = value.get("message", None)<br/> except ValueError:<br/> pass<br/> <br/> exception_class: Type[WebDriverException]<br/> if status in ErrorCode.NO_SUCH_ELEMENT:<br/> exception_class = NoSuchElementException<br/> elif status in ErrorCode.NO_SUCH_FRAME:<br/> exception_class = NoSuchFrameException<br/> elif status in ErrorCode.NO_SUCH_SHADOW_ROOT:<br/> exception_class = NoSuchShadowRootException<br/> elif status in ErrorCode.NO_SUCH_WINDOW:<br/> exception_class = NoSuchWindowException<br/> elif status in ErrorCode.STALE_ELEMENT_REFERENCE:<br/> exception_class = StaleElementReferenceException<br/> elif status in ErrorCode.ELEMENT_NOT_VISIBLE:<br/> exception_class = ElementNotVisibleException<br/> elif status in ErrorCode.INVALID_ELEMENT_STATE:<br/> exception_class = InvalidElementStateException<br/> elif (<br/> status in ErrorCode.INVALID_SELECTOR<br/> or status in ErrorCode.INVALID_XPATH_SELECTOR<br/> or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER<br/> ):<br/> exception_class = InvalidSelectorException<br/> elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:<br/> exception_class = ElementNotSelectableException<br/> elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:<br/> exception_class = ElementNotInteractableException<br/> elif status in ErrorCode.INVALID_COOKIE_DOMAIN:<br/> exception_class = InvalidCookieDomainException<br/> elif status in ErrorCode.UNABLE_TO_SET_COOKIE:<br/> exception_class = UnableToSetCookieException<br/> elif status in ErrorCode.TIMEOUT:<br/> exception_class = TimeoutException<br/> elif status in ErrorCode.SCRIPT_TIMEOUT:<br/> exception_class = TimeoutException<br/> elif status in ErrorCode.UNKNOWN_ERROR:<br/> exception_class = WebDriverException<br/> elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:<br/> exception_class = UnexpectedAlertPresentException<br/> elif status in ErrorCode.NO_ALERT_OPEN:<br/> exception_class = NoAlertPresentException<br/> elif status in ErrorCode.IME_NOT_AVAILABLE:<br/> exception_class = ImeNotAvailableException<br/> elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:<br/> exception_class = ImeActivationFailedException<br/> elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:<br/> exception_class = MoveTargetOutOfBoundsException<br/> elif status in ErrorCode.JAVASCRIPT_ERROR:<br/> exception_class = JavascriptException<br/> elif status in ErrorCode.SESSION_NOT_CREATED:<br/> exception_class = SessionNotCreatedException<br/> elif status in ErrorCode.INVALID_ARGUMENT:<br/> exception_class = InvalidArgumentException<br/> elif status in ErrorCode.NO_SUCH_COOKIE:<br/> exception_class = NoSuchCookieException<br/> elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:<br/> exception_class = ScreenshotException<br/> elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:<br/> exception_class = ElementClickInterceptedException<br/> elif status in ErrorCode.INSECURE_CERTIFICATE:<br/> exception_class = InsecureCertificateException<br/> elif status in ErrorCode.INVALID_COORDINATES:<br/> exception_class = InvalidCoordinatesException<br/> elif status in ErrorCode.INVALID_SESSION_ID:<br/> exception_class = InvalidSessionIdException<br/> elif status in ErrorCode.UNKNOWN_METHOD:<br/> exception_class = UnknownMethodException<br/> else:<br/> exception_class = WebDriverException<br/> if not value:<br/> value = response["value"]<br/> if isinstance(value, str):<br/> raise exception_class(value)<br/> if message == "" and "message" in value:<br/> message = value["message"]<br/> <br/> screen = None # type: ignore[assignment]<br/> if "screen" in value:<br/> screen = value["screen"]<br/> <br/> stacktrace = None<br/> st_value = value.get("stackTrace") or value.get("stacktrace")<br/> if st_value:<br/> if isinstance(st_value, str):<br/> stacktrace = st_value.split("\n")<br/> else:<br/> stacktrace = []<br/> try:<br/> for frame in st_value:<br/> line = frame.get("lineNumber", "")<br/> file = frame.get("fileName", "<anonymous>")<br/> if line:<br/> file = f"{file}:{line}"<br/> meth = frame.get("methodName", "<anonymous>")<br/> if "className" in frame:<br/> meth = f"{frame['className']}.{meth}"<br/> msg = " at %s (%s)"<br/> msg = msg % (meth, file)<br/> stacktrace.append(msg)<br/> except TypeError:<br/> pass<br/> if exception_class == UnexpectedAlertPresentException:<br/> alert_text = None<br/> if "data" in value:<br/> alert_text = value["data"].get("text")<br/> elif "alert" in value:<br/> alert_text = value["alert"].get("text")<br/> raise exception_class(message, screen, stacktrace, alert_text) # type: ignore[call-arg] # mypy is not smart enough here<br/>> raise exception_class(message, screen, stacktrace)<br/><span class="error">E selenium.common.exceptions.ElementClickInterceptedException: Message: Element <div class="inventory_item_name"> is not clickable at point (887,447) because another element <a id="item_5_img_link" href="#"> obscures it</span><br/><span class="error">E Stacktrace:</span><br/><span class="error">E RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8</span><br/><span class="error">E WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:180:5</span><br/><span class="error">E ElementClickInterceptedError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:279:5</span><br/><span class="error">E webdriverClickElement@chrome://remote/content/marionette/interaction.sys.mjs:160:11</span><br/><span class="error">E interaction.clickElement@chrome://remote/content/marionette/interaction.sys.mjs:119:11</span><br/><span class="error">E clickElement@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:198:29</span><br/><span class="error">E receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:86:31</span><br/><br/>../../../.pyenv/versions/3.11.1/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py:245: ElementClickInterceptedException<br/> ------------------------------Captured stderr call------------------------------ <br/>[WDM] - Downloading: 0%| | 0.00/1.60k [00:00<?, ?B/s][WDM] - Downloading: 16.9kB [00:00, 2.62MB/s]
<br/></div></td></tr></tbody>
<tbody class="failed results-table-row">
<tr>
<td class="col-result">Failed</td>
<td class="col-name">TestCases/test_product.py::SaucedemoProduct::test_b_success_product_add_tocart</td>
<td class="col-duration">18.37</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log">self = <TestCases.test_product.SaucedemoProduct testMethod=test_b_success_product_add_tocart><br/><br/> def test_b_success_product_add_tocart(self):<br/> # step to login<br/> loginPage = LoginPage(self.browser)<br/> loginPage.setUsername(self.username)<br/> loginPage.setPassword(self.password)<br/> loginPage.clickLogin()<br/> time.sleep(5)<br/> # assert product available<br/> productListingPage = ProductListingPage(self.browser)<br/> third_product_name = productListingPage.getThirdProduct().text<br/> self.assertEqual("Sauce Labs Bolt T-Shirt", third_product_name)<br/> # step to add to cart<br/>> productListingPage.getThirdProduct().click()<br/><br/>TestCases/test_product.py:64: <br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/>../../../.pyenv/versions/3.11.1/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py:93: in click<br/> self._execute(Command.CLICK_ELEMENT)<br/>../../../.pyenv/versions/3.11.1/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py:403: in _execute<br/> return self._parent.execute(command, params)<br/>../../../.pyenv/versions/3.11.1/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py:440: in execute<br/> self.error_handler.check_response(response)<br/>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ <br/><br/>self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x110ce7850><br/>response = {'status': 400, 'value': '{"value":{"error":"element click intercepted","message":"Element <div class=\\"inventory_ite...sys.mjs:198:29\\nreceiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:86:31\\n"}}'}<br/><br/> def check_response(self, response: Dict[str, Any]) -> None:<br/> """Checks that a JSON response from the WebDriver does not have an<br/> error.<br/> <br/> :Args:<br/> - response - The JSON response from the WebDriver server as a dictionary<br/> object.<br/> <br/> :Raises: If the response contains an error message.<br/> """<br/> status = response.get("status", None)<br/> if not status or status == ErrorCode.SUCCESS:<br/> return<br/> value = None<br/> message = response.get("message", "")<br/> screen: str = response.get("screen", "")<br/> stacktrace = None<br/> if isinstance(status, int):<br/> value_json = response.get("value", None)<br/> if value_json and isinstance(value_json, str):<br/> import json<br/> <br/> try:<br/> value = json.loads(value_json)<br/> if len(value.keys()) == 1:<br/> value = value["value"]<br/> status = value.get("error", None)<br/> if not status:<br/> status = value.get("status", ErrorCode.UNKNOWN_ERROR)<br/> message = value.get("value") or value.get("message")<br/> if not isinstance(message, str):<br/> value = message<br/> message = message.get("message")<br/> else:<br/> message = value.get("message", None)<br/> except ValueError:<br/> pass<br/> <br/> exception_class: Type[WebDriverException]<br/> if status in ErrorCode.NO_SUCH_ELEMENT:<br/> exception_class = NoSuchElementException<br/> elif status in ErrorCode.NO_SUCH_FRAME:<br/> exception_class = NoSuchFrameException<br/> elif status in ErrorCode.NO_SUCH_SHADOW_ROOT:<br/> exception_class = NoSuchShadowRootException<br/> elif status in ErrorCode.NO_SUCH_WINDOW:<br/> exception_class = NoSuchWindowException<br/> elif status in ErrorCode.STALE_ELEMENT_REFERENCE:<br/> exception_class = StaleElementReferenceException<br/> elif status in ErrorCode.ELEMENT_NOT_VISIBLE:<br/> exception_class = ElementNotVisibleException<br/> elif status in ErrorCode.INVALID_ELEMENT_STATE:<br/> exception_class = InvalidElementStateException<br/> elif (<br/> status in ErrorCode.INVALID_SELECTOR<br/> or status in ErrorCode.INVALID_XPATH_SELECTOR<br/> or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER<br/> ):<br/> exception_class = InvalidSelectorException<br/> elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:<br/> exception_class = ElementNotSelectableException<br/> elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:<br/> exception_class = ElementNotInteractableException<br/> elif status in ErrorCode.INVALID_COOKIE_DOMAIN:<br/> exception_class = InvalidCookieDomainException<br/> elif status in ErrorCode.UNABLE_TO_SET_COOKIE:<br/> exception_class = UnableToSetCookieException<br/> elif status in ErrorCode.TIMEOUT:<br/> exception_class = TimeoutException<br/> elif status in ErrorCode.SCRIPT_TIMEOUT:<br/> exception_class = TimeoutException<br/> elif status in ErrorCode.UNKNOWN_ERROR:<br/> exception_class = WebDriverException<br/> elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:<br/> exception_class = UnexpectedAlertPresentException<br/> elif status in ErrorCode.NO_ALERT_OPEN:<br/> exception_class = NoAlertPresentException<br/> elif status in ErrorCode.IME_NOT_AVAILABLE:<br/> exception_class = ImeNotAvailableException<br/> elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:<br/> exception_class = ImeActivationFailedException<br/> elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:<br/> exception_class = MoveTargetOutOfBoundsException<br/> elif status in ErrorCode.JAVASCRIPT_ERROR:<br/> exception_class = JavascriptException<br/> elif status in ErrorCode.SESSION_NOT_CREATED:<br/> exception_class = SessionNotCreatedException<br/> elif status in ErrorCode.INVALID_ARGUMENT:<br/> exception_class = InvalidArgumentException<br/> elif status in ErrorCode.NO_SUCH_COOKIE:<br/> exception_class = NoSuchCookieException<br/> elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:<br/> exception_class = ScreenshotException<br/> elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:<br/> exception_class = ElementClickInterceptedException<br/> elif status in ErrorCode.INSECURE_CERTIFICATE:<br/> exception_class = InsecureCertificateException<br/> elif status in ErrorCode.INVALID_COORDINATES:<br/> exception_class = InvalidCoordinatesException<br/> elif status in ErrorCode.INVALID_SESSION_ID:<br/> exception_class = InvalidSessionIdException<br/> elif status in ErrorCode.UNKNOWN_METHOD:<br/> exception_class = UnknownMethodException<br/> else:<br/> exception_class = WebDriverException<br/> if not value:<br/> value = response["value"]<br/> if isinstance(value, str):<br/> raise exception_class(value)<br/> if message == "" and "message" in value:<br/> message = value["message"]<br/> <br/> screen = None # type: ignore[assignment]<br/> if "screen" in value:<br/> screen = value["screen"]<br/> <br/> stacktrace = None<br/> st_value = value.get("stackTrace") or value.get("stacktrace")<br/> if st_value:<br/> if isinstance(st_value, str):<br/> stacktrace = st_value.split("\n")<br/> else:<br/> stacktrace = []<br/> try:<br/> for frame in st_value:<br/> line = frame.get("lineNumber", "")<br/> file = frame.get("fileName", "<anonymous>")<br/> if line:<br/> file = f"{file}:{line}"<br/> meth = frame.get("methodName", "<anonymous>")<br/> if "className" in frame:<br/> meth = f"{frame['className']}.{meth}"<br/> msg = " at %s (%s)"<br/> msg = msg % (meth, file)<br/> stacktrace.append(msg)<br/> except TypeError:<br/> pass<br/> if exception_class == UnexpectedAlertPresentException:<br/> alert_text = None<br/> if "data" in value:<br/> alert_text = value["data"].get("text")<br/> elif "alert" in value:<br/> alert_text = value["alert"].get("text")<br/> raise exception_class(message, screen, stacktrace, alert_text) # type: ignore[call-arg] # mypy is not smart enough here<br/>> raise exception_class(message, screen, stacktrace)<br/><span class="error">E selenium.common.exceptions.ElementClickInterceptedException: Message: Element <div class="inventory_item_name"> is not clickable at point (887,447) because another element <a id="item_5_img_link" href="#"> obscures it</span><br/><span class="error">E Stacktrace:</span><br/><span class="error">E RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8</span><br/><span class="error">E WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:180:5</span><br/><span class="error">E ElementClickInterceptedError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:279:5</span><br/><span class="error">E webdriverClickElement@chrome://remote/content/marionette/interaction.sys.mjs:160:11</span><br/><span class="error">E interaction.clickElement@chrome://remote/content/marionette/interaction.sys.mjs:119:11</span><br/><span class="error">E clickElement@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:198:29</span><br/><span class="error">E receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:86:31</span><br/><br/>../../../.pyenv/versions/3.11.1/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py:245: ElementClickInterceptedException<br/> ------------------------------Captured stderr call------------------------------ <br/>[WDM] - Downloading: 0%| | 0.00/1.60k [00:00<?, ?B/s][WDM] - Downloading: 16.9kB [00:00, 3.13MB/s]
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">TestCases/test_login.py::SaucedemoLogin::test_a_success_login_standard_user</td>
<td class="col-duration">18.92</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stderr call------------------------------ <br/>[WDM] - Downloading: 0%| | 0.00/1.60k [00:00<?, ?B/s][WDM] - Downloading: 16.9kB [00:00, 4.66MB/s]
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">TestCases/test_login.py::SaucedemoLogin::test_b_success_logout</td>
<td class="col-duration">26.64</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stderr call------------------------------ <br/>[WDM] - Downloading: 0%| | 0.00/1.59k [00:00<?, ?B/s][WDM] - Downloading: 16.9kB [00:00, 1.54MB/s]
<br/></div></td></tr></tbody>
<tbody class="passed results-table-row">
<tr>
<td class="col-result">Passed</td>
<td class="col-name">TestCases/test_login.py::SaucedemoLogin::test_c_failed_login_wrong_password</td>
<td class="col-duration">13.58</td>
<td class="col-links"></td></tr>
<tr>
<td class="extra" colspan="4">
<div class="log"> ------------------------------Captured stderr call------------------------------ <br/>[WDM] - Downloading: 0%| | 0.00/1.60k [00:00<?, ?B/s][WDM] - Downloading: 16.9kB [00:00, 6.27MB/s]
<br/></div></td></tr></tbody></table></body></html>