From 21eabd6fb7563301f5626450e52eb6f9f774638d Mon Sep 17 00:00:00 2001 From: Selenium CI Bot Date: Wed, 19 Jun 2024 07:32:18 +0000 Subject: [PATCH] Migrate and update ruby code examples with internet explorer (#1748)[deploy site] * Migrate code to examples * Finish code migration * Refactor code migration * Update examples * Update silent options * Update silent options --------- Co-authored-by: aguspe Co-authored-by: Sri Harsha <12621691+harsha509@users.noreply.github.com> 69a918395d2060004bbdec455f8efc89cc44ae2b --- documentation/_print/index.html | 88 ++++++------------ documentation/about/_print/index.html | 2 +- documentation/about/copyright/index.html | 2 +- documentation/webdriver/_print/index.html | 86 ++++++------------ .../webdriver/browsers/_print/index.html | 86 ++++++------------ .../browsers/internet_explorer/index.html | 90 +++++++------------ en/sitemap.xml | 2 +- ja/documentation/_print/index.html | 88 ++++++------------ ja/documentation/about/_print/index.html | 2 +- ja/documentation/about/copyright/index.html | 2 +- ja/documentation/webdriver/_print/index.html | 86 ++++++------------ .../webdriver/browsers/_print/index.html | 86 ++++++------------ .../browsers/internet_explorer/index.html | 90 +++++++------------ ja/index.xml | 2 +- ja/sitemap.xml | 2 +- pt-br/documentation/_print/index.html | 82 ++++++----------- pt-br/documentation/about/_print/index.html | 2 +- .../documentation/about/copyright/index.html | 2 +- .../documentation/webdriver/_print/index.html | 80 ++++++----------- .../webdriver/browsers/_print/index.html | 80 ++++++----------- .../browsers/internet_explorer/index.html | 84 +++++++---------- pt-br/sitemap.xml | 2 +- sitemap.xml | 2 +- zh-cn/documentation/_print/index.html | 88 ++++++------------ zh-cn/documentation/about/_print/index.html | 2 +- .../documentation/about/copyright/index.html | 2 +- .../documentation/webdriver/_print/index.html | 86 ++++++------------ .../webdriver/browsers/_print/index.html | 86 ++++++------------ .../browsers/internet_explorer/index.html | 90 +++++++------------ zh-cn/index.xml | 2 +- zh-cn/sitemap.xml | 2 +- 31 files changed, 475 insertions(+), 931 deletions(-) diff --git a/documentation/_print/index.html b/documentation/_print/index.html index d473aa76a835..56425467e3fe 100644 --- a/documentation/_print/index.html +++ b/documentation/_print/index.html @@ -1855,10 +1855,10 @@ options.AttachToEdgeChrome = true; options.EdgeExecutablePath = GetEdgeLocation(); _driver = new InternetExplorerDriver(options);
      options = Selenium::WebDriver::Options.ie
+View full example on GitHub
      options = Selenium::WebDriver::IE::Options.new
       options.attach_to_edge_chrome = true
       options.edge_executable_path = edge_location
-      @driver = Selenium::WebDriver.for :ie, options: options

As of Internet Explorer Driver v4.5.0:

So, if IE is not on the system, you only need:

Move Code

Selenium v4.10

                .withLogFile(getLogLocation())

Note: Java also allows setting file output by System Property:
Property key: InternetExplorerDriverService.IE_DRIVER_LOGFILE_PROPERTY
Property value: String representing path to log file

    service = webdriver.IeService(log_output=log_path, log_level='INFO')

Console output

To change the logging output to display in the console as STDOUT:

Selenium v4.10

                .withLogOutput(System.out)

Note: Java also allows setting console output by System Property;
Property key: InternetExplorerDriverService.IE_DRIVER_LOGFILE_PROPERTY
Property value: DriverService.LOG_STDOUT or DriverService.LOG_STDERR

Selenium v4.11

    service = webdriver.IeService(log_output=subprocess.STDOUT)

Log Level

There are 6 available log levels: FATAL, ERROR, WARN, INFO, DEBUG, and TRACE If logging output is specified, the default level is FATAL

                .withLogLevel(InternetExplorerDriverLogLevel.WARN)

Note: Java also allows setting log level by System Property:
Property key: InternetExplorerDriverService.IE_DRIVER_LOGLEVEL_PROPERTY
Property value: String representation of InternetExplorerDriverLogLevel.DEBUG.toString() enum

    service = webdriver.IeService(log_output=log_path, log_level='WARN')

Selenium v4.10

      service.args << '-log-level=WARN'

Supporting Files Path

Selenium v4.10

                .withLogFile(getLogLocation())

Note: Java also allows setting file output by System Property:
Property key: InternetExplorerDriverService.IE_DRIVER_LOGFILE_PROPERTY
Property value: String representing path to log file

    service = webdriver.IeService(log_output=log_path, log_level='INFO')

Console output

To change the logging output to display in the console as STDOUT:

Selenium v4.10

                .withLogOutput(System.out)

Note: Java also allows setting console output by System Property;
Property key: InternetExplorerDriverService.IE_DRIVER_LOGFILE_PROPERTY
Property value: DriverService.LOG_STDOUT or DriverService.LOG_STDERR

Selenium v4.11

    service = webdriver.IeService(log_output=subprocess.STDOUT)

Log Level

There are 6 available log levels: FATAL, ERROR, WARN, INFO, DEBUG, and TRACE If logging output is specified, the default level is FATAL

                .withLogLevel(InternetExplorerDriverLogLevel.WARN)

Note: Java also allows setting log level by System Property:
Property key: InternetExplorerDriverService.IE_DRIVER_LOGLEVEL_PROPERTY
Property value: String representation of InternetExplorerDriverLogLevel.DEBUG.toString() enum

    service = webdriver.IeService(log_output=log_path, log_level='WARN')

Selenium v4.10

      service.args << '-log-level=WARN'

Supporting Files Path

Selenium v4.10

                .withLogFile(getLogLocation())

Note: Java also allows setting file output by System Property:
Property key: InternetExplorerDriverService.IE_DRIVER_LOGFILE_PROPERTY
Property value: String representing path to log file

    service = webdriver.IeService(log_output=log_path, log_level='INFO')

Console output

To change the logging output to display in the console as STDOUT:

Selenium v4.10

                .withLogOutput(System.out)

Note: Java also allows setting console output by System Property;
Property key: InternetExplorerDriverService.IE_DRIVER_LOGFILE_PROPERTY
Property value: DriverService.LOG_STDOUT or DriverService.LOG_STDERR

Selenium v4.11

    service = webdriver.IeService(log_output=subprocess.STDOUT)

Log Level

There are 6 available log levels: FATAL, ERROR, WARN, INFO, DEBUG, and TRACE If logging output is specified, the default level is FATAL

                .withLogLevel(InternetExplorerDriverLogLevel.WARN)

Note: Java also allows setting log level by System Property:
Property key: InternetExplorerDriverService.IE_DRIVER_LOGLEVEL_PROPERTY
Property value: String representation of InternetExplorerDriverLogLevel.DEBUG.toString() enum

    service = webdriver.IeService(log_output=log_path, log_level='WARN')

Selenium v4.10

      service.args << '-log-level=WARN'

Supporting Files Path