diff --git a/documentation/_print/index.html b/documentation/_print/index.html index 2815fc3af961..eeb4971a702e 100644 --- a/documentation/_print/index.html +++ b/documentation/_print/index.html @@ -5362,26 +5362,12 @@
driver.navigate_to 'https://www.selenium.dev'
base64encodedContent = driver.print_page(orientation: 'landscape')
-
const {Builder} = require('selenium-webdriver');
- const chrome = require('selenium-webdriver/chrome');
- let opts = new chrome.Options();
- let fs = require('fs');
- (async function example() {
- let driver = new Builder()
- .forBrowser('chrome')
- .setChromeOptions(opts.headless())
- .build();
- await driver.get('https://www.selenium.dev');
- try {
- let base64 = await driver.printPage({pageRanges:["1-2"]});
- await fs.writeFileSync('./test.pdf', base64, 'base64');
- } catch (e) {
- console.log(e)
- }
- await driver.quit();
- })();
-
-
driver.get("https://www.selenium.dev")
+
await driver.get('https://www.selenium.dev/selenium/web/alerts.html');
+ let base64 = await driver.printPage({pageRanges: ["1-2"]});
+ // page can be saved as a PDF as below
+ // await fs.writeFileSync('./test.pdf', base64, 'base64');
+
driver.get("https://www.selenium.dev")
val printer = driver as PrintsPage
val printOptions = PrintOptions()
@@ -14003,9 +13989,9 @@
1 commits
driver.navigate_to 'https://www.selenium.dev'
base64encodedContent = driver.print_page(orientation: 'landscape')
-
const {Builder} = require('selenium-webdriver');
- const chrome = require('selenium-webdriver/chrome');
- let opts = new chrome.Options();
- let fs = require('fs');
- (async function example() {
- let driver = new Builder()
- .forBrowser('chrome')
- .setChromeOptions(opts.headless())
- .build();
- await driver.get('https://www.selenium.dev');
- try {
- let base64 = await driver.printPage({pageRanges:["1-2"]});
- await fs.writeFileSync('./test.pdf', base64, 'base64');
- } catch (e) {
- console.log(e)
- }
- await driver.quit();
- })();
-
-
driver.get("https://www.selenium.dev")
+
await driver.get('https://www.selenium.dev/selenium/web/alerts.html');
+ let base64 = await driver.printPage({pageRanges: ["1-2"]});
+ // page can be saved as a PDF as below
+ // await fs.writeFileSync('./test.pdf', base64, 'base64');
+
driver.get("https://www.selenium.dev")
val printer = driver as PrintsPage
val printOptions = PrintOptions()
diff --git a/documentation/webdriver/interactions/_print/index.html b/documentation/webdriver/interactions/_print/index.html
index cc37397226d0..0970db1b4b0f 100644
--- a/documentation/webdriver/interactions/_print/index.html
+++ b/documentation/webdriver/interactions/_print/index.html
@@ -1817,26 +1817,12 @@
driver.navigate_to 'https://www.selenium.dev'
base64encodedContent = driver.print_page(orientation: 'landscape')
-
const {Builder} = require('selenium-webdriver');
- const chrome = require('selenium-webdriver/chrome');
- let opts = new chrome.Options();
- let fs = require('fs');
- (async function example() {
- let driver = new Builder()
- .forBrowser('chrome')
- .setChromeOptions(opts.headless())
- .build();
- await driver.get('https://www.selenium.dev');
- try {
- let base64 = await driver.printPage({pageRanges:["1-2"]});
- await fs.writeFileSync('./test.pdf', base64, 'base64');
- } catch (e) {
- console.log(e)
- }
- await driver.quit();
- })();
-
-
driver.get("https://www.selenium.dev")
+
await driver.get('https://www.selenium.dev/selenium/web/alerts.html');
+ let base64 = await driver.printPage({pageRanges: ["1-2"]});
+ // page can be saved as a PDF as below
+ // await fs.writeFileSync('./test.pdf', base64, 'base64');
+
driver.get("https://www.selenium.dev")
val printer = driver as PrintsPage
val printOptions = PrintOptions()
diff --git a/documentation/webdriver/interactions/windows/index.html b/documentation/webdriver/interactions/windows/index.html
index 03cc54c1dc67..d64babf251ad 100644
--- a/documentation/webdriver/interactions/windows/index.html
+++ b/documentation/webdriver/interactions/windows/index.html
@@ -2,9 +2,9 @@
Move Code
Java Python CSharp Ruby JavaScript Kotlin driver.getWindowHandle(); driver.">
driver.navigate_to 'https://www.selenium.dev'
base64encodedContent = driver.print_page(orientation: 'landscape')
-
const {Builder} = require('selenium-webdriver');
- const chrome = require('selenium-webdriver/chrome');
- let opts = new chrome.Options();
- let fs = require('fs');
- (async function example() {
- let driver = new Builder()
- .forBrowser('chrome')
- .setChromeOptions(opts.headless())
- .build();
- await driver.get('https://www.selenium.dev');
- try {
- let base64 = await driver.printPage({pageRanges:["1-2"]});
- await fs.writeFileSync('./test.pdf', base64, 'base64');
- } catch (e) {
- console.log(e)
- }
- await driver.quit();
- })();
-
-
driver.get("https://www.selenium.dev")
+
await driver.get('https://www.selenium.dev/selenium/web/alerts.html');
+ let base64 = await driver.printPage({pageRanges: ["1-2"]});
+ // page can be saved as a PDF as below
+ // await fs.writeFileSync('./test.pdf', base64, 'base64');
+
driver.get("https://www.selenium.dev")
val printer = driver as PrintsPage
val printOptions = PrintOptions()
@@ -811,7 +797,7 @@
val pdf: Pdf = printer.print(printOptions)
val content = pdf.content
-
Want to support the Selenium project? Learn more or view the full list of sponsors.
Want to support the Selenium project? Learn more or view the full list of sponsors.
driver.navigate_to 'https://www.selenium.dev'
base64encodedContent = driver.print_page(orientation: 'landscape')
-
const {Builder} = require('selenium-webdriver');
- const chrome = require('selenium-webdriver/chrome');
- let opts = new chrome.Options();
- let fs = require('fs');
- (async function example() {
- let driver = new Builder()
- .forBrowser('chrome')
- .setChromeOptions(opts.headless())
- .build();
- await driver.get('https://www.selenium.dev');
- try {
- let base64 = await driver.printPage({pageRanges:["1-2"]});
- await fs.writeFileSync('./test.pdf', base64, 'base64');
- } catch (e) {
- console.log(e)
- }
- await driver.quit();
-
-
driver.get("https://www.selenium.dev")
+
await driver.get('https://www.selenium.dev/selenium/web/alerts.html');
+ let base64 = await driver.printPage({pageRanges: ["1-2"]});
+ // page can be saved as a PDF as below
+ // await fs.writeFileSync('./test.pdf', base64, 'base64');
+
driver.get("https://www.selenium.dev")
val printer = driver as PrintsPage
val printOptions = PrintOptions()
@@ -12739,9 +12726,9 @@
1 commits
driver.navigate_to 'https://www.selenium.dev'
base64encodedContent = driver.print_page(orientation: 'landscape')
-
const {Builder} = require('selenium-webdriver');
- const chrome = require('selenium-webdriver/chrome');
- let opts = new chrome.Options();
- let fs = require('fs');
- (async function example() {
- let driver = new Builder()
- .forBrowser('chrome')
- .setChromeOptions(opts.headless())
- .build();
- await driver.get('https://www.selenium.dev');
- try {
- let base64 = await driver.printPage({pageRanges:["1-2"]});
- await fs.writeFileSync('./test.pdf', base64, 'base64');
- } catch (e) {
- console.log(e)
- }
- await driver.quit();
-
-
driver.get("https://www.selenium.dev")
+
await driver.get('https://www.selenium.dev/selenium/web/alerts.html');
+ let base64 = await driver.printPage({pageRanges: ["1-2"]});
+ // page can be saved as a PDF as below
+ // await fs.writeFileSync('./test.pdf', base64, 'base64');
+
driver.get("https://www.selenium.dev")
val printer = driver as PrintsPage
val printOptions = PrintOptions()
diff --git a/ja/documentation/webdriver/interactions/_print/index.html b/ja/documentation/webdriver/interactions/_print/index.html
index dd0aacb6d623..a00bdb161f08 100644
--- a/ja/documentation/webdriver/interactions/_print/index.html
+++ b/ja/documentation/webdriver/interactions/_print/index.html
@@ -1775,25 +1775,12 @@
driver.navigate_to 'https://www.selenium.dev'
base64encodedContent = driver.print_page(orientation: 'landscape')
-
const {Builder} = require('selenium-webdriver');
- const chrome = require('selenium-webdriver/chrome');
- let opts = new chrome.Options();
- let fs = require('fs');
- (async function example() {
- let driver = new Builder()
- .forBrowser('chrome')
- .setChromeOptions(opts.headless())
- .build();
- await driver.get('https://www.selenium.dev');
- try {
- let base64 = await driver.printPage({pageRanges:["1-2"]});
- await fs.writeFileSync('./test.pdf', base64, 'base64');
- } catch (e) {
- console.log(e)
- }
- await driver.quit();
-
-
driver.get("https://www.selenium.dev")
+
await driver.get('https://www.selenium.dev/selenium/web/alerts.html');
+ let base64 = await driver.printPage({pageRanges: ["1-2"]});
+ // page can be saved as a PDF as below
+ // await fs.writeFileSync('./test.pdf', base64, 'base64');
+
driver.get("https://www.selenium.dev")
val printer = driver as PrintsPage
val printOptions = PrintOptions()
diff --git a/ja/documentation/webdriver/interactions/windows/index.html b/ja/documentation/webdriver/interactions/windows/index.html
index 7b72bd76f4cb..b46a84db9abd 100644
--- a/ja/documentation/webdriver/interactions/windows/index.html
+++ b/ja/documentation/webdriver/interactions/windows/index.html
@@ -4,10 +4,10 @@
Java Python CSharp Ruby JavaScript Kotlin //Store the ID of the original window String originalWindow = driver.getWindowHandle(); //Check we don't have other windows open already assert driver.getWindowHandles().size() == 1; //Click the link which opens in a new window driver.findElement(By.linkText("new window")).click(); //Wait for the new window or tab wait.">
@@ -764,25 +764,12 @@
driver.navigate_to 'https://www.selenium.dev'
base64encodedContent = driver.print_page(orientation: 'landscape')
-
const {Builder} = require('selenium-webdriver');
- const chrome = require('selenium-webdriver/chrome');
- let opts = new chrome.Options();
- let fs = require('fs');
- (async function example() {
- let driver = new Builder()
- .forBrowser('chrome')
- .setChromeOptions(opts.headless())
- .build();
- await driver.get('https://www.selenium.dev');
- try {
- let base64 = await driver.printPage({pageRanges:["1-2"]});
- await fs.writeFileSync('./test.pdf', base64, 'base64');
- } catch (e) {
- console.log(e)
- }
- await driver.quit();
-
-
driver.get("https://www.selenium.dev")
+
await driver.get('https://www.selenium.dev/selenium/web/alerts.html');
+ let base64 = await driver.printPage({pageRanges: ["1-2"]});
+ // page can be saved as a PDF as below
+ // await fs.writeFileSync('./test.pdf', base64, 'base64');
+
driver.get("https://www.selenium.dev")
val printer = driver as PrintsPage
val printOptions = PrintOptions()
@@ -790,7 +777,7 @@
val pdf: Pdf = printer.print(printOptions)
val content = pdf.content
-
Want to support the Selenium project? Learn more or view the full list of sponsors.
Want to support the Selenium project? Learn more or view the full list of sponsors.
driver.navigate_to 'https://www.selenium.dev'
base64encodedContent = driver.print_page(orientation: 'landscape')
-
const {Builder} = require('selenium-webdriver');
- const chrome = require('selenium-webdriver/chrome');
- let opts = new chrome.Options();
- let fs = require('fs');
- (async function example() {
- let driver = new Builder()
- .forBrowser('chrome')
- .setChromeOptions(opts.headless())
- .build();
- await driver.get('https://www.selenium.dev');
- try {
- let base64 = await driver.printPage({pageRanges:["1-2"]});
- await fs.writeFileSync('./test.pdf', base64, 'base64');
- } catch (e) {
- console.log(e)
- }
- await driver.quit();
-
-
driver.get("https://www.selenium.dev")
+
await driver.get('https://www.selenium.dev/selenium/web/alerts.html');
+ let base64 = await driver.printPage({pageRanges: ["1-2"]});
+ // page can be saved as a PDF as below
+ // await fs.writeFileSync('./test.pdf', base64, 'base64');
+
driver.get("https://www.selenium.dev")
val printer = driver as PrintsPage
val printOptions = PrintOptions()
@@ -13576,9 +13563,9 @@
1 commits
driver.navigate_to 'https://www.selenium.dev'
base64encodedContent = driver.print_page(orientation: 'landscape')
-
const {Builder} = require('selenium-webdriver');
- const chrome = require('selenium-webdriver/chrome');
- let opts = new chrome.Options();
- let fs = require('fs');
- (async function example() {
- let driver = new Builder()
- .forBrowser('chrome')
- .setChromeOptions(opts.headless())
- .build();
- await driver.get('https://www.selenium.dev');
- try {
- let base64 = await driver.printPage({pageRanges:["1-2"]});
- await fs.writeFileSync('./test.pdf', base64, 'base64');
- } catch (e) {
- console.log(e)
- }
- await driver.quit();
-
-
driver.get("https://www.selenium.dev")
+
await driver.get('https://www.selenium.dev/selenium/web/alerts.html');
+ let base64 = await driver.printPage({pageRanges: ["1-2"]});
+ // page can be saved as a PDF as below
+ // await fs.writeFileSync('./test.pdf', base64, 'base64');
+
driver.get("https://www.selenium.dev")
val printer = driver as PrintsPage
val printOptions = PrintOptions()
diff --git a/pt-br/documentation/webdriver/interactions/_print/index.html b/pt-br/documentation/webdriver/interactions/_print/index.html
index e35aea26d1f5..7c4d8b0f5946 100644
--- a/pt-br/documentation/webdriver/interactions/_print/index.html
+++ b/pt-br/documentation/webdriver/interactions/_print/index.html
@@ -1820,25 +1820,12 @@
driver.navigate_to 'https://www.selenium.dev'
base64encodedContent = driver.print_page(orientation: 'landscape')
-
const {Builder} = require('selenium-webdriver');
- const chrome = require('selenium-webdriver/chrome');
- let opts = new chrome.Options();
- let fs = require('fs');
- (async function example() {
- let driver = new Builder()
- .forBrowser('chrome')
- .setChromeOptions(opts.headless())
- .build();
- await driver.get('https://www.selenium.dev');
- try {
- let base64 = await driver.printPage({pageRanges:["1-2"]});
- await fs.writeFileSync('./test.pdf', base64, 'base64');
- } catch (e) {
- console.log(e)
- }
- await driver.quit();
-
-
driver.get("https://www.selenium.dev")
+
await driver.get('https://www.selenium.dev/selenium/web/alerts.html');
+ let base64 = await driver.printPage({pageRanges: ["1-2"]});
+ // page can be saved as a PDF as below
+ // await fs.writeFileSync('./test.pdf', base64, 'base64');
+
driver.get("https://www.selenium.dev")
val printer = driver as PrintsPage
val printOptions = PrintOptions()
diff --git a/pt-br/documentation/webdriver/interactions/windows/index.html b/pt-br/documentation/webdriver/interactions/windows/index.html
index 103fe4ed19e4..bcb493bc63c9 100644
--- a/pt-br/documentation/webdriver/interactions/windows/index.html
+++ b/pt-br/documentation/webdriver/interactions/windows/index.html
@@ -1,7 +1,7 @@
Working with windows and tabs | Selenium
Want to support the Selenium project? Learn more or view the full list of sponsors.
Want to support the Selenium project? Learn more or view the full list of sponsors.
// code sample not available please raise a PR
driver.navigate_to 'https://www.selenium.dev'
- base64encodedContent = driver.print_page(orientation: 'landscape')
const {Builder} = require('selenium-webdriver');
-const chrome = require('selenium-webdriver/chrome');
-let opts = new chrome.Options();
-let fs = require('fs');
-(async function example() {
-let driver = new Builder()
-.forBrowser('chrome')
-.setChromeOptions(opts.headless())
-.build();
-await driver.get('https://www.selenium.dev');
-try {
-let base64 = await driver.printPage({pageRanges:["1-2"]});
-await fs.writeFileSync('./test.pdf', base64, 'base64');
-} catch (e) {
-console.log(e)
-}
-await driver.quit();
driver.get("https://www.selenium.dev")
+ base64encodedContent = driver.print_page(orientation: 'landscape')
await driver.get('https://www.selenium.dev/selenium/web/alerts.html');
+ let base64 = await driver.printPage({pageRanges: ["1-2"]});
+ // page can be saved as a PDF as below
+ // await fs.writeFileSync('./test.pdf', base64, 'base64');
+
driver.get("https://www.selenium.dev")
val printer = driver as PrintsPage
val printOptions = PrintOptions()
@@ -13417,9 +13406,9 @@
1 commits
// code sample not available please raise a PR
driver.navigate_to 'https://www.selenium.dev'
- base64encodedContent = driver.print_page(orientation: 'landscape')
const {Builder} = require('selenium-webdriver');
-const chrome = require('selenium-webdriver/chrome');
-let opts = new chrome.Options();
-let fs = require('fs');
-(async function example() {
-let driver = new Builder()
-.forBrowser('chrome')
-.setChromeOptions(opts.headless())
-.build();
-await driver.get('https://www.selenium.dev');
-try {
-let base64 = await driver.printPage({pageRanges:["1-2"]});
-await fs.writeFileSync('./test.pdf', base64, 'base64');
-} catch (e) {
-console.log(e)
-}
-await driver.quit();
driver.get("https://www.selenium.dev")
+ base64encodedContent = driver.print_page(orientation: 'landscape')
await driver.get('https://www.selenium.dev/selenium/web/alerts.html');
+ let base64 = await driver.printPage({pageRanges: ["1-2"]});
+ // page can be saved as a PDF as below
+ // await fs.writeFileSync('./test.pdf', base64, 'base64');
+
driver.get("https://www.selenium.dev")
val printer = driver as PrintsPage
val printOptions = PrintOptions()
diff --git a/zh-cn/documentation/webdriver/interactions/_print/index.html b/zh-cn/documentation/webdriver/interactions/_print/index.html
index 31979ce9e617..5652032fcd46 100644
--- a/zh-cn/documentation/webdriver/interactions/_print/index.html
+++ b/zh-cn/documentation/webdriver/interactions/_print/index.html
@@ -1632,23 +1632,12 @@
base64code = driver.print_page(print_options)
// code sample not available please raise a PR
driver.navigate_to 'https://www.selenium.dev'
- base64encodedContent = driver.print_page(orientation: 'landscape')
const {Builder} = require('selenium-webdriver');
-const chrome = require('selenium-webdriver/chrome');
-let opts = new chrome.Options();
-let fs = require('fs');
-(async function example() {
-let driver = new Builder()
-.forBrowser('chrome')
-.setChromeOptions(opts.headless())
-.build();
-await driver.get('https://www.selenium.dev');
-try {
-let base64 = await driver.printPage({pageRanges:["1-2"]});
-await fs.writeFileSync('./test.pdf', base64, 'base64');
-} catch (e) {
-console.log(e)
-}
-await driver.quit();
driver.get("https://www.selenium.dev")
+ base64encodedContent = driver.print_page(orientation: 'landscape')
await driver.get('https://www.selenium.dev/selenium/web/alerts.html');
+ let base64 = await driver.printPage({pageRanges: ["1-2"]});
+ // page can be saved as a PDF as below
+ // await fs.writeFileSync('./test.pdf', base64, 'base64');
+
driver.get("https://www.selenium.dev")
val printer = driver as PrintsPage
val printOptions = PrintOptions()
diff --git a/zh-cn/documentation/webdriver/interactions/windows/index.html b/zh-cn/documentation/webdriver/interactions/windows/index.html
index 1ba318bae651..cb9ac66f4ea5 100644
--- a/zh-cn/documentation/webdriver/interactions/windows/index.html
+++ b/zh-cn/documentation/webdriver/interactions/windows/index.html
@@ -4,10 +4,10 @@
Java Python CSharp Ruby JavaScript Kotlin // 存储原始窗口的 ID String originalWindow = driver.getWindowHandle(); // 检查一下,我们还没有打开其他的窗口 assert driver.getWindowHandles().size() == 1; // 点击在新窗口中打开的链接 driver.findElement(By.linkText("new window")).click(); // 等待新窗口或标签页 wait.until(numberOfWindowsToBe(2)); // 循环执行,直到找到一个新的窗口句柄 for (String windowHandle : driver.">
@@ -668,30 +668,19 @@
base64code = driver.print_page(print_options)
// code sample not available please raise a PR
driver.navigate_to 'https://www.selenium.dev'
- base64encodedContent = driver.print_page(orientation: 'landscape')
const {Builder} = require('selenium-webdriver');
-const chrome = require('selenium-webdriver/chrome');
-let opts = new chrome.Options();
-let fs = require('fs');
-(async function example() {
-let driver = new Builder()
-.forBrowser('chrome')
-.setChromeOptions(opts.headless())
-.build();
-await driver.get('https://www.selenium.dev');
-try {
-let base64 = await driver.printPage({pageRanges:["1-2"]});
-await fs.writeFileSync('./test.pdf', base64, 'base64');
-} catch (e) {
-console.log(e)
-}
-await driver.quit();
driver.get("https://www.selenium.dev")
+ base64encodedContent = driver.print_page(orientation: 'landscape')
await driver.get('https://www.selenium.dev/selenium/web/alerts.html');
+ let base64 = await driver.printPage({pageRanges: ["1-2"]});
+ // page can be saved as a PDF as below
+ // await fs.writeFileSync('./test.pdf', base64, 'base64');
+
driver.get("https://www.selenium.dev")
val printer = driver as PrintsPage
val printOptions = PrintOptions()
printOptions.setPageRanges("1-2")
val pdf: Pdf = printer.print(printOptions)
-val content = pdf.content
Want to support the Selenium project? Learn more or view the full list of sponsors.
Want to support the Selenium project? Learn more or view the full list of sponsors.