Codeception / Codeception/module-webdriver
Example of `executeAsyncJs()`
- 主要語言
- PHP
- 星號
- 39
- 分支
- 25
- PR 合併指標
- 30 天內沒有已合併 PR
描述
I have a case in which I request a API call via fetch/XHR (in execute async js method) grab its response and want to check that its response contains specific string.
Example:
```php
$response = $I->executeAsyncJS(<<assertContains('needle', $response);
```
I have made several attempts but unable to achieve the desired result. Sometimes I get errors or sometime empty array `[]`
It would be glad if such example is provided.
Note that there is also a [unanswered question on Stack Overflow](https://stackoverflow.com/questions/60108844/get-a-response-from-codeception-i-executeasyncjs)
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
Start with the executeAsyncJS() entry point and the linked Stack Overflow question to understand the expected asynchronous return value. Add a documentation example showing a fetch, XHR, or API response returned to PHP and checked with assertContains(); the example should avoid errors and empty-array results.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript, php
- 領域
- documentation, testing
- Issue 類型
- 文件
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100