diff --git a/docs/commands/browser/url.mdx b/docs/commands/browser/url.mdx index 25bd9642..09700335 100644 --- a/docs/commands/browser/url.mdx +++ b/docs/commands/browser/url.mdx @@ -41,7 +41,7 @@ console.log(await browser.getUrl()); // outputs: "https://webdriver.io" **baseUrlResolutions.js** ```javascript -// Let baseUrl = http://example.com/site +// Let baseUrl = http://example.com/site/ important to add a slash in the end // Specifying a full URL results in https://webdriver.io await browser.url("https://webdriver.io"); diff --git a/docs/reference/config/browsers.mdx b/docs/reference/config/browsers.mdx index 69b569a6..c83a0c10 100644 --- a/docs/reference/config/browsers.mdx +++ b/docs/reference/config/browsers.mdx @@ -151,6 +151,7 @@ Base URL of the service being tested. Allows for more convenient use of the `bro - if the target address starts with `/`, `baseUrl` without the path part will be added at the beginning. - if the target address does not start with `/`, the entire `baseUrl` will be added at the beginning. +- it is important whether `/` exists (or not). [See more][url-resolve]. Default: `http://localhost`. @@ -1195,3 +1196,4 @@ export = { [saveState]: ../../../commands/browser/saveState [restoreState]: ../../../commands/browser/restoreState [getState]: ../../../commands/browser/getState +[url-resolve]: https://nodejs.org/api/url.html#urlresolvefrom-to diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/commands/browser/url.mdx b/i18n/ru/docusaurus-plugin-content-docs/current/commands/browser/url.mdx index 27a77b4a..3c1fab4a 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current/commands/browser/url.mdx +++ b/i18n/ru/docusaurus-plugin-content-docs/current/commands/browser/url.mdx @@ -41,7 +41,7 @@ console.log(await browser.getUrl()); // выведет: "https://webdriver.io" **baseUrlResolutions.js** ```javascript -// Пусть baseUrl = http://example.com/site +// Пусть baseUrl = http://example.com/site/ важно указывать слэш в конце // При указании полного URL-адреса итоговый URL будет https://webdriver.io await browser.url("https://webdriver.io"); diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/reference/config/browsers.mdx b/i18n/ru/docusaurus-plugin-content-docs/current/reference/config/browsers.mdx index c3664cac..82e68e2f 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current/reference/config/browsers.mdx +++ b/i18n/ru/docusaurus-plugin-content-docs/current/reference/config/browsers.mdx @@ -149,6 +149,7 @@ URL грида (адрес, на котором слушает ChromeDriver/Sele - если целевой адрес начинается с `/`, в начало будет добавлен `baseUrl` без path-части. - если целевой адрес не начинается с `/`, в начало будет добавлен весь `baseUrl`. +- важно наличие или отсутствие `/` в конце. [Подробнее][url-resolve]. По умолчанию: `http://localhost`.