diff --git a/WORKSPACE b/WORKSPACE index 2b98d8bf9a7aa..e1304a18dc8ea 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -92,10 +92,10 @@ closure_repositories() http_archive( name = "d2l_rules_csharp", - sha256 = "efba481723aa48c14751293e28ed00a5bd9fd343eb65c5fb5883e056bf15ba3f", - strip_prefix = "rules_csharp-f5fbbd545b1f18efad5e4ce3d06bfabe6b48eeb4", + sha256 = "4e8e9a93a5436d81c0a410148bef9e3e44860cd7dc567dd4732ab5b269a5e1f8", + strip_prefix = "rules_csharp-8c9e87762f619c7b4ea60d03b76afadecbce4ea6", urls = [ - "https://github.com/Brightspace/rules_csharp/archive/f5fbbd545b1f18efad5e4ce3d06bfabe6b48eeb4.tar.gz", + "https://github.com/Brightspace/rules_csharp/archive/8c9e87762f619c7b4ea60d03b76afadecbce4ea6.tar.gz", ], ) diff --git a/common/devtools/chromium/v84/BUILD.bazel b/common/devtools/chromium/v84/BUILD.bazel index c9257204347cb..848cb9751c22f 100644 --- a/common/devtools/chromium/v84/BUILD.bazel +++ b/common/devtools/chromium/v84/BUILD.bazel @@ -3,6 +3,7 @@ package( "//java/client/src/org/openqa/selenium/devtools:__subpackages__", "//javascript/node/selenium-webdriver:__pkg__", "//py:__pkg__", + "//dotnet/src/webdriver:__subpackages__", ], ) diff --git a/common/devtools/chromium/v85/BUILD.bazel b/common/devtools/chromium/v85/BUILD.bazel index c9257204347cb..848cb9751c22f 100644 --- a/common/devtools/chromium/v85/BUILD.bazel +++ b/common/devtools/chromium/v85/BUILD.bazel @@ -3,6 +3,7 @@ package( "//java/client/src/org/openqa/selenium/devtools:__subpackages__", "//javascript/node/selenium-webdriver:__pkg__", "//py:__pkg__", + "//dotnet/src/webdriver:__subpackages__", ], ) diff --git a/common/devtools/chromium/v86/BUILD.bazel b/common/devtools/chromium/v86/BUILD.bazel index c9257204347cb..848cb9751c22f 100644 --- a/common/devtools/chromium/v86/BUILD.bazel +++ b/common/devtools/chromium/v86/BUILD.bazel @@ -3,6 +3,7 @@ package( "//java/client/src/org/openqa/selenium/devtools:__subpackages__", "//javascript/node/selenium-webdriver:__pkg__", "//py:__pkg__", + "//dotnet/src/webdriver:__subpackages__", ], ) diff --git a/dotnet/executable-assembly.bzl b/dotnet/executable-assembly.bzl new file mode 100644 index 0000000000000..fc16fe8750f5c --- /dev/null +++ b/dotnet/executable-assembly.bzl @@ -0,0 +1,235 @@ +load("@d2l_rules_csharp//csharp/private:providers.bzl", "AnyTargetFrameworkInfo") +load("@d2l_rules_csharp//csharp/private:actions/assembly.bzl", "AssemblyAction") +load("@d2l_rules_csharp//csharp/private:actions/write_runtimeconfig.bzl", "write_runtimeconfig") +load( + "@d2l_rules_csharp//csharp/private:common.bzl", + "fill_in_missing_frameworks", + "is_core_framework", + "is_debug", + "is_standard_framework", +) + +def _generate_execution_script_file(ctx, target): + tfm = target.actual_tfm + assembly_file_name = target.out.basename + shell_file_extension = "sh" + execution_line = "$( cd \"$(dirname \"$BASH_SOURCE[0]}\")\" >/dev/null 2>&1 && pwd -P )/" + assembly_file_name + " $@" + if ctx.attr.is_windows: + shell_file_extension = "bat" + execution_line = "%~dp0" + assembly_file_name + " %*" + if is_core_framework(tfm): + execution_line = "dotnet " + execution_line + else: + execution_line = "mono " + execution_line + + toolchain = ctx.toolchains["@d2l_rules_csharp//csharp/private:toolchain_type"] + dotnet_sdk_location = toolchain.runtime.executable.dirname + environment = "" + if not ctx.attr.is_windows: + environment += "export DOTNET_CLI_HOME=%s\n" % dotnet_sdk_location + environment += "export APPDATA=%s\n" % dotnet_sdk_location + environment += "export PROGRAMFILES=%s\n" % dotnet_sdk_location + environment += "export USERPROFILE=%s\n" % dotnet_sdk_location + environment += "export DOTNET_CLI_TELEMETRY_OPTOUT=1\n" + #else: + # environment += "@echo off\n" + + shell_content = environment + execution_line + + shell_file_name = "bazelout/%s/%s.%s" % (tfm, assembly_file_name, shell_file_extension) + shell_file = ctx.actions.declare_file(shell_file_name) + ctx.actions.write( + output = shell_file, + content = shell_content, + is_executable = True, + ) + + return shell_file + +def _copy_cmd(ctx, file_list, target_dir): + dest_list = [] + + if file_list == None or len(file_list) == 0: + return dest_list + + shell_content = "" + batch_file_name = "%s/%s-copydeps.bat" % (target_dir, ctx.attr.out) + bat = ctx.actions.declare_file(batch_file_name) + for src_file in file_list: + dest_file = ctx.actions.declare_file(target_dir + src_file.basename) + dest_list.append(dest_file) + shell_content += "@copy /Y \"%s\" \"%s\" >NUL\n" % ( + src_file.path.replace("/", "\\"), + dest_file.path.replace("/", "\\"), + ) + + ctx.actions.write( + output = bat, + content = shell_content, + is_executable = True, + ) + ctx.actions.run( + inputs = file_list, + tools = [bat], + outputs = dest_list, + executable = "cmd.exe", + arguments = ["/C", bat.path.replace("/", "\\")], + mnemonic = "CopyFile", + progress_message = "Copying files", + use_default_shell_env = True, + ) + + return dest_list + +def _copy_bash(ctx, src_list, target_dir): + dest_list = [] + for src_file in src_list: + dest_file = ctx.actions.declare_file(target_dir + src_file.basename) + dest_list.append(dest_file) + + ctx.actions.run_shell( + tools = [src_file], + outputs = [dest_file], + command = "cp -f \"$1\" \"$2\"", + arguments = [src_file.path, dest_file.path], + mnemonic = "CopyFile", + progress_message = "Copying files", + use_default_shell_env = True, + ) + + return dest_list + +def _copy_dependency_files(ctx, provider_value): + src_list = provider_value.transitive_runfiles.to_list() + target_dir = "bazelout/%s/" % (provider_value.actual_tfm) + dest_list = [] + if ctx.attr.is_windows: + dest_list = _copy_cmd(ctx, src_list, target_dir) + else: + dest_list = _copy_bash(ctx, src_list, target_dir) + + return dest_list + +def create_executable_assembly(ctx, extra_srcs, extra_deps): + stdrefs = [ctx.attr._stdrefs] if ctx.attr.include_stdrefs else [] + + providers = {} + for tfm in ctx.attr.target_frameworks: + if is_standard_framework(tfm): + fail("It doesn't make sense to build an executable for " + tfm) + + providers[tfm] = AssemblyAction( + ctx.actions, + name = ctx.attr.name, + additionalfiles = ctx.files.additionalfiles, + analyzers = ctx.attr.analyzers, + debug = is_debug(ctx), + defines = ctx.attr.defines, + deps = ctx.attr.deps + extra_deps + stdrefs, + keyfile = ctx.file.keyfile, + langversion = ctx.attr.langversion, + resources = ctx.files.resources, + srcs = ctx.files.srcs + extra_srcs, + out = ctx.attr.out, + target = "exe", + target_framework = tfm, + toolchain = ctx.toolchains["@d2l_rules_csharp//csharp/private:toolchain_type"], + ) + + fill_in_missing_frameworks(providers) + + result = providers.values() + dependency_files_list = _copy_dependency_files(ctx, result[0]) + + runtimeconfig = write_runtimeconfig(ctx.actions, ctx.file.runtimeconfig_template, result[0].out.basename.replace("." + result[0].out.extension, ""), result[0].actual_tfm) + + data_runfiles = [] if ctx.attr.data == None else [d.files for d in ctx.attr.data] + + shell_file = _generate_execution_script_file(ctx, result[0]) + + direct_runfiles = [result[0].out, result[0].pdb] + if runtimeconfig != None: + direct_runfiles += [runtimeconfig] + + result.append(DefaultInfo( + executable = shell_file, + runfiles = ctx.runfiles( + files = direct_runfiles, + transitive_files = depset(dependency_files_list, transitive = data_runfiles), + ), + files = depset([result[0].out, result[0].refout, result[0].pdb, shell_file]), + )) + + return result + +def _csharp_executable_impl(ctx): + extra_srcs = [] + extra_deps = [] + return create_executable_assembly(ctx, extra_srcs, extra_deps) + +csharp_executable = rule( + _csharp_executable_impl, + doc = "Create an executable C# exe", + attrs = { + "srcs": attr.label_list( + doc = "C# source files.", + allow_files = [".cs"], + ), + "additionalfiles": attr.label_list( + doc = "Extra files to configure analyzers.", + allow_files = True, + ), + "analyzers": attr.label_list( + doc = "A list of analyzer references.", + providers = AnyTargetFrameworkInfo, + ), + "keyfile": attr.label( + doc = "The key file used to sign the assembly with a strong name.", + allow_single_file = True, + ), + "langversion": attr.string( + doc = "The version string for the C# language.", + ), + "resources": attr.label_list( + doc = "A list of files to embed in the DLL as resources.", + allow_files = True, + ), + "out": attr.string( + doc = "File name, without extension, of the built assembly.", + ), + "target_frameworks": attr.string_list( + doc = "A list of target framework monikers to build" + + "See https://docs.microsoft.com/en-us/dotnet/standard/frameworks", + allow_empty = False, + ), + "defines": attr.string_list( + doc = "A list of preprocessor directive symbols to define.", + default = [], + allow_empty = True, + ), + "include_stdrefs": attr.bool( + doc = "Whether to reference @net//:StandardReferences (the default set of references that MSBuild adds to every project).", + default = True, + ), + "runtimeconfig_template": attr.label( + doc = "A template file to use for generating runtimeconfig.json", + default = "@d2l_rules_csharp//csharp/private:runtimeconfig.json.tpl", + allow_single_file = True, + ), + "_stdrefs": attr.label( + doc = "The standard set of assemblies to reference.", + default = "@net//:StandardReferences", + ), + "deps": attr.label_list( + doc = "Other C# libraries, binaries, or imported DLLs", + providers = AnyTargetFrameworkInfo, + ), + "data": attr.label_list( + doc = "Additional data files or targets that are required to run the executable.", + allow_files = True, + ), + "is_windows": attr.bool(default = False), + }, + executable = True, + toolchains = ["@d2l_rules_csharp//csharp/private:toolchain_type"], +) diff --git a/dotnet/generate-devtools.bzl b/dotnet/generate-devtools.bzl new file mode 100644 index 0000000000000..46565a086053d --- /dev/null +++ b/dotnet/generate-devtools.bzl @@ -0,0 +1,55 @@ +def _generate_devtools_impl(ctx): + outdir = ctx.actions.declare_directory("generated/{}".format(ctx.attr.out)) + + args = ctx.actions.args() + args.add_all("-s", [ctx.attr.src.files.to_list()[0]]) + args.add_all("-b", [ctx.attr.browser_protocol.files.to_list()[0]]) + args.add_all("-j", [ctx.attr.js_protocol.files.to_list()[0]]) + args.add_all("-t", [ctx.attr.template.files.to_list()[0]]) + args.add_all("-o", [outdir.path]) + + ctx.actions.run( + executable = ctx.executable.generator, + arguments = [args], + outputs = [ + outdir, + ], + inputs = [ + ctx.file.src, + ctx.file.browser_protocol, + ctx.file.js_protocol, + ctx.file.template, + ], + use_default_shell_env = True, + ) + + return DefaultInfo(files = depset([ + outdir, + ])) + +generate_devtools = rule( + implementation = _generate_devtools_impl, + attrs = { + "src": attr.label( + allow_single_file = True, + ), + "browser_protocol": attr.label( + allow_single_file = True, + ), + "js_protocol": attr.label( + allow_single_file = True, + ), + "template": attr.label( + allow_single_file = True, + ), + "out": attr.string( + doc = "File name, without extension, of the built assembly.", + ), + "generator": attr.label( + default = Label("//third_party/dotnet/devtools/src/generator:generator"), + executable = True, + cfg = "exec", + ), + "deps": attr.label_list(), + }, +) diff --git a/dotnet/nunit-test.bzl b/dotnet/nunit-test.bzl index 04130dfb88ca2..ba086fa5dd4ae 100644 --- a/dotnet/nunit-test.bzl +++ b/dotnet/nunit-test.bzl @@ -3,172 +3,16 @@ Rules for compiling NUnit tests. """ load("@d2l_rules_csharp//csharp/private:providers.bzl", "AnyTargetFrameworkInfo") -load("@d2l_rules_csharp//csharp/private:actions/assembly.bzl", "AssemblyAction") -load("@d2l_rules_csharp//csharp/private:actions/write_runtimeconfig.bzl", "write_runtimeconfig") -load( - "@d2l_rules_csharp//csharp/private:common.bzl", - "fill_in_missing_frameworks", - "is_core_framework", - "is_debug", - "is_standard_framework", -) - -def _generate_execution_script_file(ctx, target): - tfm = target.actual_tfm - test_file_name = target.out.basename - shell_file_extension = "sh" - execution_line = "$( cd \"$(dirname \"$BASH_SOURCE[0]}\")\" >/dev/null 2>&1 && pwd -P )/" + test_file_name + " $@" - if ctx.attr.is_windows: - shell_file_extension = "bat" - execution_line = "%~dp0" + test_file_name + " %*" - elif is_core_framework(tfm): - execution_line = "dotnet " + execution_line - else: - execution_line = "mono " + execution_line - - toolchain = ctx.toolchains["@d2l_rules_csharp//csharp/private:toolchain_type"] - dotnet_sdk_location = toolchain.runtime.executable.dirname - environment = "" - if not ctx.attr.is_windows: - environment += "export DOTNET_CLI_HOME=%s\n" % dotnet_sdk_location - environment += "export APPDATA=%s\n" % dotnet_sdk_location - environment += "export PROGRAMFILES=%s\n" % dotnet_sdk_location - environment += "export USERPROFILE=%s\n" % dotnet_sdk_location - environment += "export DOTNET_CLI_TELEMETRY_OPTOUT=1\n" - - shell_content = environment + execution_line - - shell_file_name = "bazelout/%s/%s.%s" % (tfm, test_file_name, shell_file_extension) - shell_file = ctx.actions.declare_file(shell_file_name) - ctx.actions.write( - output = shell_file, - content = shell_content, - is_executable = True, - ) - - return shell_file - -def _copy_cmd(ctx, file_list, target_dir): - dest_list = [] - - if file_list == None or len(file_list) == 0: - return dest_list - - shell_content = "" - batch_file_name = "%s/%s-copydeps.bat" % (target_dir, ctx.attr.out) - bat = ctx.actions.declare_file(batch_file_name) - for src_file in file_list: - dest_file = ctx.actions.declare_file(target_dir + src_file.basename) - dest_list.append(dest_file) - shell_content += "@copy /Y \"%s\" \"%s\" >NUL\n" % ( - src_file.path.replace("/", "\\"), - dest_file.path.replace("/", "\\"), - ) - - ctx.actions.write( - output = bat, - content = shell_content, - is_executable = True, - ) - ctx.actions.run( - inputs = file_list, - tools = [bat], - outputs = dest_list, - executable = "cmd.exe", - arguments = ["/C", bat.path.replace("/", "\\")], - mnemonic = "CopyFile", - progress_message = "Copying files", - use_default_shell_env = True, - ) - - return dest_list - -def _copy_bash(ctx, src_list, target_dir): - dest_list = [] - for src_file in src_list: - dest_file = ctx.actions.declare_file(target_dir + src_file.basename) - dest_list.append(dest_file) - - ctx.actions.run_shell( - tools = [src_file], - outputs = [dest_file], - command = "cp -f \"$1\" \"$2\"", - arguments = [src_file.path, dest_file.path], - mnemonic = "CopyFile", - progress_message = "Copying files", - use_default_shell_env = True, - ) - - return dest_list - -def _copy_dependency_files(ctx, provider_value): - src_list = provider_value.transitive_runfiles.to_list() - target_dir = "bazelout/%s/" % (provider_value.actual_tfm) - dest_list = [] - if ctx.attr.is_windows: - dest_list = _copy_cmd(ctx, src_list, target_dir) - else: - dest_list = _copy_bash(ctx, src_list, target_dir) - - return dest_list +load("//dotnet:executable-assembly.bzl", "create_executable_assembly") def _nunit_test_impl(ctx): - providers = {} - + extra_srcs = [ctx.file._nunit_shim] extra_deps = [ctx.attr._nunitlite, ctx.attr._nunitframework] - stdrefs = [ctx.attr._stdrefs] if ctx.attr.include_stdrefs else [] - - for tfm in ctx.attr.target_frameworks: - if is_standard_framework(tfm): - fail("It doesn't make sense to build an executable for " + tfm) - - providers[tfm] = AssemblyAction( - ctx.actions, - name = ctx.attr.name, - additionalfiles = ctx.files.additionalfiles, - analyzers = ctx.attr.analyzers, - debug = is_debug(ctx), - defines = ctx.attr.defines, - deps = ctx.attr.deps + extra_deps + stdrefs, - keyfile = ctx.file.keyfile, - langversion = ctx.attr.langversion, - resources = ctx.files.resources, - srcs = ctx.files.srcs + [ctx.file._nunit_shim], - out = ctx.attr.out, - target = "exe", - target_framework = tfm, - toolchain = ctx.toolchains["@d2l_rules_csharp//csharp/private:toolchain_type"], - ) - - fill_in_missing_frameworks(providers) - - result = providers.values() - dependency_files_list = _copy_dependency_files(ctx, result[0]) - - runtimeconfig = write_runtimeconfig(ctx.actions, ctx.file.runtimeconfig_template, result[0].out.basename.replace("." + result[0].out.extension, ""), result[0].actual_tfm) - - data_runfiles = [] if ctx.attr.data == None else [d.files for d in ctx.attr.data] - - shell_file = _generate_execution_script_file(ctx, result[0]) - - direct_runfiles = [result[0].out, result[0].pdb] - if runtimeconfig != None: - direct_runfiles += [runtimeconfig] - - result.append(DefaultInfo( - executable = shell_file, - runfiles = ctx.runfiles( - files = direct_runfiles, - transitive_files = depset(dependency_files_list, transitive = data_runfiles), - ), - files = depset([result[0].out, result[0].refout, result[0].pdb, shell_file]), - )) - - return result + return create_executable_assembly(ctx, extra_srcs, extra_deps) nunit_test = rule( _nunit_test_impl, - doc = "Compile a C# exe", + doc = "Run NUnit tests", attrs = { "srcs": attr.label_list( doc = "C# source files.", diff --git a/dotnet/src/webdriver/BUILD.bazel b/dotnet/src/webdriver/BUILD.bazel index 7e3e13b11e48e..692b91d7855fb 100644 --- a/dotnet/src/webdriver/BUILD.bazel +++ b/dotnet/src/webdriver/BUILD.bazel @@ -43,7 +43,12 @@ generated_assembly_info( "Remote/**/*.cs", "Safari/*.cs", "Support/*.cs", - ]) + [":assembly-info"], + ]) + [ + ":assembly-info", + "//dotnet/src/webdriver/DevTools:generate-v84", + "//dotnet/src/webdriver/DevTools:generate-v85", + "//dotnet/src/webdriver/DevTools:generate-v86", + ], out = "WebDriver", resources = [ "//javascript/atoms/fragments:find-elements.js", @@ -86,7 +91,12 @@ generated_assembly_info( "Remote/**/*.cs", "Safari/*.cs", "Support/*.cs", - ]) + [":assembly-info"], + ]) + [ + ":assembly-info", + "//dotnet/src/webdriver/DevTools:generate-v84", + "//dotnet/src/webdriver/DevTools:generate-v85", + "//dotnet/src/webdriver/DevTools:generate-v86", + ], out = "WebDriver", resources = [ "//javascript/atoms/fragments:find-elements.js", @@ -119,7 +129,12 @@ generated_assembly_info( "Remote/**/*.cs", "Safari/*.cs", "Support/*.cs", - ]) + [":assembly-info"], + ]) + [ + ":assembly-info", + "//dotnet/src/webdriver/DevTools:generate-v84", + "//dotnet/src/webdriver/DevTools:generate-v85", + "//dotnet/src/webdriver/DevTools:generate-v86", + ], out = "strongnamed/WebDriver", keyfile = "//dotnet:WebDriver.snk", resources = [ @@ -162,7 +177,12 @@ generated_assembly_info( "Remote/**/*.cs", "Safari/*.cs", "Support/*.cs", - ]) + [":assembly-info"], + ]) + [ + ":assembly-info", + "//dotnet/src/webdriver/DevTools:generate-v84", + "//dotnet/src/webdriver/DevTools:generate-v85", + "//dotnet/src/webdriver/DevTools:generate-v86", + ], out = "strongnamed/WebDriver", keyfile = "//dotnet:WebDriver.snk", resources = [ diff --git a/dotnet/src/webdriver/Chromium/ChromiumDriver.cs b/dotnet/src/webdriver/Chromium/ChromiumDriver.cs index b74651047c4dc..570df54f57ee8 100644 --- a/dotnet/src/webdriver/Chromium/ChromiumDriver.cs +++ b/dotnet/src/webdriver/Chromium/ChromiumDriver.cs @@ -168,7 +168,7 @@ public object ExecuteChromeCommandWithResult(string commandName, Dictionary /// The active session to use to communicate with the Chromium Developer Tools debugging protocol. - public DevToolsSession CreateDevToolsSession() + public IDevToolsSession CreateDevToolsSession() { if (!this.Capabilities.HasCapability(this.optionsCapabilityName)) { @@ -189,31 +189,8 @@ public DevToolsSession CreateDevToolsSession() string debuggerAddress = options["debuggerAddress"].ToString(); try { - string debuggerUrl = string.Format(CultureInfo.InvariantCulture, "http://{0}/", debuggerAddress); - string rawDebuggerInfo = string.Empty; - using (HttpClient client = new HttpClient()) - { - client.BaseAddress = new Uri(debuggerUrl); - rawDebuggerInfo = client.GetStringAsync("/json").ConfigureAwait(false).GetAwaiter().GetResult(); - } - - string webSocketUrl = null; - string targetId = null; - var sessions = JsonConvert.DeserializeObject>(rawDebuggerInfo); - foreach (var target in sessions) - { - if (target.Type == "page") - { - targetId = target.Id; - webSocketUrl = target.WebSocketDebuggerUrl; - break; - } - } - - DevToolsSession session = new DevToolsSession(webSocketUrl); - var foo = session.Target.AttachToTarget(new DevTools.Target.AttachToTargetCommandSettings() { TargetId = targetId }).ConfigureAwait(false).GetAwaiter().GetResult(); - var t1 = session.Target.SetAutoAttach(new DevTools.Target.SetAutoAttachCommandSettings() { AutoAttach = true, WaitForDebuggerOnStart = false }).ConfigureAwait(false).GetAwaiter().GetResult(); - var t2 = session.Log.Clear().ConfigureAwait(false).GetAwaiter().GetResult(); + DevToolsSession session = new DevToolsSession(debuggerAddress); + session.Start().ConfigureAwait(false).GetAwaiter().GetResult(); return session; } catch (Exception e) diff --git a/dotnet/src/webdriver/DevTools/AuthRequiredEventArgs.cs b/dotnet/src/webdriver/DevTools/AuthRequiredEventArgs.cs new file mode 100644 index 0000000000000..69b02ee349255 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/AuthRequiredEventArgs.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenQA.Selenium.DevTools +{ + public class AuthRequiredEventArgs : EventArgs + { + public string Uri { get; internal set; } + public string RequestId { get; internal set; } + } +} diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/Bounds.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/Bounds.cs deleted file mode 100644 index fefe0df2374cc..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/Bounds.cs +++ /dev/null @@ -1,56 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - - /// - /// Browser window bounds information - /// - public sealed class Bounds - { - /// - /// The offset from the left edge of the screen to the window in pixels. - /// - [JsonProperty("left", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Left - { - get; - set; - } - /// - /// The offset from the top edge of the screen to the window in pixels. - /// - [JsonProperty("top", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Top - { - get; - set; - } - /// - /// The window width in pixels. - /// - [JsonProperty("width", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Width - { - get; - set; - } - /// - /// The window height in pixels. - /// - [JsonProperty("height", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Height - { - get; - set; - } - /// - /// The window state. Default to normal. - /// - [JsonProperty("windowState", DefaultValueHandling = DefaultValueHandling.Ignore)] - public WindowState? WindowState - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/BrowserAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/BrowserAdapter.cs deleted file mode 100644 index c60e76915d4df..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/BrowserAdapter.cs +++ /dev/null @@ -1,139 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the Browser domain to simplify the command interface. - /// - public class BrowserAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "Browser"; - private Dictionary m_eventMap = new Dictionary(); - - public BrowserAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - - /// - /// Grant specific permissions to the given origin and reject all others. - /// - public async Task GrantPermissions(GrantPermissionsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Reset all permission management for all origins. - /// - public async Task ResetPermissions(ResetPermissionsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Close browser gracefully. - /// - public async Task Close(CloseCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new CloseCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Crashes browser on the main thread. - /// - public async Task Crash(CrashCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new CrashCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Crashes GPU process. - /// - public async Task CrashGpuProcess(CrashGpuProcessCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new CrashGpuProcessCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns version information. - /// - public async Task GetVersion(GetVersionCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetVersionCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns the command line switches for the browser process if, and only if - /// --enable-automation is on the commandline. - /// - public async Task GetBrowserCommandLine(GetBrowserCommandLineCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetBrowserCommandLineCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Get Chrome histograms. - /// - public async Task GetHistograms(GetHistogramsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Get a Chrome histogram by name. - /// - public async Task GetHistogram(GetHistogramCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Get position and size of the browser window. - /// - public async Task GetWindowBounds(GetWindowBoundsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Get the browser window that contains the devtools target. - /// - public async Task GetWindowForTarget(GetWindowForTargetCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Set position and/or size of the browser window. - /// - public async Task SetWindowBounds(SetWindowBoundsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Set dock tile details, platform-specific. - /// - public async Task SetDockTile(SetDockTileCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/Bucket.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/Bucket.cs deleted file mode 100644 index d40314c5fe047..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/Bucket.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - - /// - /// Chrome histogram bucket. - /// - public sealed class Bucket - { - /// - /// Minimum value (inclusive). - /// - [JsonProperty("low")] - public long Low - { - get; - set; - } - /// - /// Maximum value (exclusive). - /// - [JsonProperty("high")] - public long High - { - get; - set; - } - /// - /// Number of samples. - /// - [JsonProperty("count")] - public long Count - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/CloseCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/CloseCommand.cs deleted file mode 100644 index caae458019d8b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/CloseCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - - /// - /// Close browser gracefully. - /// - public sealed class CloseCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Browser.close"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class CloseCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/CrashCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/CrashCommand.cs deleted file mode 100644 index 2cc3e82ccdc51..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/CrashCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - - /// - /// Crashes browser on the main thread. - /// - public sealed class CrashCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Browser.crash"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class CrashCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/CrashGpuProcessCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/CrashGpuProcessCommand.cs deleted file mode 100644 index 5d3ab6109d517..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/CrashGpuProcessCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - - /// - /// Crashes GPU process. - /// - public sealed class CrashGpuProcessCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Browser.crashGpuProcess"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class CrashGpuProcessCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetBrowserCommandLineCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetBrowserCommandLineCommand.cs deleted file mode 100644 index f082a37fce14d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetBrowserCommandLineCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - - /// - /// Returns the command line switches for the browser process if, and only if - /// --enable-automation is on the commandline. - /// - public sealed class GetBrowserCommandLineCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Browser.getBrowserCommandLine"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetBrowserCommandLineCommandResponse : ICommandResponse - { - /// - /// Commandline parameters - /// - [JsonProperty("arguments")] - public string[] Arguments - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetHistogramCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetHistogramCommand.cs deleted file mode 100644 index bdce828211145..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetHistogramCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - - /// - /// Get a Chrome histogram by name. - /// - public sealed class GetHistogramCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Browser.getHistogram"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Requested histogram name. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// If true, retrieve delta since last call. - /// - [JsonProperty("delta", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Delta - { - get; - set; - } - } - - public sealed class GetHistogramCommandResponse : ICommandResponse - { - /// - /// Histogram. - /// - [JsonProperty("histogram")] - public Histogram Histogram - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetHistogramsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetHistogramsCommand.cs deleted file mode 100644 index eb31a9d4d3052..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetHistogramsCommand.cs +++ /dev/null @@ -1,52 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - - /// - /// Get Chrome histograms. - /// - public sealed class GetHistogramsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Browser.getHistograms"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Requested substring in name. Only histograms which have query as a - /// substring in their name are extracted. An empty or absent query returns - /// all histograms. - /// - [JsonProperty("query", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Query - { - get; - set; - } - /// - /// If true, retrieve delta since last call. - /// - [JsonProperty("delta", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Delta - { - get; - set; - } - } - - public sealed class GetHistogramsCommandResponse : ICommandResponse - { - /// - /// Histograms. - /// - [JsonProperty("histograms")] - public Histogram[] Histograms - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetVersionCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetVersionCommand.cs deleted file mode 100644 index f325745e0a2a8..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetVersionCommand.cs +++ /dev/null @@ -1,68 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - - /// - /// Returns version information. - /// - public sealed class GetVersionCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Browser.getVersion"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetVersionCommandResponse : ICommandResponse - { - /// - /// Protocol version. - /// - [JsonProperty("protocolVersion")] - public string ProtocolVersion - { - get; - set; - } - /// - /// Product name. - /// - [JsonProperty("product")] - public string Product - { - get; - set; - } - /// - /// Product revision. - /// - [JsonProperty("revision")] - public string Revision - { - get; - set; - } - /// - /// User-Agent. - /// - [JsonProperty("userAgent")] - public string UserAgent - { - get; - set; - } - /// - /// V8 version. - /// - [JsonProperty("jsVersion")] - public string JsVersion - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetWindowBoundsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetWindowBoundsCommand.cs deleted file mode 100644 index 37f1b0a08a433..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetWindowBoundsCommand.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - - /// - /// Get position and size of the browser window. - /// - public sealed class GetWindowBoundsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Browser.getWindowBounds"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Browser window id. - /// - [JsonProperty("windowId")] - public long WindowId - { - get; - set; - } - } - - public sealed class GetWindowBoundsCommandResponse : ICommandResponse - { - /// - /// Bounds information of the window. When window state is 'minimized', the restored window - /// position and size are returned. - /// - [JsonProperty("bounds")] - public Bounds Bounds - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetWindowForTargetCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetWindowForTargetCommand.cs deleted file mode 100644 index e5db512b622e1..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GetWindowForTargetCommand.cs +++ /dev/null @@ -1,51 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - - /// - /// Get the browser window that contains the devtools target. - /// - public sealed class GetWindowForTargetCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Browser.getWindowForTarget"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Devtools agent host id. If called as a part of the session, associated targetId is used. - /// - [JsonProperty("targetId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string TargetId - { - get; - set; - } - } - - public sealed class GetWindowForTargetCommandResponse : ICommandResponse - { - /// - /// Browser window id. - /// - [JsonProperty("windowId")] - public long WindowId - { - get; - set; - } - /// - /// Bounds information of the window. When window state is 'minimized', the restored window - /// position and size are returned. - /// - [JsonProperty("bounds")] - public Bounds Bounds - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GrantPermissionsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GrantPermissionsCommand.cs deleted file mode 100644 index ab360614ffaf5..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/GrantPermissionsCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - - /// - /// Grant specific permissions to the given origin and reject all others. - /// - public sealed class GrantPermissionsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Browser.grantPermissions"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the origin - /// - [JsonProperty("origin")] - public string Origin - { - get; - set; - } - /// - /// Gets or sets the permissions - /// - [JsonProperty("permissions")] - public PermissionType[] Permissions - { - get; - set; - } - /// - /// BrowserContext to override permissions. When omitted, default browser context is used. - /// - [JsonProperty("browserContextId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string BrowserContextId - { - get; - set; - } - } - - public sealed class GrantPermissionsCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/Histogram.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/Histogram.cs deleted file mode 100644 index 1435bc5e04431..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/Histogram.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - - /// - /// Chrome histogram. - /// - public sealed class Histogram - { - /// - /// Name. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// Sum of sample values. - /// - [JsonProperty("sum")] - public long Sum - { - get; - set; - } - /// - /// Total number of samples. - /// - [JsonProperty("count")] - public long Count - { - get; - set; - } - /// - /// Buckets. - /// - [JsonProperty("buckets")] - public Bucket[] Buckets - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/PermissionType.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/PermissionType.cs deleted file mode 100644 index d09e2eb0f4ddb..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/PermissionType.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// PermissionType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PermissionType - { - [EnumMember(Value = "accessibilityEvents")] - AccessibilityEvents, - [EnumMember(Value = "audioCapture")] - AudioCapture, - [EnumMember(Value = "backgroundSync")] - BackgroundSync, - [EnumMember(Value = "backgroundFetch")] - BackgroundFetch, - [EnumMember(Value = "clipboardRead")] - ClipboardRead, - [EnumMember(Value = "clipboardWrite")] - ClipboardWrite, - [EnumMember(Value = "durableStorage")] - DurableStorage, - [EnumMember(Value = "flash")] - Flash, - [EnumMember(Value = "geolocation")] - Geolocation, - [EnumMember(Value = "midi")] - Midi, - [EnumMember(Value = "midiSysex")] - MidiSysex, - [EnumMember(Value = "notifications")] - Notifications, - [EnumMember(Value = "paymentHandler")] - PaymentHandler, - [EnumMember(Value = "protectedMediaIdentifier")] - ProtectedMediaIdentifier, - [EnumMember(Value = "sensors")] - Sensors, - [EnumMember(Value = "videoCapture")] - VideoCapture, - [EnumMember(Value = "idleDetection")] - IdleDetection, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/ResetPermissionsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/ResetPermissionsCommand.cs deleted file mode 100644 index 6f1dabceb35c7..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/ResetPermissionsCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - - /// - /// Reset all permission management for all origins. - /// - public sealed class ResetPermissionsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Browser.resetPermissions"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// BrowserContext to reset permissions. When omitted, default browser context is used. - /// - [JsonProperty("browserContextId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string BrowserContextId - { - get; - set; - } - } - - public sealed class ResetPermissionsCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/SetDockTileCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/SetDockTileCommand.cs deleted file mode 100644 index 4e0029cd59646..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/SetDockTileCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - - /// - /// Set dock tile details, platform-specific. - /// - public sealed class SetDockTileCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Browser.setDockTile"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the badgeLabel - /// - [JsonProperty("badgeLabel", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string BadgeLabel - { - get; - set; - } - /// - /// Png encoded image. - /// - [JsonProperty("image", DefaultValueHandling = DefaultValueHandling.Ignore)] - public byte[] Image - { - get; - set; - } - } - - public sealed class SetDockTileCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/SetWindowBoundsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/SetWindowBoundsCommand.cs deleted file mode 100644 index c40afed43b92c..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/SetWindowBoundsCommand.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - - /// - /// Set position and/or size of the browser window. - /// - public sealed class SetWindowBoundsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Browser.setWindowBounds"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Browser window id. - /// - [JsonProperty("windowId")] - public long WindowId - { - get; - set; - } - /// - /// New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined - /// with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged. - /// - [JsonProperty("bounds")] - public Bounds Bounds - { - get; - set; - } - } - - public sealed class SetWindowBoundsCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/WindowState.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/WindowState.cs deleted file mode 100644 index 4e2fb4cc697e6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Browser/WindowState.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Browser -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// The state of the browser window. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum WindowState - { - [EnumMember(Value = "normal")] - Normal, - [EnumMember(Value = "minimized")] - Minimized, - [EnumMember(Value = "maximized")] - Maximized, - [EnumMember(Value = "fullscreen")] - Fullscreen, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/CommandResponseTypeMap.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/CommandResponseTypeMap.cs deleted file mode 100644 index e282d311077cd..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/CommandResponseTypeMap.cs +++ /dev/null @@ -1,298 +0,0 @@ -namespace OpenQA.Selenium.DevTools -{ - using System; - using System.Collections.Generic; - - public static class CommandResponseTypeMap - { - private readonly static IDictionary s_commandResponseTypeDictionary; - - static CommandResponseTypeMap() - { - s_commandResponseTypeDictionary = new Dictionary() - { - { typeof(Browser.GrantPermissionsCommandSettings), typeof(Browser.GrantPermissionsCommandResponse) }, - { typeof(Browser.ResetPermissionsCommandSettings), typeof(Browser.ResetPermissionsCommandResponse) }, - { typeof(Browser.CloseCommandSettings), typeof(Browser.CloseCommandResponse) }, - { typeof(Browser.CrashCommandSettings), typeof(Browser.CrashCommandResponse) }, - { typeof(Browser.CrashGpuProcessCommandSettings), typeof(Browser.CrashGpuProcessCommandResponse) }, - { typeof(Browser.GetVersionCommandSettings), typeof(Browser.GetVersionCommandResponse) }, - { typeof(Browser.GetBrowserCommandLineCommandSettings), typeof(Browser.GetBrowserCommandLineCommandResponse) }, - { typeof(Browser.GetHistogramsCommandSettings), typeof(Browser.GetHistogramsCommandResponse) }, - { typeof(Browser.GetHistogramCommandSettings), typeof(Browser.GetHistogramCommandResponse) }, - { typeof(Browser.GetWindowBoundsCommandSettings), typeof(Browser.GetWindowBoundsCommandResponse) }, - { typeof(Browser.GetWindowForTargetCommandSettings), typeof(Browser.GetWindowForTargetCommandResponse) }, - { typeof(Browser.SetWindowBoundsCommandSettings), typeof(Browser.SetWindowBoundsCommandResponse) }, - { typeof(Browser.SetDockTileCommandSettings), typeof(Browser.SetDockTileCommandResponse) }, - { typeof(DOM.CollectClassNamesFromSubtreeCommandSettings), typeof(DOM.CollectClassNamesFromSubtreeCommandResponse) }, - { typeof(DOM.CopyToCommandSettings), typeof(DOM.CopyToCommandResponse) }, - { typeof(DOM.DescribeNodeCommandSettings), typeof(DOM.DescribeNodeCommandResponse) }, - { typeof(DOM.DisableCommandSettings), typeof(DOM.DisableCommandResponse) }, - { typeof(DOM.DiscardSearchResultsCommandSettings), typeof(DOM.DiscardSearchResultsCommandResponse) }, - { typeof(DOM.EnableCommandSettings), typeof(DOM.EnableCommandResponse) }, - { typeof(DOM.FocusCommandSettings), typeof(DOM.FocusCommandResponse) }, - { typeof(DOM.GetAttributesCommandSettings), typeof(DOM.GetAttributesCommandResponse) }, - { typeof(DOM.GetBoxModelCommandSettings), typeof(DOM.GetBoxModelCommandResponse) }, - { typeof(DOM.GetContentQuadsCommandSettings), typeof(DOM.GetContentQuadsCommandResponse) }, - { typeof(DOM.GetDocumentCommandSettings), typeof(DOM.GetDocumentCommandResponse) }, - { typeof(DOM.GetFlattenedDocumentCommandSettings), typeof(DOM.GetFlattenedDocumentCommandResponse) }, - { typeof(DOM.GetNodeForLocationCommandSettings), typeof(DOM.GetNodeForLocationCommandResponse) }, - { typeof(DOM.GetOuterHTMLCommandSettings), typeof(DOM.GetOuterHTMLCommandResponse) }, - { typeof(DOM.GetRelayoutBoundaryCommandSettings), typeof(DOM.GetRelayoutBoundaryCommandResponse) }, - { typeof(DOM.GetSearchResultsCommandSettings), typeof(DOM.GetSearchResultsCommandResponse) }, - { typeof(DOM.HideHighlightCommandSettings), typeof(DOM.HideHighlightCommandResponse) }, - { typeof(DOM.HighlightNodeCommandSettings), typeof(DOM.HighlightNodeCommandResponse) }, - { typeof(DOM.HighlightRectCommandSettings), typeof(DOM.HighlightRectCommandResponse) }, - { typeof(DOM.MarkUndoableStateCommandSettings), typeof(DOM.MarkUndoableStateCommandResponse) }, - { typeof(DOM.MoveToCommandSettings), typeof(DOM.MoveToCommandResponse) }, - { typeof(DOM.PerformSearchCommandSettings), typeof(DOM.PerformSearchCommandResponse) }, - { typeof(DOM.PushNodeByPathToFrontendCommandSettings), typeof(DOM.PushNodeByPathToFrontendCommandResponse) }, - { typeof(DOM.PushNodesByBackendIdsToFrontendCommandSettings), typeof(DOM.PushNodesByBackendIdsToFrontendCommandResponse) }, - { typeof(DOM.QuerySelectorCommandSettings), typeof(DOM.QuerySelectorCommandResponse) }, - { typeof(DOM.QuerySelectorAllCommandSettings), typeof(DOM.QuerySelectorAllCommandResponse) }, - { typeof(DOM.RedoCommandSettings), typeof(DOM.RedoCommandResponse) }, - { typeof(DOM.RemoveAttributeCommandSettings), typeof(DOM.RemoveAttributeCommandResponse) }, - { typeof(DOM.RemoveNodeCommandSettings), typeof(DOM.RemoveNodeCommandResponse) }, - { typeof(DOM.RequestChildNodesCommandSettings), typeof(DOM.RequestChildNodesCommandResponse) }, - { typeof(DOM.RequestNodeCommandSettings), typeof(DOM.RequestNodeCommandResponse) }, - { typeof(DOM.ResolveNodeCommandSettings), typeof(DOM.ResolveNodeCommandResponse) }, - { typeof(DOM.SetAttributeValueCommandSettings), typeof(DOM.SetAttributeValueCommandResponse) }, - { typeof(DOM.SetAttributesAsTextCommandSettings), typeof(DOM.SetAttributesAsTextCommandResponse) }, - { typeof(DOM.SetFileInputFilesCommandSettings), typeof(DOM.SetFileInputFilesCommandResponse) }, - { typeof(DOM.GetFileInfoCommandSettings), typeof(DOM.GetFileInfoCommandResponse) }, - { typeof(DOM.SetInspectedNodeCommandSettings), typeof(DOM.SetInspectedNodeCommandResponse) }, - { typeof(DOM.SetNodeNameCommandSettings), typeof(DOM.SetNodeNameCommandResponse) }, - { typeof(DOM.SetNodeValueCommandSettings), typeof(DOM.SetNodeValueCommandResponse) }, - { typeof(DOM.SetOuterHTMLCommandSettings), typeof(DOM.SetOuterHTMLCommandResponse) }, - { typeof(DOM.UndoCommandSettings), typeof(DOM.UndoCommandResponse) }, - { typeof(DOM.GetFrameOwnerCommandSettings), typeof(DOM.GetFrameOwnerCommandResponse) }, - { typeof(DOMDebugger.GetEventListenersCommandSettings), typeof(DOMDebugger.GetEventListenersCommandResponse) }, - { typeof(DOMDebugger.RemoveDOMBreakpointCommandSettings), typeof(DOMDebugger.RemoveDOMBreakpointCommandResponse) }, - { typeof(DOMDebugger.RemoveEventListenerBreakpointCommandSettings), typeof(DOMDebugger.RemoveEventListenerBreakpointCommandResponse) }, - { typeof(DOMDebugger.RemoveInstrumentationBreakpointCommandSettings), typeof(DOMDebugger.RemoveInstrumentationBreakpointCommandResponse) }, - { typeof(DOMDebugger.RemoveXHRBreakpointCommandSettings), typeof(DOMDebugger.RemoveXHRBreakpointCommandResponse) }, - { typeof(DOMDebugger.SetDOMBreakpointCommandSettings), typeof(DOMDebugger.SetDOMBreakpointCommandResponse) }, - { typeof(DOMDebugger.SetEventListenerBreakpointCommandSettings), typeof(DOMDebugger.SetEventListenerBreakpointCommandResponse) }, - { typeof(DOMDebugger.SetInstrumentationBreakpointCommandSettings), typeof(DOMDebugger.SetInstrumentationBreakpointCommandResponse) }, - { typeof(DOMDebugger.SetXHRBreakpointCommandSettings), typeof(DOMDebugger.SetXHRBreakpointCommandResponse) }, - { typeof(Emulation.CanEmulateCommandSettings), typeof(Emulation.CanEmulateCommandResponse) }, - { typeof(Emulation.ClearDeviceMetricsOverrideCommandSettings), typeof(Emulation.ClearDeviceMetricsOverrideCommandResponse) }, - { typeof(Emulation.ClearGeolocationOverrideCommandSettings), typeof(Emulation.ClearGeolocationOverrideCommandResponse) }, - { typeof(Emulation.ResetPageScaleFactorCommandSettings), typeof(Emulation.ResetPageScaleFactorCommandResponse) }, - { typeof(Emulation.SetFocusEmulationEnabledCommandSettings), typeof(Emulation.SetFocusEmulationEnabledCommandResponse) }, - { typeof(Emulation.SetCPUThrottlingRateCommandSettings), typeof(Emulation.SetCPUThrottlingRateCommandResponse) }, - { typeof(Emulation.SetDefaultBackgroundColorOverrideCommandSettings), typeof(Emulation.SetDefaultBackgroundColorOverrideCommandResponse) }, - { typeof(Emulation.SetDeviceMetricsOverrideCommandSettings), typeof(Emulation.SetDeviceMetricsOverrideCommandResponse) }, - { typeof(Emulation.SetScrollbarsHiddenCommandSettings), typeof(Emulation.SetScrollbarsHiddenCommandResponse) }, - { typeof(Emulation.SetDocumentCookieDisabledCommandSettings), typeof(Emulation.SetDocumentCookieDisabledCommandResponse) }, - { typeof(Emulation.SetEmitTouchEventsForMouseCommandSettings), typeof(Emulation.SetEmitTouchEventsForMouseCommandResponse) }, - { typeof(Emulation.SetEmulatedMediaCommandSettings), typeof(Emulation.SetEmulatedMediaCommandResponse) }, - { typeof(Emulation.SetGeolocationOverrideCommandSettings), typeof(Emulation.SetGeolocationOverrideCommandResponse) }, - { typeof(Emulation.SetNavigatorOverridesCommandSettings), typeof(Emulation.SetNavigatorOverridesCommandResponse) }, - { typeof(Emulation.SetPageScaleFactorCommandSettings), typeof(Emulation.SetPageScaleFactorCommandResponse) }, - { typeof(Emulation.SetScriptExecutionDisabledCommandSettings), typeof(Emulation.SetScriptExecutionDisabledCommandResponse) }, - { typeof(Emulation.SetTouchEmulationEnabledCommandSettings), typeof(Emulation.SetTouchEmulationEnabledCommandResponse) }, - { typeof(Emulation.SetVirtualTimePolicyCommandSettings), typeof(Emulation.SetVirtualTimePolicyCommandResponse) }, - { typeof(Emulation.SetVisibleSizeCommandSettings), typeof(Emulation.SetVisibleSizeCommandResponse) }, - { typeof(Emulation.SetUserAgentOverrideCommandSettings), typeof(Emulation.SetUserAgentOverrideCommandResponse) }, - { typeof(IO.CloseCommandSettings), typeof(IO.CloseCommandResponse) }, - { typeof(IO.ReadCommandSettings), typeof(IO.ReadCommandResponse) }, - { typeof(IO.ResolveBlobCommandSettings), typeof(IO.ResolveBlobCommandResponse) }, - { typeof(Input.DispatchKeyEventCommandSettings), typeof(Input.DispatchKeyEventCommandResponse) }, - { typeof(Input.InsertTextCommandSettings), typeof(Input.InsertTextCommandResponse) }, - { typeof(Input.DispatchMouseEventCommandSettings), typeof(Input.DispatchMouseEventCommandResponse) }, - { typeof(Input.DispatchTouchEventCommandSettings), typeof(Input.DispatchTouchEventCommandResponse) }, - { typeof(Input.EmulateTouchFromMouseEventCommandSettings), typeof(Input.EmulateTouchFromMouseEventCommandResponse) }, - { typeof(Input.SetIgnoreInputEventsCommandSettings), typeof(Input.SetIgnoreInputEventsCommandResponse) }, - { typeof(Input.SynthesizePinchGestureCommandSettings), typeof(Input.SynthesizePinchGestureCommandResponse) }, - { typeof(Input.SynthesizeScrollGestureCommandSettings), typeof(Input.SynthesizeScrollGestureCommandResponse) }, - { typeof(Input.SynthesizeTapGestureCommandSettings), typeof(Input.SynthesizeTapGestureCommandResponse) }, - { typeof(Log.ClearCommandSettings), typeof(Log.ClearCommandResponse) }, - { typeof(Log.DisableCommandSettings), typeof(Log.DisableCommandResponse) }, - { typeof(Log.EnableCommandSettings), typeof(Log.EnableCommandResponse) }, - { typeof(Log.StartViolationsReportCommandSettings), typeof(Log.StartViolationsReportCommandResponse) }, - { typeof(Log.StopViolationsReportCommandSettings), typeof(Log.StopViolationsReportCommandResponse) }, - { typeof(Network.CanClearBrowserCacheCommandSettings), typeof(Network.CanClearBrowserCacheCommandResponse) }, - { typeof(Network.CanClearBrowserCookiesCommandSettings), typeof(Network.CanClearBrowserCookiesCommandResponse) }, - { typeof(Network.CanEmulateNetworkConditionsCommandSettings), typeof(Network.CanEmulateNetworkConditionsCommandResponse) }, - { typeof(Network.ClearBrowserCacheCommandSettings), typeof(Network.ClearBrowserCacheCommandResponse) }, - { typeof(Network.ClearBrowserCookiesCommandSettings), typeof(Network.ClearBrowserCookiesCommandResponse) }, - { typeof(Network.ContinueInterceptedRequestCommandSettings), typeof(Network.ContinueInterceptedRequestCommandResponse) }, - { typeof(Network.DeleteCookiesCommandSettings), typeof(Network.DeleteCookiesCommandResponse) }, - { typeof(Network.DisableCommandSettings), typeof(Network.DisableCommandResponse) }, - { typeof(Network.EmulateNetworkConditionsCommandSettings), typeof(Network.EmulateNetworkConditionsCommandResponse) }, - { typeof(Network.EnableCommandSettings), typeof(Network.EnableCommandResponse) }, - { typeof(Network.GetAllCookiesCommandSettings), typeof(Network.GetAllCookiesCommandResponse) }, - { typeof(Network.GetCertificateCommandSettings), typeof(Network.GetCertificateCommandResponse) }, - { typeof(Network.GetCookiesCommandSettings), typeof(Network.GetCookiesCommandResponse) }, - { typeof(Network.GetResponseBodyCommandSettings), typeof(Network.GetResponseBodyCommandResponse) }, - { typeof(Network.GetRequestPostDataCommandSettings), typeof(Network.GetRequestPostDataCommandResponse) }, - { typeof(Network.GetResponseBodyForInterceptionCommandSettings), typeof(Network.GetResponseBodyForInterceptionCommandResponse) }, - { typeof(Network.TakeResponseBodyForInterceptionAsStreamCommandSettings), typeof(Network.TakeResponseBodyForInterceptionAsStreamCommandResponse) }, - { typeof(Network.ReplayXHRCommandSettings), typeof(Network.ReplayXHRCommandResponse) }, - { typeof(Network.SearchInResponseBodyCommandSettings), typeof(Network.SearchInResponseBodyCommandResponse) }, - { typeof(Network.SetBlockedURLsCommandSettings), typeof(Network.SetBlockedURLsCommandResponse) }, - { typeof(Network.SetBypassServiceWorkerCommandSettings), typeof(Network.SetBypassServiceWorkerCommandResponse) }, - { typeof(Network.SetCacheDisabledCommandSettings), typeof(Network.SetCacheDisabledCommandResponse) }, - { typeof(Network.SetCookieCommandSettings), typeof(Network.SetCookieCommandResponse) }, - { typeof(Network.SetCookiesCommandSettings), typeof(Network.SetCookiesCommandResponse) }, - { typeof(Network.SetDataSizeLimitsForTestCommandSettings), typeof(Network.SetDataSizeLimitsForTestCommandResponse) }, - { typeof(Network.SetExtraHTTPHeadersCommandSettings), typeof(Network.SetExtraHTTPHeadersCommandResponse) }, - { typeof(Network.SetRequestInterceptionCommandSettings), typeof(Network.SetRequestInterceptionCommandResponse) }, - { typeof(Network.SetUserAgentOverrideCommandSettings), typeof(Network.SetUserAgentOverrideCommandResponse) }, - { typeof(Page.AddScriptToEvaluateOnLoadCommandSettings), typeof(Page.AddScriptToEvaluateOnLoadCommandResponse) }, - { typeof(Page.AddScriptToEvaluateOnNewDocumentCommandSettings), typeof(Page.AddScriptToEvaluateOnNewDocumentCommandResponse) }, - { typeof(Page.BringToFrontCommandSettings), typeof(Page.BringToFrontCommandResponse) }, - { typeof(Page.CaptureScreenshotCommandSettings), typeof(Page.CaptureScreenshotCommandResponse) }, - { typeof(Page.CaptureSnapshotCommandSettings), typeof(Page.CaptureSnapshotCommandResponse) }, - { typeof(Page.ClearDeviceMetricsOverrideCommandSettings), typeof(Page.ClearDeviceMetricsOverrideCommandResponse) }, - { typeof(Page.ClearDeviceOrientationOverrideCommandSettings), typeof(Page.ClearDeviceOrientationOverrideCommandResponse) }, - { typeof(Page.ClearGeolocationOverrideCommandSettings), typeof(Page.ClearGeolocationOverrideCommandResponse) }, - { typeof(Page.CreateIsolatedWorldCommandSettings), typeof(Page.CreateIsolatedWorldCommandResponse) }, - { typeof(Page.DeleteCookieCommandSettings), typeof(Page.DeleteCookieCommandResponse) }, - { typeof(Page.DisableCommandSettings), typeof(Page.DisableCommandResponse) }, - { typeof(Page.EnableCommandSettings), typeof(Page.EnableCommandResponse) }, - { typeof(Page.GetAppManifestCommandSettings), typeof(Page.GetAppManifestCommandResponse) }, - { typeof(Page.GetInstallabilityErrorsCommandSettings), typeof(Page.GetInstallabilityErrorsCommandResponse) }, - { typeof(Page.GetCookiesCommandSettings), typeof(Page.GetCookiesCommandResponse) }, - { typeof(Page.GetFrameTreeCommandSettings), typeof(Page.GetFrameTreeCommandResponse) }, - { typeof(Page.GetLayoutMetricsCommandSettings), typeof(Page.GetLayoutMetricsCommandResponse) }, - { typeof(Page.GetNavigationHistoryCommandSettings), typeof(Page.GetNavigationHistoryCommandResponse) }, - { typeof(Page.ResetNavigationHistoryCommandSettings), typeof(Page.ResetNavigationHistoryCommandResponse) }, - { typeof(Page.GetResourceContentCommandSettings), typeof(Page.GetResourceContentCommandResponse) }, - { typeof(Page.GetResourceTreeCommandSettings), typeof(Page.GetResourceTreeCommandResponse) }, - { typeof(Page.HandleJavaScriptDialogCommandSettings), typeof(Page.HandleJavaScriptDialogCommandResponse) }, - { typeof(Page.NavigateCommandSettings), typeof(Page.NavigateCommandResponse) }, - { typeof(Page.NavigateToHistoryEntryCommandSettings), typeof(Page.NavigateToHistoryEntryCommandResponse) }, - { typeof(Page.PrintToPDFCommandSettings), typeof(Page.PrintToPDFCommandResponse) }, - { typeof(Page.ReloadCommandSettings), typeof(Page.ReloadCommandResponse) }, - { typeof(Page.RemoveScriptToEvaluateOnLoadCommandSettings), typeof(Page.RemoveScriptToEvaluateOnLoadCommandResponse) }, - { typeof(Page.RemoveScriptToEvaluateOnNewDocumentCommandSettings), typeof(Page.RemoveScriptToEvaluateOnNewDocumentCommandResponse) }, - { typeof(Page.ScreencastFrameAckCommandSettings), typeof(Page.ScreencastFrameAckCommandResponse) }, - { typeof(Page.SearchInResourceCommandSettings), typeof(Page.SearchInResourceCommandResponse) }, - { typeof(Page.SetAdBlockingEnabledCommandSettings), typeof(Page.SetAdBlockingEnabledCommandResponse) }, - { typeof(Page.SetBypassCSPCommandSettings), typeof(Page.SetBypassCSPCommandResponse) }, - { typeof(Page.SetDeviceMetricsOverrideCommandSettings), typeof(Page.SetDeviceMetricsOverrideCommandResponse) }, - { typeof(Page.SetDeviceOrientationOverrideCommandSettings), typeof(Page.SetDeviceOrientationOverrideCommandResponse) }, - { typeof(Page.SetFontFamiliesCommandSettings), typeof(Page.SetFontFamiliesCommandResponse) }, - { typeof(Page.SetFontSizesCommandSettings), typeof(Page.SetFontSizesCommandResponse) }, - { typeof(Page.SetDocumentContentCommandSettings), typeof(Page.SetDocumentContentCommandResponse) }, - { typeof(Page.SetDownloadBehaviorCommandSettings), typeof(Page.SetDownloadBehaviorCommandResponse) }, - { typeof(Page.SetGeolocationOverrideCommandSettings), typeof(Page.SetGeolocationOverrideCommandResponse) }, - { typeof(Page.SetLifecycleEventsEnabledCommandSettings), typeof(Page.SetLifecycleEventsEnabledCommandResponse) }, - { typeof(Page.SetTouchEmulationEnabledCommandSettings), typeof(Page.SetTouchEmulationEnabledCommandResponse) }, - { typeof(Page.StartScreencastCommandSettings), typeof(Page.StartScreencastCommandResponse) }, - { typeof(Page.StopLoadingCommandSettings), typeof(Page.StopLoadingCommandResponse) }, - { typeof(Page.CrashCommandSettings), typeof(Page.CrashCommandResponse) }, - { typeof(Page.CloseCommandSettings), typeof(Page.CloseCommandResponse) }, - { typeof(Page.SetWebLifecycleStateCommandSettings), typeof(Page.SetWebLifecycleStateCommandResponse) }, - { typeof(Page.StopScreencastCommandSettings), typeof(Page.StopScreencastCommandResponse) }, - { typeof(Page.SetProduceCompilationCacheCommandSettings), typeof(Page.SetProduceCompilationCacheCommandResponse) }, - { typeof(Page.AddCompilationCacheCommandSettings), typeof(Page.AddCompilationCacheCommandResponse) }, - { typeof(Page.ClearCompilationCacheCommandSettings), typeof(Page.ClearCompilationCacheCommandResponse) }, - { typeof(Page.GenerateTestReportCommandSettings), typeof(Page.GenerateTestReportCommandResponse) }, - { typeof(Page.WaitForDebuggerCommandSettings), typeof(Page.WaitForDebuggerCommandResponse) }, - { typeof(Performance.DisableCommandSettings), typeof(Performance.DisableCommandResponse) }, - { typeof(Performance.EnableCommandSettings), typeof(Performance.EnableCommandResponse) }, - { typeof(Performance.SetTimeDomainCommandSettings), typeof(Performance.SetTimeDomainCommandResponse) }, - { typeof(Performance.GetMetricsCommandSettings), typeof(Performance.GetMetricsCommandResponse) }, - { typeof(Security.DisableCommandSettings), typeof(Security.DisableCommandResponse) }, - { typeof(Security.EnableCommandSettings), typeof(Security.EnableCommandResponse) }, - { typeof(Security.SetIgnoreCertificateErrorsCommandSettings), typeof(Security.SetIgnoreCertificateErrorsCommandResponse) }, - { typeof(Security.HandleCertificateErrorCommandSettings), typeof(Security.HandleCertificateErrorCommandResponse) }, - { typeof(Security.SetOverrideCertificateErrorsCommandSettings), typeof(Security.SetOverrideCertificateErrorsCommandResponse) }, - { typeof(Target.ActivateTargetCommandSettings), typeof(Target.ActivateTargetCommandResponse) }, - { typeof(Target.AttachToTargetCommandSettings), typeof(Target.AttachToTargetCommandResponse) }, - { typeof(Target.AttachToBrowserTargetCommandSettings), typeof(Target.AttachToBrowserTargetCommandResponse) }, - { typeof(Target.CloseTargetCommandSettings), typeof(Target.CloseTargetCommandResponse) }, - { typeof(Target.ExposeDevToolsProtocolCommandSettings), typeof(Target.ExposeDevToolsProtocolCommandResponse) }, - { typeof(Target.CreateBrowserContextCommandSettings), typeof(Target.CreateBrowserContextCommandResponse) }, - { typeof(Target.GetBrowserContextsCommandSettings), typeof(Target.GetBrowserContextsCommandResponse) }, - { typeof(Target.CreateTargetCommandSettings), typeof(Target.CreateTargetCommandResponse) }, - { typeof(Target.DetachFromTargetCommandSettings), typeof(Target.DetachFromTargetCommandResponse) }, - { typeof(Target.DisposeBrowserContextCommandSettings), typeof(Target.DisposeBrowserContextCommandResponse) }, - { typeof(Target.GetTargetInfoCommandSettings), typeof(Target.GetTargetInfoCommandResponse) }, - { typeof(Target.GetTargetsCommandSettings), typeof(Target.GetTargetsCommandResponse) }, - { typeof(Target.SendMessageToTargetCommandSettings), typeof(Target.SendMessageToTargetCommandResponse) }, - { typeof(Target.SetAutoAttachCommandSettings), typeof(Target.SetAutoAttachCommandResponse) }, - { typeof(Target.SetDiscoverTargetsCommandSettings), typeof(Target.SetDiscoverTargetsCommandResponse) }, - { typeof(Target.SetRemoteLocationsCommandSettings), typeof(Target.SetRemoteLocationsCommandResponse) }, - { typeof(Console.ClearMessagesCommandSettings), typeof(Console.ClearMessagesCommandResponse) }, - { typeof(Console.DisableCommandSettings), typeof(Console.DisableCommandResponse) }, - { typeof(Console.EnableCommandSettings), typeof(Console.EnableCommandResponse) }, - { typeof(Debugger.ContinueToLocationCommandSettings), typeof(Debugger.ContinueToLocationCommandResponse) }, - { typeof(Debugger.DisableCommandSettings), typeof(Debugger.DisableCommandResponse) }, - { typeof(Debugger.EnableCommandSettings), typeof(Debugger.EnableCommandResponse) }, - { typeof(Debugger.EvaluateOnCallFrameCommandSettings), typeof(Debugger.EvaluateOnCallFrameCommandResponse) }, - { typeof(Debugger.GetPossibleBreakpointsCommandSettings), typeof(Debugger.GetPossibleBreakpointsCommandResponse) }, - { typeof(Debugger.GetScriptSourceCommandSettings), typeof(Debugger.GetScriptSourceCommandResponse) }, - { typeof(Debugger.GetStackTraceCommandSettings), typeof(Debugger.GetStackTraceCommandResponse) }, - { typeof(Debugger.PauseCommandSettings), typeof(Debugger.PauseCommandResponse) }, - { typeof(Debugger.PauseOnAsyncCallCommandSettings), typeof(Debugger.PauseOnAsyncCallCommandResponse) }, - { typeof(Debugger.RemoveBreakpointCommandSettings), typeof(Debugger.RemoveBreakpointCommandResponse) }, - { typeof(Debugger.RestartFrameCommandSettings), typeof(Debugger.RestartFrameCommandResponse) }, - { typeof(Debugger.ResumeCommandSettings), typeof(Debugger.ResumeCommandResponse) }, - { typeof(Debugger.SearchInContentCommandSettings), typeof(Debugger.SearchInContentCommandResponse) }, - { typeof(Debugger.SetAsyncCallStackDepthCommandSettings), typeof(Debugger.SetAsyncCallStackDepthCommandResponse) }, - { typeof(Debugger.SetBlackboxPatternsCommandSettings), typeof(Debugger.SetBlackboxPatternsCommandResponse) }, - { typeof(Debugger.SetBlackboxedRangesCommandSettings), typeof(Debugger.SetBlackboxedRangesCommandResponse) }, - { typeof(Debugger.SetBreakpointCommandSettings), typeof(Debugger.SetBreakpointCommandResponse) }, - { typeof(Debugger.SetBreakpointByUrlCommandSettings), typeof(Debugger.SetBreakpointByUrlCommandResponse) }, - { typeof(Debugger.SetBreakpointOnFunctionCallCommandSettings), typeof(Debugger.SetBreakpointOnFunctionCallCommandResponse) }, - { typeof(Debugger.SetBreakpointsActiveCommandSettings), typeof(Debugger.SetBreakpointsActiveCommandResponse) }, - { typeof(Debugger.SetPauseOnExceptionsCommandSettings), typeof(Debugger.SetPauseOnExceptionsCommandResponse) }, - { typeof(Debugger.SetReturnValueCommandSettings), typeof(Debugger.SetReturnValueCommandResponse) }, - { typeof(Debugger.SetScriptSourceCommandSettings), typeof(Debugger.SetScriptSourceCommandResponse) }, - { typeof(Debugger.SetSkipAllPausesCommandSettings), typeof(Debugger.SetSkipAllPausesCommandResponse) }, - { typeof(Debugger.SetVariableValueCommandSettings), typeof(Debugger.SetVariableValueCommandResponse) }, - { typeof(Debugger.StepIntoCommandSettings), typeof(Debugger.StepIntoCommandResponse) }, - { typeof(Debugger.StepOutCommandSettings), typeof(Debugger.StepOutCommandResponse) }, - { typeof(Debugger.StepOverCommandSettings), typeof(Debugger.StepOverCommandResponse) }, - { typeof(Profiler.DisableCommandSettings), typeof(Profiler.DisableCommandResponse) }, - { typeof(Profiler.EnableCommandSettings), typeof(Profiler.EnableCommandResponse) }, - { typeof(Profiler.GetBestEffortCoverageCommandSettings), typeof(Profiler.GetBestEffortCoverageCommandResponse) }, - { typeof(Profiler.SetSamplingIntervalCommandSettings), typeof(Profiler.SetSamplingIntervalCommandResponse) }, - { typeof(Profiler.StartCommandSettings), typeof(Profiler.StartCommandResponse) }, - { typeof(Profiler.StartPreciseCoverageCommandSettings), typeof(Profiler.StartPreciseCoverageCommandResponse) }, - { typeof(Profiler.StartTypeProfileCommandSettings), typeof(Profiler.StartTypeProfileCommandResponse) }, - { typeof(Profiler.StopCommandSettings), typeof(Profiler.StopCommandResponse) }, - { typeof(Profiler.StopPreciseCoverageCommandSettings), typeof(Profiler.StopPreciseCoverageCommandResponse) }, - { typeof(Profiler.StopTypeProfileCommandSettings), typeof(Profiler.StopTypeProfileCommandResponse) }, - { typeof(Profiler.TakePreciseCoverageCommandSettings), typeof(Profiler.TakePreciseCoverageCommandResponse) }, - { typeof(Profiler.TakeTypeProfileCommandSettings), typeof(Profiler.TakeTypeProfileCommandResponse) }, - { typeof(Runtime.AwaitPromiseCommandSettings), typeof(Runtime.AwaitPromiseCommandResponse) }, - { typeof(Runtime.CallFunctionOnCommandSettings), typeof(Runtime.CallFunctionOnCommandResponse) }, - { typeof(Runtime.CompileScriptCommandSettings), typeof(Runtime.CompileScriptCommandResponse) }, - { typeof(Runtime.DisableCommandSettings), typeof(Runtime.DisableCommandResponse) }, - { typeof(Runtime.DiscardConsoleEntriesCommandSettings), typeof(Runtime.DiscardConsoleEntriesCommandResponse) }, - { typeof(Runtime.EnableCommandSettings), typeof(Runtime.EnableCommandResponse) }, - { typeof(Runtime.EvaluateCommandSettings), typeof(Runtime.EvaluateCommandResponse) }, - { typeof(Runtime.GetIsolateIdCommandSettings), typeof(Runtime.GetIsolateIdCommandResponse) }, - { typeof(Runtime.GetHeapUsageCommandSettings), typeof(Runtime.GetHeapUsageCommandResponse) }, - { typeof(Runtime.GetPropertiesCommandSettings), typeof(Runtime.GetPropertiesCommandResponse) }, - { typeof(Runtime.GlobalLexicalScopeNamesCommandSettings), typeof(Runtime.GlobalLexicalScopeNamesCommandResponse) }, - { typeof(Runtime.QueryObjectsCommandSettings), typeof(Runtime.QueryObjectsCommandResponse) }, - { typeof(Runtime.ReleaseObjectCommandSettings), typeof(Runtime.ReleaseObjectCommandResponse) }, - { typeof(Runtime.ReleaseObjectGroupCommandSettings), typeof(Runtime.ReleaseObjectGroupCommandResponse) }, - { typeof(Runtime.RunIfWaitingForDebuggerCommandSettings), typeof(Runtime.RunIfWaitingForDebuggerCommandResponse) }, - { typeof(Runtime.RunScriptCommandSettings), typeof(Runtime.RunScriptCommandResponse) }, - { typeof(Runtime.SetAsyncCallStackDepthCommandSettings), typeof(Runtime.SetAsyncCallStackDepthCommandResponse) }, - { typeof(Runtime.SetCustomObjectFormatterEnabledCommandSettings), typeof(Runtime.SetCustomObjectFormatterEnabledCommandResponse) }, - { typeof(Runtime.SetMaxCallStackSizeToCaptureCommandSettings), typeof(Runtime.SetMaxCallStackSizeToCaptureCommandResponse) }, - { typeof(Runtime.TerminateExecutionCommandSettings), typeof(Runtime.TerminateExecutionCommandResponse) }, - { typeof(Runtime.AddBindingCommandSettings), typeof(Runtime.AddBindingCommandResponse) }, - { typeof(Runtime.RemoveBindingCommandSettings), typeof(Runtime.RemoveBindingCommandResponse) }, - { typeof(Schema.GetDomainsCommandSettings), typeof(Schema.GetDomainsCommandResponse) }, - }; - } - - /// - /// Gets the command response type corresponding to the specified command type - /// - public static bool TryGetCommandResponseType(out Type commandResponseType) - where T : ICommand - { - return s_commandResponseTypeDictionary.TryGetValue(typeof(T), out commandResponseType); - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Console/ClearMessagesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Console/ClearMessagesCommand.cs deleted file mode 100644 index b5a072565682c..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Console/ClearMessagesCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Console -{ - using Newtonsoft.Json; - - /// - /// Does nothing. - /// - public sealed class ClearMessagesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Console.clearMessages"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class ClearMessagesCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Console/ConsoleAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Console/ConsoleAdapter.cs deleted file mode 100644 index 00e81002849f7..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Console/ConsoleAdapter.cs +++ /dev/null @@ -1,82 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Console -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the Console domain to simplify the command interface. - /// - public class ConsoleAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "Console"; - private Dictionary m_eventMap = new Dictionary(); - - public ConsoleAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - m_eventMap["messageAdded"] = new DevToolsEventData(typeof(MessageAddedEventArgs), OnMessageAdded); - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - /// - /// Issued when new console message is added. - /// - public event EventHandler MessageAdded; - - /// - /// Does nothing. - /// - public async Task ClearMessages(ClearMessagesCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new ClearMessagesCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Disables console domain, prevents further console messages from being reported to the client. - /// - public async Task Disable(DisableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new DisableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enables console domain, sends the messages collected so far to the client by means of the - /// `messageAdded` notification. - /// - public async Task Enable(EnableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new EnableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - private void OnMessageAdded(object rawEventArgs) - { - MessageAddedEventArgs e = rawEventArgs as MessageAddedEventArgs; - if (e != null && MessageAdded != null) - { - MessageAdded(this, e); - } - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Console/ConsoleMessage.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Console/ConsoleMessage.cs deleted file mode 100644 index 9d565c427f4e4..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Console/ConsoleMessage.cs +++ /dev/null @@ -1,65 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Console -{ - using Newtonsoft.Json; - - /// - /// Console message. - /// - public sealed class ConsoleMessage - { - /// - /// Message source. - /// - [JsonProperty("source")] - public string Source - { - get; - set; - } - /// - /// Message severity. - /// - [JsonProperty("level")] - public string Level - { - get; - set; - } - /// - /// Message text. - /// - [JsonProperty("text")] - public string Text - { - get; - set; - } - /// - /// URL of the message origin. - /// - [JsonProperty("url", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Url - { - get; - set; - } - /// - /// Line number in the resource that generated this message (1-based). - /// - [JsonProperty("line", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Line - { - get; - set; - } - /// - /// Column number in the resource that generated this message (1-based). - /// - [JsonProperty("column", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Column - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Console/DisableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Console/DisableCommand.cs deleted file mode 100644 index 479eaaf4d360f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Console/DisableCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Console -{ - using Newtonsoft.Json; - - /// - /// Disables console domain, prevents further console messages from being reported to the client. - /// - public sealed class DisableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Console.disable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class DisableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Console/EnableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Console/EnableCommand.cs deleted file mode 100644 index 498a0b03b8412..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Console/EnableCommand.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Console -{ - using Newtonsoft.Json; - - /// - /// Enables console domain, sends the messages collected so far to the client by means of the - /// `messageAdded` notification. - /// - public sealed class EnableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Console.enable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class EnableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Console/MessageAddedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Console/MessageAddedEventArgs.cs deleted file mode 100644 index 9b1ddcdc7c15c..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Console/MessageAddedEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Console -{ - using System; - using Newtonsoft.Json; - - /// - /// Issued when new console message is added. - /// - public sealed class MessageAddedEventArgs : EventArgs - { - /// - /// Console message that has been added. - /// - [JsonProperty("message")] - public ConsoleMessage Message - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/AttributeModifiedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/AttributeModifiedEventArgs.cs deleted file mode 100644 index a0366667fa980..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/AttributeModifiedEventArgs.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when `Element`'s attribute is modified. - /// - public sealed class AttributeModifiedEventArgs : EventArgs - { - /// - /// Id of the node that has changed. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// Attribute name. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// Attribute value. - /// - [JsonProperty("value")] - public string Value - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/AttributeRemovedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/AttributeRemovedEventArgs.cs deleted file mode 100644 index 19b1b312806b4..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/AttributeRemovedEventArgs.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when `Element`'s attribute is removed. - /// - public sealed class AttributeRemovedEventArgs : EventArgs - { - /// - /// Id of the node that has changed. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// A ttribute name. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/BackendNode.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/BackendNode.cs deleted file mode 100644 index 4ca5a5745eca0..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/BackendNode.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Backend node with a friendly name. - /// - public sealed class BackendNode - { - /// - /// `Node`'s nodeType. - /// - [JsonProperty("nodeType")] - public long NodeType - { - get; - set; - } - /// - /// `Node`'s nodeName. - /// - [JsonProperty("nodeName")] - public string NodeName - { - get; - set; - } - /// - /// backendNodeId - /// - [JsonProperty("backendNodeId")] - public long BackendNodeId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/BoxModel.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/BoxModel.cs deleted file mode 100644 index 7cd82f535ce75..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/BoxModel.cs +++ /dev/null @@ -1,74 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Box model. - /// - public sealed class BoxModel - { - /// - /// Content box - /// - [JsonProperty("content")] - public double[] Content - { - get; - set; - } - /// - /// Padding box - /// - [JsonProperty("padding")] - public double[] Padding - { - get; - set; - } - /// - /// Border box - /// - [JsonProperty("border")] - public double[] Border - { - get; - set; - } - /// - /// Margin box - /// - [JsonProperty("margin")] - public double[] Margin - { - get; - set; - } - /// - /// Node width - /// - [JsonProperty("width")] - public long Width - { - get; - set; - } - /// - /// Node height - /// - [JsonProperty("height")] - public long Height - { - get; - set; - } - /// - /// Shape outside coordinates - /// - [JsonProperty("shapeOutside", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ShapeOutsideInfo ShapeOutside - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/CharacterDataModifiedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/CharacterDataModifiedEventArgs.cs deleted file mode 100644 index c7906d136781d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/CharacterDataModifiedEventArgs.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using System; - using Newtonsoft.Json; - - /// - /// Mirrors `DOMCharacterDataModified` event. - /// - public sealed class CharacterDataModifiedEventArgs : EventArgs - { - /// - /// Id of the node that has changed. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// New text value. - /// - [JsonProperty("characterData")] - public string CharacterData - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ChildNodeCountUpdatedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ChildNodeCountUpdatedEventArgs.cs deleted file mode 100644 index 370313e46506b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ChildNodeCountUpdatedEventArgs.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when `Container`'s child node count has changed. - /// - public sealed class ChildNodeCountUpdatedEventArgs : EventArgs - { - /// - /// Id of the node that has changed. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// New node count. - /// - [JsonProperty("childNodeCount")] - public long ChildNodeCount - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ChildNodeInsertedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ChildNodeInsertedEventArgs.cs deleted file mode 100644 index 2d2ce315ff55e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ChildNodeInsertedEventArgs.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using System; - using Newtonsoft.Json; - - /// - /// Mirrors `DOMNodeInserted` event. - /// - public sealed class ChildNodeInsertedEventArgs : EventArgs - { - /// - /// Id of the node that has changed. - /// - [JsonProperty("parentNodeId")] - public long ParentNodeId - { - get; - set; - } - /// - /// If of the previous siblint. - /// - [JsonProperty("previousNodeId")] - public long PreviousNodeId - { - get; - set; - } - /// - /// Inserted node data. - /// - [JsonProperty("node")] - public Node Node - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ChildNodeRemovedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ChildNodeRemovedEventArgs.cs deleted file mode 100644 index b1c1ec70a8f67..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ChildNodeRemovedEventArgs.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using System; - using Newtonsoft.Json; - - /// - /// Mirrors `DOMNodeRemoved` event. - /// - public sealed class ChildNodeRemovedEventArgs : EventArgs - { - /// - /// Parent id. - /// - [JsonProperty("parentNodeId")] - public long ParentNodeId - { - get; - set; - } - /// - /// Id of the node that has been removed. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/CollectClassNamesFromSubtreeCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/CollectClassNamesFromSubtreeCommand.cs deleted file mode 100644 index b63d60f2db2ba..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/CollectClassNamesFromSubtreeCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Collects class names for the node with given id and all of it's child nodes. - /// - public sealed class CollectClassNamesFromSubtreeCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.collectClassNamesFromSubtree"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the node to collect class names. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - } - - public sealed class CollectClassNamesFromSubtreeCommandResponse : ICommandResponse - { - /// - /// Class name list. - /// - [JsonProperty("classNames")] - public string[] ClassNames - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/CopyToCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/CopyToCommand.cs deleted file mode 100644 index 7bcc4afafa5e7..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/CopyToCommand.cs +++ /dev/null @@ -1,61 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Creates a deep copy of the specified node and places it into the target container before the - /// given anchor. - /// - public sealed class CopyToCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.copyTo"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the node to copy. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// Id of the element to drop the copy into. - /// - [JsonProperty("targetNodeId")] - public long TargetNodeId - { - get; - set; - } - /// - /// Drop the copy before this node (if absent, the copy becomes the last child of - /// `targetNodeId`). - /// - [JsonProperty("insertBeforeNodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? InsertBeforeNodeId - { - get; - set; - } - } - - public sealed class CopyToCommandResponse : ICommandResponse - { - /// - /// Id of the node clone. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DOMAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DOMAdapter.cs deleted file mode 100644 index 98aeafb6925eb..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DOMAdapter.cs +++ /dev/null @@ -1,538 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the DOM domain to simplify the command interface. - /// - public class DOMAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "DOM"; - private Dictionary m_eventMap = new Dictionary(); - - public DOMAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - m_eventMap["attributeModified"] = new DevToolsEventData(typeof(AttributeModifiedEventArgs), OnAttributeModified); - m_eventMap["attributeRemoved"] = new DevToolsEventData(typeof(AttributeRemovedEventArgs), OnAttributeRemoved); - m_eventMap["characterDataModified"] = new DevToolsEventData(typeof(CharacterDataModifiedEventArgs), OnCharacterDataModified); - m_eventMap["childNodeCountUpdated"] = new DevToolsEventData(typeof(ChildNodeCountUpdatedEventArgs), OnChildNodeCountUpdated); - m_eventMap["childNodeInserted"] = new DevToolsEventData(typeof(ChildNodeInsertedEventArgs), OnChildNodeInserted); - m_eventMap["childNodeRemoved"] = new DevToolsEventData(typeof(ChildNodeRemovedEventArgs), OnChildNodeRemoved); - m_eventMap["distributedNodesUpdated"] = new DevToolsEventData(typeof(DistributedNodesUpdatedEventArgs), OnDistributedNodesUpdated); - m_eventMap["documentUpdated"] = new DevToolsEventData(typeof(DocumentUpdatedEventArgs), OnDocumentUpdated); - m_eventMap["inlineStyleInvalidated"] = new DevToolsEventData(typeof(InlineStyleInvalidatedEventArgs), OnInlineStyleInvalidated); - m_eventMap["pseudoElementAdded"] = new DevToolsEventData(typeof(PseudoElementAddedEventArgs), OnPseudoElementAdded); - m_eventMap["pseudoElementRemoved"] = new DevToolsEventData(typeof(PseudoElementRemovedEventArgs), OnPseudoElementRemoved); - m_eventMap["setChildNodes"] = new DevToolsEventData(typeof(SetChildNodesEventArgs), OnSetChildNodes); - m_eventMap["shadowRootPopped"] = new DevToolsEventData(typeof(ShadowRootPoppedEventArgs), OnShadowRootPopped); - m_eventMap["shadowRootPushed"] = new DevToolsEventData(typeof(ShadowRootPushedEventArgs), OnShadowRootPushed); - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - /// - /// Fired when `Element`'s attribute is modified. - /// - public event EventHandler AttributeModified; - /// - /// Fired when `Element`'s attribute is removed. - /// - public event EventHandler AttributeRemoved; - /// - /// Mirrors `DOMCharacterDataModified` event. - /// - public event EventHandler CharacterDataModified; - /// - /// Fired when `Container`'s child node count has changed. - /// - public event EventHandler ChildNodeCountUpdated; - /// - /// Mirrors `DOMNodeInserted` event. - /// - public event EventHandler ChildNodeInserted; - /// - /// Mirrors `DOMNodeRemoved` event. - /// - public event EventHandler ChildNodeRemoved; - /// - /// Called when distrubution is changed. - /// - public event EventHandler DistributedNodesUpdated; - /// - /// Fired when `Document` has been totally updated. Node ids are no longer valid. - /// - public event EventHandler DocumentUpdated; - /// - /// Fired when `Element`'s inline style is modified via a CSS property modification. - /// - public event EventHandler InlineStyleInvalidated; - /// - /// Called when a pseudo element is added to an element. - /// - public event EventHandler PseudoElementAdded; - /// - /// Called when a pseudo element is removed from an element. - /// - public event EventHandler PseudoElementRemoved; - /// - /// Fired when backend wants to provide client with the missing DOM structure. This happens upon - /// most of the calls requesting node ids. - /// - public event EventHandler SetChildNodes; - /// - /// Called when shadow root is popped from the element. - /// - public event EventHandler ShadowRootPopped; - /// - /// Called when shadow root is pushed into the element. - /// - public event EventHandler ShadowRootPushed; - - /// - /// Collects class names for the node with given id and all of it's child nodes. - /// - public async Task CollectClassNamesFromSubtree(CollectClassNamesFromSubtreeCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Creates a deep copy of the specified node and places it into the target container before the - /// given anchor. - /// - public async Task CopyTo(CopyToCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Describes node given its id, does not require domain to be enabled. Does not start tracking any - /// objects, can be used for automation. - /// - public async Task DescribeNode(DescribeNodeCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Disables DOM agent for the given page. - /// - public async Task Disable(DisableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new DisableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Discards search results from the session with the given id. `getSearchResults` should no longer - /// be called for that search. - /// - public async Task DiscardSearchResults(DiscardSearchResultsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enables DOM agent for the given page. - /// - public async Task Enable(EnableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new EnableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Focuses the given element. - /// - public async Task Focus(FocusCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns attributes for the specified node. - /// - public async Task GetAttributes(GetAttributesCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns boxes for the given node. - /// - public async Task GetBoxModel(GetBoxModelCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns quads that describe node position on the page. This method - /// might return multiple quads for inline nodes. - /// - public async Task GetContentQuads(GetContentQuadsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns the root DOM node (and optionally the subtree) to the caller. - /// - public async Task GetDocument(GetDocumentCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns the root DOM node (and optionally the subtree) to the caller. - /// - public async Task GetFlattenedDocument(GetFlattenedDocumentCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is - /// either returned or not. - /// - public async Task GetNodeForLocation(GetNodeForLocationCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns node's HTML markup. - /// - public async Task GetOuterHTML(GetOuterHTMLCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns the id of the nearest ancestor that is a relayout boundary. - /// - public async Task GetRelayoutBoundary(GetRelayoutBoundaryCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns search results from given `fromIndex` to given `toIndex` from the search with the given - /// identifier. - /// - public async Task GetSearchResults(GetSearchResultsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Hides any highlight. - /// - public async Task HideHighlight(HideHighlightCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new HideHighlightCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Highlights DOM node. - /// - public async Task HighlightNode(HighlightNodeCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new HighlightNodeCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Highlights given rectangle. - /// - public async Task HighlightRect(HighlightRectCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new HighlightRectCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Marks last undoable state. - /// - public async Task MarkUndoableState(MarkUndoableStateCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new MarkUndoableStateCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Moves node into the new container, places it before the given anchor. - /// - public async Task MoveTo(MoveToCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or - /// `cancelSearch` to end this search session. - /// - public async Task PerformSearch(PerformSearchCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Requests that the node is sent to the caller given its path. // FIXME, use XPath - /// - public async Task PushNodeByPathToFrontend(PushNodeByPathToFrontendCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Requests that a batch of nodes is sent to the caller given their backend node ids. - /// - public async Task PushNodesByBackendIdsToFrontend(PushNodesByBackendIdsToFrontendCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Executes `querySelector` on a given node. - /// - public async Task QuerySelector(QuerySelectorCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Executes `querySelectorAll` on a given node. - /// - public async Task QuerySelectorAll(QuerySelectorAllCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Re-does the last undone action. - /// - public async Task Redo(RedoCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new RedoCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Removes attribute with given name from an element with given id. - /// - public async Task RemoveAttribute(RemoveAttributeCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Removes node with given id. - /// - public async Task RemoveNode(RemoveNodeCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Requests that children of the node with given id are returned to the caller in form of - /// `setChildNodes` events where not only immediate children are retrieved, but all children down to - /// the specified depth. - /// - public async Task RequestChildNodes(RequestChildNodesCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Requests that the node is sent to the caller given the JavaScript node object reference. All - /// nodes that form the path from the node to the root are also sent to the client as a series of - /// `setChildNodes` notifications. - /// - public async Task RequestNode(RequestNodeCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Resolves the JavaScript node object for a given NodeId or BackendNodeId. - /// - public async Task ResolveNode(ResolveNodeCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets attribute for an element with given id. - /// - public async Task SetAttributeValue(SetAttributeValueCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets attributes on element with given id. This method is useful when user edits some existing - /// attribute value and types in several attribute name/value pairs. - /// - public async Task SetAttributesAsText(SetAttributesAsTextCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets files for the given file input element. - /// - public async Task SetFileInputFiles(SetFileInputFilesCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns file information for the given - /// File wrapper. - /// - public async Task GetFileInfo(GetFileInfoCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enables console to refer to the node with given id via $x (see Command Line API for more details - /// $x functions). - /// - public async Task SetInspectedNode(SetInspectedNodeCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets node name for a node with given id. - /// - public async Task SetNodeName(SetNodeNameCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets node value for a node with given id. - /// - public async Task SetNodeValue(SetNodeValueCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets node HTML markup, returns new node id. - /// - public async Task SetOuterHTML(SetOuterHTMLCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Undoes the last performed action. - /// - public async Task Undo(UndoCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new UndoCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns iframe node that owns iframe with the given domain. - /// - public async Task GetFrameOwner(GetFrameOwnerCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - private void OnAttributeModified(object rawEventArgs) - { - AttributeModifiedEventArgs e = rawEventArgs as AttributeModifiedEventArgs; - if (e != null && AttributeModified != null) - { - AttributeModified(this, e); - } - } - private void OnAttributeRemoved(object rawEventArgs) - { - AttributeRemovedEventArgs e = rawEventArgs as AttributeRemovedEventArgs; - if (e != null && AttributeRemoved != null) - { - AttributeRemoved(this, e); - } - } - private void OnCharacterDataModified(object rawEventArgs) - { - CharacterDataModifiedEventArgs e = rawEventArgs as CharacterDataModifiedEventArgs; - if (e != null && CharacterDataModified != null) - { - CharacterDataModified(this, e); - } - } - private void OnChildNodeCountUpdated(object rawEventArgs) - { - ChildNodeCountUpdatedEventArgs e = rawEventArgs as ChildNodeCountUpdatedEventArgs; - if (e != null && ChildNodeCountUpdated != null) - { - ChildNodeCountUpdated(this, e); - } - } - private void OnChildNodeInserted(object rawEventArgs) - { - ChildNodeInsertedEventArgs e = rawEventArgs as ChildNodeInsertedEventArgs; - if (e != null && ChildNodeInserted != null) - { - ChildNodeInserted(this, e); - } - } - private void OnChildNodeRemoved(object rawEventArgs) - { - ChildNodeRemovedEventArgs e = rawEventArgs as ChildNodeRemovedEventArgs; - if (e != null && ChildNodeRemoved != null) - { - ChildNodeRemoved(this, e); - } - } - private void OnDistributedNodesUpdated(object rawEventArgs) - { - DistributedNodesUpdatedEventArgs e = rawEventArgs as DistributedNodesUpdatedEventArgs; - if (e != null && DistributedNodesUpdated != null) - { - DistributedNodesUpdated(this, e); - } - } - private void OnDocumentUpdated(object rawEventArgs) - { - DocumentUpdatedEventArgs e = rawEventArgs as DocumentUpdatedEventArgs; - if (e != null && DocumentUpdated != null) - { - DocumentUpdated(this, e); - } - } - private void OnInlineStyleInvalidated(object rawEventArgs) - { - InlineStyleInvalidatedEventArgs e = rawEventArgs as InlineStyleInvalidatedEventArgs; - if (e != null && InlineStyleInvalidated != null) - { - InlineStyleInvalidated(this, e); - } - } - private void OnPseudoElementAdded(object rawEventArgs) - { - PseudoElementAddedEventArgs e = rawEventArgs as PseudoElementAddedEventArgs; - if (e != null && PseudoElementAdded != null) - { - PseudoElementAdded(this, e); - } - } - private void OnPseudoElementRemoved(object rawEventArgs) - { - PseudoElementRemovedEventArgs e = rawEventArgs as PseudoElementRemovedEventArgs; - if (e != null && PseudoElementRemoved != null) - { - PseudoElementRemoved(this, e); - } - } - private void OnSetChildNodes(object rawEventArgs) - { - SetChildNodesEventArgs e = rawEventArgs as SetChildNodesEventArgs; - if (e != null && SetChildNodes != null) - { - SetChildNodes(this, e); - } - } - private void OnShadowRootPopped(object rawEventArgs) - { - ShadowRootPoppedEventArgs e = rawEventArgs as ShadowRootPoppedEventArgs; - if (e != null && ShadowRootPopped != null) - { - ShadowRootPopped(this, e); - } - } - private void OnShadowRootPushed(object rawEventArgs) - { - ShadowRootPushedEventArgs e = rawEventArgs as ShadowRootPushedEventArgs; - if (e != null && ShadowRootPushed != null) - { - ShadowRootPushed(this, e); - } - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DescribeNodeCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DescribeNodeCommand.cs deleted file mode 100644 index 730804822f38d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DescribeNodeCommand.cs +++ /dev/null @@ -1,80 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Describes node given its id, does not require domain to be enabled. Does not start tracking any - /// objects, can be used for automation. - /// - public sealed class DescribeNodeCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.describeNode"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier of the node. - /// - [JsonProperty("nodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? NodeId - { - get; - set; - } - /// - /// Identifier of the backend node. - /// - [JsonProperty("backendNodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? BackendNodeId - { - get; - set; - } - /// - /// JavaScript object id of the node wrapper. - /// - [JsonProperty("objectId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ObjectId - { - get; - set; - } - /// - /// The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the - /// entire subtree or provide an integer larger than 0. - /// - [JsonProperty("depth", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Depth - { - get; - set; - } - /// - /// Whether or not iframes and shadow roots should be traversed when returning the subtree - /// (default is false). - /// - [JsonProperty("pierce", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Pierce - { - get; - set; - } - } - - public sealed class DescribeNodeCommandResponse : ICommandResponse - { - /// - /// Node description. - /// - [JsonProperty("node")] - public Node Node - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DisableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DisableCommand.cs deleted file mode 100644 index c0f170d285b1b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DisableCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Disables DOM agent for the given page. - /// - public sealed class DisableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.disable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class DisableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DiscardSearchResultsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DiscardSearchResultsCommand.cs deleted file mode 100644 index 870df5e9523e4..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DiscardSearchResultsCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Discards search results from the session with the given id. `getSearchResults` should no longer - /// be called for that search. - /// - public sealed class DiscardSearchResultsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.discardSearchResults"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Unique search session identifier. - /// - [JsonProperty("searchId")] - public string SearchId - { - get; - set; - } - } - - public sealed class DiscardSearchResultsCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DistributedNodesUpdatedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DistributedNodesUpdatedEventArgs.cs deleted file mode 100644 index 9838327a8cd8a..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DistributedNodesUpdatedEventArgs.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using System; - using Newtonsoft.Json; - - /// - /// Called when distrubution is changed. - /// - public sealed class DistributedNodesUpdatedEventArgs : EventArgs - { - /// - /// Insertion point where distrubuted nodes were updated. - /// - [JsonProperty("insertionPointId")] - public long InsertionPointId - { - get; - set; - } - /// - /// Distributed nodes for given insertion point. - /// - [JsonProperty("distributedNodes")] - public BackendNode[] DistributedNodes - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DocumentUpdatedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DocumentUpdatedEventArgs.cs deleted file mode 100644 index 45771d2ea0d53..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/DocumentUpdatedEventArgs.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when `Document` has been totally updated. Node ids are no longer valid. - /// - public sealed class DocumentUpdatedEventArgs : EventArgs - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/EnableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/EnableCommand.cs deleted file mode 100644 index 653428acec6ee..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/EnableCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Enables DOM agent for the given page. - /// - public sealed class EnableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.enable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class EnableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/FocusCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/FocusCommand.cs deleted file mode 100644 index db098dd98dc62..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/FocusCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Focuses the given element. - /// - public sealed class FocusCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.focus"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier of the node. - /// - [JsonProperty("nodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? NodeId - { - get; - set; - } - /// - /// Identifier of the backend node. - /// - [JsonProperty("backendNodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? BackendNodeId - { - get; - set; - } - /// - /// JavaScript object id of the node wrapper. - /// - [JsonProperty("objectId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ObjectId - { - get; - set; - } - } - - public sealed class FocusCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetAttributesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetAttributesCommand.cs deleted file mode 100644 index d553160963976..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetAttributesCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Returns attributes for the specified node. - /// - public sealed class GetAttributesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.getAttributes"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the node to retrieve attibutes for. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - } - - public sealed class GetAttributesCommandResponse : ICommandResponse - { - /// - /// An interleaved array of node attribute names and values. - /// - [JsonProperty("attributes")] - public string[] Attributes - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetBoxModelCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetBoxModelCommand.cs deleted file mode 100644 index ab9b2797f134d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetBoxModelCommand.cs +++ /dev/null @@ -1,59 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Returns boxes for the given node. - /// - public sealed class GetBoxModelCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.getBoxModel"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier of the node. - /// - [JsonProperty("nodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? NodeId - { - get; - set; - } - /// - /// Identifier of the backend node. - /// - [JsonProperty("backendNodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? BackendNodeId - { - get; - set; - } - /// - /// JavaScript object id of the node wrapper. - /// - [JsonProperty("objectId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ObjectId - { - get; - set; - } - } - - public sealed class GetBoxModelCommandResponse : ICommandResponse - { - /// - /// Box model for the node. - /// - [JsonProperty("model")] - public BoxModel Model - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetContentQuadsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetContentQuadsCommand.cs deleted file mode 100644 index b2a57d9335115..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetContentQuadsCommand.cs +++ /dev/null @@ -1,60 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Returns quads that describe node position on the page. This method - /// might return multiple quads for inline nodes. - /// - public sealed class GetContentQuadsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.getContentQuads"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier of the node. - /// - [JsonProperty("nodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? NodeId - { - get; - set; - } - /// - /// Identifier of the backend node. - /// - [JsonProperty("backendNodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? BackendNodeId - { - get; - set; - } - /// - /// JavaScript object id of the node wrapper. - /// - [JsonProperty("objectId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ObjectId - { - get; - set; - } - } - - public sealed class GetContentQuadsCommandResponse : ICommandResponse - { - /// - /// Quads that describe node layout relative to viewport. - /// - [JsonProperty("quads")] - public double[][] Quads - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetDocumentCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetDocumentCommand.cs deleted file mode 100644 index a1be8b1a1be64..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetDocumentCommand.cs +++ /dev/null @@ -1,52 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Returns the root DOM node (and optionally the subtree) to the caller. - /// - public sealed class GetDocumentCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.getDocument"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the - /// entire subtree or provide an integer larger than 0. - /// - [JsonProperty("depth", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Depth - { - get; - set; - } - /// - /// Whether or not iframes and shadow roots should be traversed when returning the subtree - /// (default is false). - /// - [JsonProperty("pierce", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Pierce - { - get; - set; - } - } - - public sealed class GetDocumentCommandResponse : ICommandResponse - { - /// - /// Resulting node. - /// - [JsonProperty("root")] - public Node Root - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetFileInfoCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetFileInfoCommand.cs deleted file mode 100644 index 03554d269b6d7..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetFileInfoCommand.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Returns file information for the given - /// File wrapper. - /// - public sealed class GetFileInfoCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.getFileInfo"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// JavaScript object id of the node wrapper. - /// - [JsonProperty("objectId")] - public string ObjectId - { - get; - set; - } - } - - public sealed class GetFileInfoCommandResponse : ICommandResponse - { - /// - /// Gets or sets the path - /// - [JsonProperty("path")] - public string Path - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetFlattenedDocumentCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetFlattenedDocumentCommand.cs deleted file mode 100644 index 741437e0546af..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetFlattenedDocumentCommand.cs +++ /dev/null @@ -1,52 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Returns the root DOM node (and optionally the subtree) to the caller. - /// - public sealed class GetFlattenedDocumentCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.getFlattenedDocument"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the - /// entire subtree or provide an integer larger than 0. - /// - [JsonProperty("depth", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Depth - { - get; - set; - } - /// - /// Whether or not iframes and shadow roots should be traversed when returning the subtree - /// (default is false). - /// - [JsonProperty("pierce", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Pierce - { - get; - set; - } - } - - public sealed class GetFlattenedDocumentCommandResponse : ICommandResponse - { - /// - /// Resulting node. - /// - [JsonProperty("nodes")] - public Node[] Nodes - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetFrameOwnerCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetFrameOwnerCommand.cs deleted file mode 100644 index 8fd109cae47d3..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetFrameOwnerCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Returns iframe node that owns iframe with the given domain. - /// - public sealed class GetFrameOwnerCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.getFrameOwner"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the frameId - /// - [JsonProperty("frameId")] - public string FrameId - { - get; - set; - } - } - - public sealed class GetFrameOwnerCommandResponse : ICommandResponse - { - /// - /// Resulting node. - /// - [JsonProperty("backendNodeId")] - public long BackendNodeId - { - get; - set; - } - /// - /// Id of the node at given coordinates, only when enabled and requested document. - /// - [JsonProperty("nodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? NodeId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetNodeForLocationCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetNodeForLocationCommand.cs deleted file mode 100644 index d27f374a78764..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetNodeForLocationCommand.cs +++ /dev/null @@ -1,69 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is - /// either returned or not. - /// - public sealed class GetNodeForLocationCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.getNodeForLocation"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// X coordinate. - /// - [JsonProperty("x")] - public long X - { - get; - set; - } - /// - /// Y coordinate. - /// - [JsonProperty("y")] - public long Y - { - get; - set; - } - /// - /// False to skip to the nearest non-UA shadow root ancestor (default: false). - /// - [JsonProperty("includeUserAgentShadowDOM", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IncludeUserAgentShadowDOM - { - get; - set; - } - } - - public sealed class GetNodeForLocationCommandResponse : ICommandResponse - { - /// - /// Resulting node. - /// - [JsonProperty("backendNodeId")] - public long BackendNodeId - { - get; - set; - } - /// - /// Id of the node at given coordinates, only when enabled and requested document. - /// - [JsonProperty("nodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? NodeId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetOuterHTMLCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetOuterHTMLCommand.cs deleted file mode 100644 index 902ccea70dd69..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetOuterHTMLCommand.cs +++ /dev/null @@ -1,59 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Returns node's HTML markup. - /// - public sealed class GetOuterHTMLCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.getOuterHTML"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier of the node. - /// - [JsonProperty("nodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? NodeId - { - get; - set; - } - /// - /// Identifier of the backend node. - /// - [JsonProperty("backendNodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? BackendNodeId - { - get; - set; - } - /// - /// JavaScript object id of the node wrapper. - /// - [JsonProperty("objectId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ObjectId - { - get; - set; - } - } - - public sealed class GetOuterHTMLCommandResponse : ICommandResponse - { - /// - /// Outer HTML markup. - /// - [JsonProperty("outerHTML")] - public string OuterHTML - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetRelayoutBoundaryCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetRelayoutBoundaryCommand.cs deleted file mode 100644 index 9384e9d15a435..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetRelayoutBoundaryCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Returns the id of the nearest ancestor that is a relayout boundary. - /// - public sealed class GetRelayoutBoundaryCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.getRelayoutBoundary"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the node. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - } - - public sealed class GetRelayoutBoundaryCommandResponse : ICommandResponse - { - /// - /// Relayout boundary node id for the given node. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetSearchResultsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetSearchResultsCommand.cs deleted file mode 100644 index b137e01370b57..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/GetSearchResultsCommand.cs +++ /dev/null @@ -1,60 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Returns search results from given `fromIndex` to given `toIndex` from the search with the given - /// identifier. - /// - public sealed class GetSearchResultsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.getSearchResults"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Unique search session identifier. - /// - [JsonProperty("searchId")] - public string SearchId - { - get; - set; - } - /// - /// Start index of the search result to be returned. - /// - [JsonProperty("fromIndex")] - public long FromIndex - { - get; - set; - } - /// - /// End index of the search result to be returned. - /// - [JsonProperty("toIndex")] - public long ToIndex - { - get; - set; - } - } - - public sealed class GetSearchResultsCommandResponse : ICommandResponse - { - /// - /// Ids of the search result nodes. - /// - [JsonProperty("nodeIds")] - public long[] NodeIds - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/HideHighlightCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/HideHighlightCommand.cs deleted file mode 100644 index fb43a34905a36..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/HideHighlightCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Hides any highlight. - /// - public sealed class HideHighlightCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.hideHighlight"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class HideHighlightCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/HighlightNodeCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/HighlightNodeCommand.cs deleted file mode 100644 index 91f3b7a4f490b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/HighlightNodeCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Highlights DOM node. - /// - public sealed class HighlightNodeCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.highlightNode"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class HighlightNodeCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/HighlightRectCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/HighlightRectCommand.cs deleted file mode 100644 index 7a1305f6c1c6b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/HighlightRectCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Highlights given rectangle. - /// - public sealed class HighlightRectCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.highlightRect"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class HighlightRectCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/InlineStyleInvalidatedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/InlineStyleInvalidatedEventArgs.cs deleted file mode 100644 index 0132b8e3e4360..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/InlineStyleInvalidatedEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when `Element`'s inline style is modified via a CSS property modification. - /// - public sealed class InlineStyleInvalidatedEventArgs : EventArgs - { - /// - /// Ids of the nodes for which the inline styles have been invalidated. - /// - [JsonProperty("nodeIds")] - public long[] NodeIds - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/MarkUndoableStateCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/MarkUndoableStateCommand.cs deleted file mode 100644 index 62942ee695bd8..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/MarkUndoableStateCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Marks last undoable state. - /// - public sealed class MarkUndoableStateCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.markUndoableState"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class MarkUndoableStateCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/MoveToCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/MoveToCommand.cs deleted file mode 100644 index 4da352c9274bd..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/MoveToCommand.cs +++ /dev/null @@ -1,60 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Moves node into the new container, places it before the given anchor. - /// - public sealed class MoveToCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.moveTo"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the node to move. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// Id of the element to drop the moved node into. - /// - [JsonProperty("targetNodeId")] - public long TargetNodeId - { - get; - set; - } - /// - /// Drop node before this one (if absent, the moved node becomes the last child of - /// `targetNodeId`). - /// - [JsonProperty("insertBeforeNodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? InsertBeforeNodeId - { - get; - set; - } - } - - public sealed class MoveToCommandResponse : ICommandResponse - { - /// - /// New id of the moved node. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/Node.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/Node.cs deleted file mode 100644 index 09bc3a5e27f48..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/Node.cs +++ /dev/null @@ -1,266 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. - /// DOMNode is a base node mirror type. - /// - public sealed class Node - { - /// - /// Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend - /// will only push node with given `id` once. It is aware of all requested nodes and will only - /// fire DOM events for nodes known to the client. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// The id of the parent node if any. - /// - [JsonProperty("parentId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ParentId - { - get; - set; - } - /// - /// The BackendNodeId for this node. - /// - [JsonProperty("backendNodeId")] - public long BackendNodeId - { - get; - set; - } - /// - /// `Node`'s nodeType. - /// - [JsonProperty("nodeType")] - public long NodeType - { - get; - set; - } - /// - /// `Node`'s nodeName. - /// - [JsonProperty("nodeName")] - public string NodeName - { - get; - set; - } - /// - /// `Node`'s localName. - /// - [JsonProperty("localName")] - public string LocalName - { - get; - set; - } - /// - /// `Node`'s nodeValue. - /// - [JsonProperty("nodeValue")] - public string NodeValue - { - get; - set; - } - /// - /// Child count for `Container` nodes. - /// - [JsonProperty("childNodeCount", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ChildNodeCount - { - get; - set; - } - /// - /// Child nodes of this node when requested with children. - /// - [JsonProperty("children", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Node[] Children - { - get; - set; - } - /// - /// Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`. - /// - [JsonProperty("attributes", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string[] Attributes - { - get; - set; - } - /// - /// Document URL that `Document` or `FrameOwner` node points to. - /// - [JsonProperty("documentURL", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string DocumentURL - { - get; - set; - } - /// - /// Base URL that `Document` or `FrameOwner` node uses for URL completion. - /// - [JsonProperty("baseURL", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string BaseURL - { - get; - set; - } - /// - /// `DocumentType`'s publicId. - /// - [JsonProperty("publicId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string PublicId - { - get; - set; - } - /// - /// `DocumentType`'s systemId. - /// - [JsonProperty("systemId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string SystemId - { - get; - set; - } - /// - /// `DocumentType`'s internalSubset. - /// - [JsonProperty("internalSubset", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string InternalSubset - { - get; - set; - } - /// - /// `Document`'s XML version in case of XML documents. - /// - [JsonProperty("xmlVersion", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string XmlVersion - { - get; - set; - } - /// - /// `Attr`'s name. - /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Name - { - get; - set; - } - /// - /// `Attr`'s value. - /// - [JsonProperty("value", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Value - { - get; - set; - } - /// - /// Pseudo element type for this node. - /// - [JsonProperty("pseudoType", DefaultValueHandling = DefaultValueHandling.Ignore)] - public PseudoType? PseudoType - { - get; - set; - } - /// - /// Shadow root type. - /// - [JsonProperty("shadowRootType", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ShadowRootType? ShadowRootType - { - get; - set; - } - /// - /// Frame ID for frame owner elements. - /// - [JsonProperty("frameId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string FrameId - { - get; - set; - } - /// - /// Content document for frame owner elements. - /// - [JsonProperty("contentDocument", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Node ContentDocument - { - get; - set; - } - /// - /// Shadow root list for given element host. - /// - [JsonProperty("shadowRoots", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Node[] ShadowRoots - { - get; - set; - } - /// - /// Content document fragment for template elements. - /// - [JsonProperty("templateContent", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Node TemplateContent - { - get; - set; - } - /// - /// Pseudo elements associated with this node. - /// - [JsonProperty("pseudoElements", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Node[] PseudoElements - { - get; - set; - } - /// - /// Import document for the HTMLImport links. - /// - [JsonProperty("importedDocument", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Node ImportedDocument - { - get; - set; - } - /// - /// Distributed nodes for given insertion point. - /// - [JsonProperty("distributedNodes", DefaultValueHandling = DefaultValueHandling.Ignore)] - public BackendNode[] DistributedNodes - { - get; - set; - } - /// - /// Whether the node is SVG. - /// - [JsonProperty("isSVG", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IsSVG - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PerformSearchCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PerformSearchCommand.cs deleted file mode 100644 index 901443c24765b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PerformSearchCommand.cs +++ /dev/null @@ -1,60 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or - /// `cancelSearch` to end this search session. - /// - public sealed class PerformSearchCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.performSearch"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Plain text or query selector or XPath search query. - /// - [JsonProperty("query")] - public string Query - { - get; - set; - } - /// - /// True to search in user agent shadow DOM. - /// - [JsonProperty("includeUserAgentShadowDOM", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IncludeUserAgentShadowDOM - { - get; - set; - } - } - - public sealed class PerformSearchCommandResponse : ICommandResponse - { - /// - /// Unique search session identifier. - /// - [JsonProperty("searchId")] - public string SearchId - { - get; - set; - } - /// - /// Number of search results. - /// - [JsonProperty("resultCount")] - public long ResultCount - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PseudoElementAddedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PseudoElementAddedEventArgs.cs deleted file mode 100644 index 44223363af679..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PseudoElementAddedEventArgs.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using System; - using Newtonsoft.Json; - - /// - /// Called when a pseudo element is added to an element. - /// - public sealed class PseudoElementAddedEventArgs : EventArgs - { - /// - /// Pseudo element's parent element id. - /// - [JsonProperty("parentId")] - public long ParentId - { - get; - set; - } - /// - /// The added pseudo element. - /// - [JsonProperty("pseudoElement")] - public Node PseudoElement - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PseudoElementRemovedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PseudoElementRemovedEventArgs.cs deleted file mode 100644 index 4457d04e3f28f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PseudoElementRemovedEventArgs.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using System; - using Newtonsoft.Json; - - /// - /// Called when a pseudo element is removed from an element. - /// - public sealed class PseudoElementRemovedEventArgs : EventArgs - { - /// - /// Pseudo element's parent element id. - /// - [JsonProperty("parentId")] - public long ParentId - { - get; - set; - } - /// - /// The removed pseudo element id. - /// - [JsonProperty("pseudoElementId")] - public long PseudoElementId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PseudoType.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PseudoType.cs deleted file mode 100644 index 823e62d4b5527..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PseudoType.cs +++ /dev/null @@ -1,44 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// Pseudo element type. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PseudoType - { - [EnumMember(Value = "first-line")] - FirstLine, - [EnumMember(Value = "first-letter")] - FirstLetter, - [EnumMember(Value = "before")] - Before, - [EnumMember(Value = "after")] - After, - [EnumMember(Value = "backdrop")] - Backdrop, - [EnumMember(Value = "selection")] - Selection, - [EnumMember(Value = "first-line-inherited")] - FirstLineInherited, - [EnumMember(Value = "scrollbar")] - Scrollbar, - [EnumMember(Value = "scrollbar-thumb")] - ScrollbarThumb, - [EnumMember(Value = "scrollbar-button")] - ScrollbarButton, - [EnumMember(Value = "scrollbar-track")] - ScrollbarTrack, - [EnumMember(Value = "scrollbar-track-piece")] - ScrollbarTrackPiece, - [EnumMember(Value = "scrollbar-corner")] - ScrollbarCorner, - [EnumMember(Value = "resizer")] - Resizer, - [EnumMember(Value = "input-list-button")] - InputListButton, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PushNodeByPathToFrontendCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PushNodeByPathToFrontendCommand.cs deleted file mode 100644 index 58b1d485b7afa..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PushNodeByPathToFrontendCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Requests that the node is sent to the caller given its path. // FIXME, use XPath - /// - public sealed class PushNodeByPathToFrontendCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.pushNodeByPathToFrontend"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Path to node in the proprietary format. - /// - [JsonProperty("path")] - public string Path - { - get; - set; - } - } - - public sealed class PushNodeByPathToFrontendCommandResponse : ICommandResponse - { - /// - /// Id of the node for given path. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PushNodesByBackendIdsToFrontendCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PushNodesByBackendIdsToFrontendCommand.cs deleted file mode 100644 index d28742eb48dd3..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/PushNodesByBackendIdsToFrontendCommand.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Requests that a batch of nodes is sent to the caller given their backend node ids. - /// - public sealed class PushNodesByBackendIdsToFrontendCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.pushNodesByBackendIdsToFrontend"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// The array of backend node ids. - /// - [JsonProperty("backendNodeIds")] - public long[] BackendNodeIds - { - get; - set; - } - } - - public sealed class PushNodesByBackendIdsToFrontendCommandResponse : ICommandResponse - { - /// - /// The array of ids of pushed nodes that correspond to the backend ids specified in - /// backendNodeIds. - /// - [JsonProperty("nodeIds")] - public long[] NodeIds - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/QuerySelectorAllCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/QuerySelectorAllCommand.cs deleted file mode 100644 index 402ef4d00f0bd..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/QuerySelectorAllCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Executes `querySelectorAll` on a given node. - /// - public sealed class QuerySelectorAllCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.querySelectorAll"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the node to query upon. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// Selector string. - /// - [JsonProperty("selector")] - public string Selector - { - get; - set; - } - } - - public sealed class QuerySelectorAllCommandResponse : ICommandResponse - { - /// - /// Query selector result. - /// - [JsonProperty("nodeIds")] - public long[] NodeIds - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/QuerySelectorCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/QuerySelectorCommand.cs deleted file mode 100644 index 5ca7996946dd4..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/QuerySelectorCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Executes `querySelector` on a given node. - /// - public sealed class QuerySelectorCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.querySelector"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the node to query upon. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// Selector string. - /// - [JsonProperty("selector")] - public string Selector - { - get; - set; - } - } - - public sealed class QuerySelectorCommandResponse : ICommandResponse - { - /// - /// Query selector result. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RGBA.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RGBA.cs deleted file mode 100644 index 013e785c6ba7f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RGBA.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// A structure holding an RGBA color. - /// - public sealed class RGBA - { - /// - /// The red component, in the [0-255] range. - /// - [JsonProperty("r")] - public long R - { - get; - set; - } - /// - /// The green component, in the [0-255] range. - /// - [JsonProperty("g")] - public long G - { - get; - set; - } - /// - /// The blue component, in the [0-255] range. - /// - [JsonProperty("b")] - public long B - { - get; - set; - } - /// - /// The alpha component, in the [0-1] range (default: 1). - /// - [JsonProperty("a", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? A - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/Rect.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/Rect.cs deleted file mode 100644 index ec7a9da905773..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/Rect.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Rectangle. - /// - public sealed class Rect - { - /// - /// X coordinate - /// - [JsonProperty("x")] - public double X - { - get; - set; - } - /// - /// Y coordinate - /// - [JsonProperty("y")] - public double Y - { - get; - set; - } - /// - /// Rectangle width - /// - [JsonProperty("width")] - public double Width - { - get; - set; - } - /// - /// Rectangle height - /// - [JsonProperty("height")] - public double Height - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RedoCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RedoCommand.cs deleted file mode 100644 index 41f12ce683f7f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RedoCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Re-does the last undone action. - /// - public sealed class RedoCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.redo"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class RedoCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RemoveAttributeCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RemoveAttributeCommand.cs deleted file mode 100644 index 6bd04d775735c..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RemoveAttributeCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Removes attribute with given name from an element with given id. - /// - public sealed class RemoveAttributeCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.removeAttribute"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the element to remove attribute from. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// Name of the attribute to remove. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - } - - public sealed class RemoveAttributeCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RemoveNodeCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RemoveNodeCommand.cs deleted file mode 100644 index a558f4eea75c2..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RemoveNodeCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Removes node with given id. - /// - public sealed class RemoveNodeCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.removeNode"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the node to remove. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - } - - public sealed class RemoveNodeCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RequestChildNodesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RequestChildNodesCommand.cs deleted file mode 100644 index 58b55257443b8..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RequestChildNodesCommand.cs +++ /dev/null @@ -1,54 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Requests that children of the node with given id are returned to the caller in form of - /// `setChildNodes` events where not only immediate children are retrieved, but all children down to - /// the specified depth. - /// - public sealed class RequestChildNodesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.requestChildNodes"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the node to get children for. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the - /// entire subtree or provide an integer larger than 0. - /// - [JsonProperty("depth", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Depth - { - get; - set; - } - /// - /// Whether or not iframes and shadow roots should be traversed when returning the sub-tree - /// (default is false). - /// - [JsonProperty("pierce", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Pierce - { - get; - set; - } - } - - public sealed class RequestChildNodesCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RequestNodeCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RequestNodeCommand.cs deleted file mode 100644 index 6495b89f0bb85..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/RequestNodeCommand.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Requests that the node is sent to the caller given the JavaScript node object reference. All - /// nodes that form the path from the node to the root are also sent to the client as a series of - /// `setChildNodes` notifications. - /// - public sealed class RequestNodeCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.requestNode"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// JavaScript object id to convert into node. - /// - [JsonProperty("objectId")] - public string ObjectId - { - get; - set; - } - } - - public sealed class RequestNodeCommandResponse : ICommandResponse - { - /// - /// Node id for given object. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ResolveNodeCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ResolveNodeCommand.cs deleted file mode 100644 index d69ba70f2c142..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ResolveNodeCommand.cs +++ /dev/null @@ -1,68 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Resolves the JavaScript node object for a given NodeId or BackendNodeId. - /// - public sealed class ResolveNodeCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.resolveNode"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the node to resolve. - /// - [JsonProperty("nodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? NodeId - { - get; - set; - } - /// - /// Backend identifier of the node to resolve. - /// - [JsonProperty("backendNodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? BackendNodeId - { - get; - set; - } - /// - /// Symbolic group name that can be used to release multiple objects. - /// - [JsonProperty("objectGroup", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ObjectGroup - { - get; - set; - } - /// - /// Execution context in which to resolve the node. - /// - [JsonProperty("executionContextId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ExecutionContextId - { - get; - set; - } - } - - public sealed class ResolveNodeCommandResponse : ICommandResponse - { - /// - /// JavaScript object wrapper for given node. - /// - [JsonProperty("object")] - public Runtime.RemoteObject Object - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetAttributeValueCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetAttributeValueCommand.cs deleted file mode 100644 index 5ea448f1d220e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetAttributeValueCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Sets attribute for an element with given id. - /// - public sealed class SetAttributeValueCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.setAttributeValue"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the element to set attribute for. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// Attribute name. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// Attribute value. - /// - [JsonProperty("value")] - public string Value - { - get; - set; - } - } - - public sealed class SetAttributeValueCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetAttributesAsTextCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetAttributesAsTextCommand.cs deleted file mode 100644 index a1918608368cd..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetAttributesAsTextCommand.cs +++ /dev/null @@ -1,52 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Sets attributes on element with given id. This method is useful when user edits some existing - /// attribute value and types in several attribute name/value pairs. - /// - public sealed class SetAttributesAsTextCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.setAttributesAsText"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the element to set attributes for. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// Text with a number of attributes. Will parse this text using HTML parser. - /// - [JsonProperty("text")] - public string Text - { - get; - set; - } - /// - /// Attribute name to replace with new attributes derived from text in case text parsed - /// successfully. - /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Name - { - get; - set; - } - } - - public sealed class SetAttributesAsTextCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetChildNodesEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetChildNodesEventArgs.cs deleted file mode 100644 index 5f43f5d3b9b88..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetChildNodesEventArgs.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when backend wants to provide client with the missing DOM structure. This happens upon - /// most of the calls requesting node ids. - /// - public sealed class SetChildNodesEventArgs : EventArgs - { - /// - /// Parent node id to populate with children. - /// - [JsonProperty("parentId")] - public long ParentId - { - get; - set; - } - /// - /// Child nodes array. - /// - [JsonProperty("nodes")] - public Node[] Nodes - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetFileInputFilesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetFileInputFilesCommand.cs deleted file mode 100644 index dd731c473df5d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetFileInputFilesCommand.cs +++ /dev/null @@ -1,59 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Sets files for the given file input element. - /// - public sealed class SetFileInputFilesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.setFileInputFiles"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Array of file paths to set. - /// - [JsonProperty("files")] - public string[] Files - { - get; - set; - } - /// - /// Identifier of the node. - /// - [JsonProperty("nodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? NodeId - { - get; - set; - } - /// - /// Identifier of the backend node. - /// - [JsonProperty("backendNodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? BackendNodeId - { - get; - set; - } - /// - /// JavaScript object id of the node wrapper. - /// - [JsonProperty("objectId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ObjectId - { - get; - set; - } - } - - public sealed class SetFileInputFilesCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetInspectedNodeCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetInspectedNodeCommand.cs deleted file mode 100644 index 518e330fc56e0..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetInspectedNodeCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Enables console to refer to the node with given id via $x (see Command Line API for more details - /// $x functions). - /// - public sealed class SetInspectedNodeCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.setInspectedNode"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// DOM node id to be accessible by means of $x command line API. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - } - - public sealed class SetInspectedNodeCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetNodeNameCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetNodeNameCommand.cs deleted file mode 100644 index 2d24e166180a9..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetNodeNameCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Sets node name for a node with given id. - /// - public sealed class SetNodeNameCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.setNodeName"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the node to set name for. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// New node's name. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - } - - public sealed class SetNodeNameCommandResponse : ICommandResponse - { - /// - /// New node's id. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetNodeValueCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetNodeValueCommand.cs deleted file mode 100644 index cf3d2dab18061..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetNodeValueCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Sets node value for a node with given id. - /// - public sealed class SetNodeValueCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.setNodeValue"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the node to set value for. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// New node's value. - /// - [JsonProperty("value")] - public string Value - { - get; - set; - } - } - - public sealed class SetNodeValueCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetOuterHTMLCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetOuterHTMLCommand.cs deleted file mode 100644 index 0fe1a8f48318f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/SetOuterHTMLCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Sets node HTML markup, returns new node id. - /// - public sealed class SetOuterHTMLCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.setOuterHTML"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the node to set markup for. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// Outer HTML markup to set. - /// - [JsonProperty("outerHTML")] - public string OuterHTML - { - get; - set; - } - } - - public sealed class SetOuterHTMLCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ShadowRootPoppedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ShadowRootPoppedEventArgs.cs deleted file mode 100644 index 4a24df1e3560b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ShadowRootPoppedEventArgs.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using System; - using Newtonsoft.Json; - - /// - /// Called when shadow root is popped from the element. - /// - public sealed class ShadowRootPoppedEventArgs : EventArgs - { - /// - /// Host element id. - /// - [JsonProperty("hostId")] - public long HostId - { - get; - set; - } - /// - /// Shadow root id. - /// - [JsonProperty("rootId")] - public long RootId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ShadowRootPushedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ShadowRootPushedEventArgs.cs deleted file mode 100644 index c97b4de449f5b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ShadowRootPushedEventArgs.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using System; - using Newtonsoft.Json; - - /// - /// Called when shadow root is pushed into the element. - /// - public sealed class ShadowRootPushedEventArgs : EventArgs - { - /// - /// Host element id. - /// - [JsonProperty("hostId")] - public long HostId - { - get; - set; - } - /// - /// Shadow root. - /// - [JsonProperty("root")] - public Node Root - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ShadowRootType.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ShadowRootType.cs deleted file mode 100644 index eac95dc17753e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ShadowRootType.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// Shadow root type. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ShadowRootType - { - [EnumMember(Value = "user-agent")] - UserAgent, - [EnumMember(Value = "open")] - Open, - [EnumMember(Value = "closed")] - Closed, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ShapeOutsideInfo.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ShapeOutsideInfo.cs deleted file mode 100644 index ae6017e25d058..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/ShapeOutsideInfo.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// CSS Shape Outside details. - /// - public sealed class ShapeOutsideInfo - { - /// - /// Shape bounds - /// - [JsonProperty("bounds")] - public double[] Bounds - { - get; - set; - } - /// - /// Shape coordinate details - /// - [JsonProperty("shape")] - public object[] Shape - { - get; - set; - } - /// - /// Margin shape bounds - /// - [JsonProperty("marginShape")] - public object[] MarginShape - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/UndoCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/UndoCommand.cs deleted file mode 100644 index 16593b11c6e16..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOM/UndoCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOM -{ - using Newtonsoft.Json; - - /// - /// Undoes the last performed action. - /// - public sealed class UndoCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOM.undo"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class UndoCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/DOMBreakpointType.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/DOMBreakpointType.cs deleted file mode 100644 index 502ad7fa5eddf..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/DOMBreakpointType.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOMDebugger -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// DOM breakpoint type. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum DOMBreakpointType - { - [EnumMember(Value = "subtree-modified")] - SubtreeModified, - [EnumMember(Value = "attribute-modified")] - AttributeModified, - [EnumMember(Value = "node-removed")] - NodeRemoved, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/DOMDebuggerAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/DOMDebuggerAdapter.cs deleted file mode 100644 index 1c90c1c9177ea..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/DOMDebuggerAdapter.cs +++ /dev/null @@ -1,110 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOMDebugger -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the DOMDebugger domain to simplify the command interface. - /// - public class DOMDebuggerAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "DOMDebugger"; - private Dictionary m_eventMap = new Dictionary(); - - public DOMDebuggerAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - - /// - /// Returns event listeners of the given object. - /// - public async Task GetEventListeners(GetEventListenersCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Removes DOM breakpoint that was set using `setDOMBreakpoint`. - /// - public async Task RemoveDOMBreakpoint(RemoveDOMBreakpointCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Removes breakpoint on particular DOM event. - /// - public async Task RemoveEventListenerBreakpoint(RemoveEventListenerBreakpointCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Removes breakpoint on particular native event. - /// - public async Task RemoveInstrumentationBreakpoint(RemoveInstrumentationBreakpointCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Removes breakpoint from XMLHttpRequest. - /// - public async Task RemoveXHRBreakpoint(RemoveXHRBreakpointCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets breakpoint on particular operation with DOM. - /// - public async Task SetDOMBreakpoint(SetDOMBreakpointCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets breakpoint on particular DOM event. - /// - public async Task SetEventListenerBreakpoint(SetEventListenerBreakpointCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets breakpoint on particular native event. - /// - public async Task SetInstrumentationBreakpoint(SetInstrumentationBreakpointCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets breakpoint on XMLHttpRequest. - /// - public async Task SetXHRBreakpoint(SetXHRBreakpointCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/EventListener.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/EventListener.cs deleted file mode 100644 index db1660d3d449b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/EventListener.cs +++ /dev/null @@ -1,101 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOMDebugger -{ - using Newtonsoft.Json; - - /// - /// Object event listener. - /// - public sealed class EventListener - { - /// - /// `EventListener`'s type. - /// - [JsonProperty("type")] - public string Type - { - get; - set; - } - /// - /// `EventListener`'s useCapture. - /// - [JsonProperty("useCapture")] - public bool UseCapture - { - get; - set; - } - /// - /// `EventListener`'s passive flag. - /// - [JsonProperty("passive")] - public bool Passive - { - get; - set; - } - /// - /// `EventListener`'s once flag. - /// - [JsonProperty("once")] - public bool Once - { - get; - set; - } - /// - /// Script id of the handler code. - /// - [JsonProperty("scriptId")] - public string ScriptId - { - get; - set; - } - /// - /// Line number in the script (0-based). - /// - [JsonProperty("lineNumber")] - public long LineNumber - { - get; - set; - } - /// - /// Column number in the script (0-based). - /// - [JsonProperty("columnNumber")] - public long ColumnNumber - { - get; - set; - } - /// - /// Event handler function value. - /// - [JsonProperty("handler", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.RemoteObject Handler - { - get; - set; - } - /// - /// Event original handler function value. - /// - [JsonProperty("originalHandler", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.RemoteObject OriginalHandler - { - get; - set; - } - /// - /// Node the listener is added to (if any). - /// - [JsonProperty("backendNodeId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? BackendNodeId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/GetEventListenersCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/GetEventListenersCommand.cs deleted file mode 100644 index 1c3bfd12e0b41..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/GetEventListenersCommand.cs +++ /dev/null @@ -1,61 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOMDebugger -{ - using Newtonsoft.Json; - - /// - /// Returns event listeners of the given object. - /// - public sealed class GetEventListenersCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOMDebugger.getEventListeners"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier of the object to return listeners for. - /// - [JsonProperty("objectId")] - public string ObjectId - { - get; - set; - } - /// - /// The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the - /// entire subtree or provide an integer larger than 0. - /// - [JsonProperty("depth", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Depth - { - get; - set; - } - /// - /// Whether or not iframes and shadow roots should be traversed when returning the subtree - /// (default is false). Reports listeners for all contexts if pierce is enabled. - /// - [JsonProperty("pierce", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Pierce - { - get; - set; - } - } - - public sealed class GetEventListenersCommandResponse : ICommandResponse - { - /// - /// Array of relevant listeners. - /// - [JsonProperty("listeners")] - public EventListener[] Listeners - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/RemoveDOMBreakpointCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/RemoveDOMBreakpointCommand.cs deleted file mode 100644 index e70b759aef22f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/RemoveDOMBreakpointCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOMDebugger -{ - using Newtonsoft.Json; - - /// - /// Removes DOM breakpoint that was set using `setDOMBreakpoint`. - /// - public sealed class RemoveDOMBreakpointCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOMDebugger.removeDOMBreakpoint"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier of the node to remove breakpoint from. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// Type of the breakpoint to remove. - /// - [JsonProperty("type")] - public DOMBreakpointType Type - { - get; - set; - } - } - - public sealed class RemoveDOMBreakpointCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/RemoveEventListenerBreakpointCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/RemoveEventListenerBreakpointCommand.cs deleted file mode 100644 index e4ef865efecfc..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/RemoveEventListenerBreakpointCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOMDebugger -{ - using Newtonsoft.Json; - - /// - /// Removes breakpoint on particular DOM event. - /// - public sealed class RemoveEventListenerBreakpointCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOMDebugger.removeEventListenerBreakpoint"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Event name. - /// - [JsonProperty("eventName")] - public string EventName - { - get; - set; - } - /// - /// EventTarget interface name. - /// - [JsonProperty("targetName", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string TargetName - { - get; - set; - } - } - - public sealed class RemoveEventListenerBreakpointCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/RemoveInstrumentationBreakpointCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/RemoveInstrumentationBreakpointCommand.cs deleted file mode 100644 index 0ab3dad840aeb..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/RemoveInstrumentationBreakpointCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOMDebugger -{ - using Newtonsoft.Json; - - /// - /// Removes breakpoint on particular native event. - /// - public sealed class RemoveInstrumentationBreakpointCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOMDebugger.removeInstrumentationBreakpoint"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Instrumentation name to stop on. - /// - [JsonProperty("eventName")] - public string EventName - { - get; - set; - } - } - - public sealed class RemoveInstrumentationBreakpointCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/RemoveXHRBreakpointCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/RemoveXHRBreakpointCommand.cs deleted file mode 100644 index f11e4683a8511..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/RemoveXHRBreakpointCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOMDebugger -{ - using Newtonsoft.Json; - - /// - /// Removes breakpoint from XMLHttpRequest. - /// - public sealed class RemoveXHRBreakpointCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOMDebugger.removeXHRBreakpoint"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Resource URL substring. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - } - - public sealed class RemoveXHRBreakpointCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/SetDOMBreakpointCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/SetDOMBreakpointCommand.cs deleted file mode 100644 index 22dcb0b3a4f3a..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/SetDOMBreakpointCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOMDebugger -{ - using Newtonsoft.Json; - - /// - /// Sets breakpoint on particular operation with DOM. - /// - public sealed class SetDOMBreakpointCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOMDebugger.setDOMBreakpoint"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier of the node to set breakpoint on. - /// - [JsonProperty("nodeId")] - public long NodeId - { - get; - set; - } - /// - /// Type of the operation to stop upon. - /// - [JsonProperty("type")] - public DOMBreakpointType Type - { - get; - set; - } - } - - public sealed class SetDOMBreakpointCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/SetEventListenerBreakpointCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/SetEventListenerBreakpointCommand.cs deleted file mode 100644 index cd0dd8995156c..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/SetEventListenerBreakpointCommand.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOMDebugger -{ - using Newtonsoft.Json; - - /// - /// Sets breakpoint on particular DOM event. - /// - public sealed class SetEventListenerBreakpointCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOMDebugger.setEventListenerBreakpoint"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// DOM Event name to stop on (any DOM event will do). - /// - [JsonProperty("eventName")] - public string EventName - { - get; - set; - } - /// - /// EventTarget interface name to stop on. If equal to `"*"` or not provided, will stop on any - /// EventTarget. - /// - [JsonProperty("targetName", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string TargetName - { - get; - set; - } - } - - public sealed class SetEventListenerBreakpointCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/SetInstrumentationBreakpointCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/SetInstrumentationBreakpointCommand.cs deleted file mode 100644 index 2d41486256047..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/SetInstrumentationBreakpointCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOMDebugger -{ - using Newtonsoft.Json; - - /// - /// Sets breakpoint on particular native event. - /// - public sealed class SetInstrumentationBreakpointCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOMDebugger.setInstrumentationBreakpoint"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Instrumentation name to stop on. - /// - [JsonProperty("eventName")] - public string EventName - { - get; - set; - } - } - - public sealed class SetInstrumentationBreakpointCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/SetXHRBreakpointCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/SetXHRBreakpointCommand.cs deleted file mode 100644 index 639fb992a61e5..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DOMDebugger/SetXHRBreakpointCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.DOMDebugger -{ - using Newtonsoft.Json; - - /// - /// Sets breakpoint on XMLHttpRequest. - /// - public sealed class SetXHRBreakpointCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "DOMDebugger.setXHRBreakpoint"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Resource URL substring. All XHRs having this substring in the URL will get stopped upon. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - } - - public sealed class SetXHRBreakpointCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/BreakLocation.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/BreakLocation.cs deleted file mode 100644 index e5e67794ea77b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/BreakLocation.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// BreakLocation - /// - public sealed class BreakLocation - { - /// - /// Script identifier as reported in the `Debugger.scriptParsed`. - /// - [JsonProperty("scriptId")] - public string ScriptId - { - get; - set; - } - /// - /// Line number in the script (0-based). - /// - [JsonProperty("lineNumber")] - public long LineNumber - { - get; - set; - } - /// - /// Column number in the script (0-based). - /// - [JsonProperty("columnNumber", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ColumnNumber - { - get; - set; - } - /// - /// type - /// - [JsonProperty("type", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Type - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/BreakpointResolvedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/BreakpointResolvedEventArgs.cs deleted file mode 100644 index 3b90b9168c27f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/BreakpointResolvedEventArgs.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when breakpoint is resolved to an actual script and location. - /// - public sealed class BreakpointResolvedEventArgs : EventArgs - { - /// - /// Breakpoint unique identifier. - /// - [JsonProperty("breakpointId")] - public string BreakpointId - { - get; - set; - } - /// - /// Actual breakpoint location. - /// - [JsonProperty("location")] - public Location Location - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/CallFrame.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/CallFrame.cs deleted file mode 100644 index 2967f0546f4ff..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/CallFrame.cs +++ /dev/null @@ -1,83 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// JavaScript call frame. Array of call frames form the call stack. - /// - public sealed class CallFrame - { - /// - /// Call frame identifier. This identifier is only valid while the virtual machine is paused. - /// - [JsonProperty("callFrameId")] - public string CallFrameId - { - get; - set; - } - /// - /// Name of the JavaScript function called on this call frame. - /// - [JsonProperty("functionName")] - public string FunctionName - { - get; - set; - } - /// - /// Location in the source code. - /// - [JsonProperty("functionLocation", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Location FunctionLocation - { - get; - set; - } - /// - /// Location in the source code. - /// - [JsonProperty("location")] - public Location Location - { - get; - set; - } - /// - /// JavaScript script name or url. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Scope chain for this call frame. - /// - [JsonProperty("scopeChain")] - public Scope[] ScopeChain - { - get; - set; - } - /// - /// `this` object for this call frame. - /// - [JsonProperty("this")] - public Runtime.RemoteObject This - { - get; - set; - } - /// - /// The value being returned, if the function is at return point. - /// - [JsonProperty("returnValue", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.RemoteObject ReturnValue - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ContinueToLocationCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ContinueToLocationCommand.cs deleted file mode 100644 index 714d61b70aa41..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ContinueToLocationCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Continues execution until specific location is reached. - /// - public sealed class ContinueToLocationCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.continueToLocation"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Location to continue to. - /// - [JsonProperty("location")] - public Location Location - { - get; - set; - } - /// - /// Gets or sets the targetCallFrames - /// - [JsonProperty("targetCallFrames", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string TargetCallFrames - { - get; - set; - } - } - - public sealed class ContinueToLocationCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/DebuggerAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/DebuggerAdapter.cs deleted file mode 100644 index 2d1966816fc56..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/DebuggerAdapter.cs +++ /dev/null @@ -1,323 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the Debugger domain to simplify the command interface. - /// - public class DebuggerAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "Debugger"; - private Dictionary m_eventMap = new Dictionary(); - - public DebuggerAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - m_eventMap["breakpointResolved"] = new DevToolsEventData(typeof(BreakpointResolvedEventArgs), OnBreakpointResolved); - m_eventMap["paused"] = new DevToolsEventData(typeof(PausedEventArgs), OnPaused); - m_eventMap["resumed"] = new DevToolsEventData(typeof(ResumedEventArgs), OnResumed); - m_eventMap["scriptFailedToParse"] = new DevToolsEventData(typeof(ScriptFailedToParseEventArgs), OnScriptFailedToParse); - m_eventMap["scriptParsed"] = new DevToolsEventData(typeof(ScriptParsedEventArgs), OnScriptParsed); - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - /// - /// Fired when breakpoint is resolved to an actual script and location. - /// - public event EventHandler BreakpointResolved; - /// - /// Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - /// - public event EventHandler Paused; - /// - /// Fired when the virtual machine resumed execution. - /// - public event EventHandler Resumed; - /// - /// Fired when virtual machine fails to parse the script. - /// - public event EventHandler ScriptFailedToParse; - /// - /// Fired when virtual machine parses script. This event is also fired for all known and uncollected - /// scripts upon enabling debugger. - /// - public event EventHandler ScriptParsed; - - /// - /// Continues execution until specific location is reached. - /// - public async Task ContinueToLocation(ContinueToLocationCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Disables debugger for given page. - /// - public async Task Disable(DisableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new DisableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enables debugger for the given page. Clients should not assume that the debugging has been - /// enabled until the result for this command is received. - /// - public async Task Enable(EnableCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Evaluates expression on a given call frame. - /// - public async Task EvaluateOnCallFrame(EvaluateOnCallFrameCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns possible locations for breakpoint. scriptId in start and end range locations should be - /// the same. - /// - public async Task GetPossibleBreakpoints(GetPossibleBreakpointsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns source for the script with given id. - /// - public async Task GetScriptSource(GetScriptSourceCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns stack trace with given `stackTraceId`. - /// - public async Task GetStackTrace(GetStackTraceCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Stops on the next JavaScript statement. - /// - public async Task Pause(PauseCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new PauseCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// pauseOnAsyncCall - /// - public async Task PauseOnAsyncCall(PauseOnAsyncCallCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Removes JavaScript breakpoint. - /// - public async Task RemoveBreakpoint(RemoveBreakpointCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Restarts particular call frame from the beginning. - /// - public async Task RestartFrame(RestartFrameCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Resumes JavaScript execution. - /// - public async Task Resume(ResumeCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new ResumeCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Searches for given string in script content. - /// - public async Task SearchInContent(SearchInContentCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enables or disables async call stacks tracking. - /// - public async Task SetAsyncCallStackDepth(SetAsyncCallStackDepthCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in - /// scripts with url matching one of the patterns. VM will try to leave blackboxed script by - /// performing 'step in' several times, finally resorting to 'step out' if unsuccessful. - /// - public async Task SetBlackboxPatterns(SetBlackboxPatternsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted - /// scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. - /// Positions array contains positions where blackbox state is changed. First interval isn't - /// blackboxed. Array should be sorted. - /// - public async Task SetBlackboxedRanges(SetBlackboxedRangesCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets JavaScript breakpoint at a given location. - /// - public async Task SetBreakpoint(SetBreakpointCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this - /// command is issued, all existing parsed scripts will have breakpoints resolved and returned in - /// `locations` property. Further matching script parsing will result in subsequent - /// `breakpointResolved` events issued. This logical breakpoint will survive page reloads. - /// - public async Task SetBreakpointByUrl(SetBreakpointByUrlCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets JavaScript breakpoint before each call to the given function. - /// If another function was created from the same source as a given one, - /// calling it will also trigger the breakpoint. - /// - public async Task SetBreakpointOnFunctionCall(SetBreakpointOnFunctionCallCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Activates / deactivates all breakpoints on the page. - /// - public async Task SetBreakpointsActive(SetBreakpointsActiveCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or - /// no exceptions. Initial pause on exceptions state is `none`. - /// - public async Task SetPauseOnExceptions(SetPauseOnExceptionsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Changes return value in top frame. Available only at return break position. - /// - public async Task SetReturnValue(SetReturnValueCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Edits JavaScript source live. - /// - public async Task SetScriptSource(SetScriptSourceCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). - /// - public async Task SetSkipAllPauses(SetSkipAllPausesCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Changes value of variable in a callframe. Object-based scopes are not supported and must be - /// mutated manually. - /// - public async Task SetVariableValue(SetVariableValueCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Steps into the function call. - /// - public async Task StepInto(StepIntoCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Steps out of the function call. - /// - public async Task StepOut(StepOutCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new StepOutCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Steps over the statement. - /// - public async Task StepOver(StepOverCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new StepOverCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - private void OnBreakpointResolved(object rawEventArgs) - { - BreakpointResolvedEventArgs e = rawEventArgs as BreakpointResolvedEventArgs; - if (e != null && BreakpointResolved != null) - { - BreakpointResolved(this, e); - } - } - private void OnPaused(object rawEventArgs) - { - PausedEventArgs e = rawEventArgs as PausedEventArgs; - if (e != null && Paused != null) - { - Paused(this, e); - } - } - private void OnResumed(object rawEventArgs) - { - ResumedEventArgs e = rawEventArgs as ResumedEventArgs; - if (e != null && Resumed != null) - { - Resumed(this, e); - } - } - private void OnScriptFailedToParse(object rawEventArgs) - { - ScriptFailedToParseEventArgs e = rawEventArgs as ScriptFailedToParseEventArgs; - if (e != null && ScriptFailedToParse != null) - { - ScriptFailedToParse(this, e); - } - } - private void OnScriptParsed(object rawEventArgs) - { - ScriptParsedEventArgs e = rawEventArgs as ScriptParsedEventArgs; - if (e != null && ScriptParsed != null) - { - ScriptParsed(this, e); - } - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/DisableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/DisableCommand.cs deleted file mode 100644 index d34bbb947306d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/DisableCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Disables debugger for given page. - /// - public sealed class DisableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.disable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class DisableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/EnableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/EnableCommand.cs deleted file mode 100644 index 5c11be33ded69..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/EnableCommand.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Enables debugger for the given page. Clients should not assume that the debugging has been - /// enabled until the result for this command is received. - /// - public sealed class EnableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.enable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// The maximum size in bytes of collected scripts (not referenced by other heap objects) - /// the debugger can hold. Puts no limit if paramter is omitted. - /// - [JsonProperty("maxScriptsCacheSize", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? MaxScriptsCacheSize - { - get; - set; - } - } - - public sealed class EnableCommandResponse : ICommandResponse - { - /// - /// Unique identifier of the debugger. - /// - [JsonProperty("debuggerId")] - public string DebuggerId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/EvaluateOnCallFrameCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/EvaluateOnCallFrameCommand.cs deleted file mode 100644 index 63f1eaf50bd7b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/EvaluateOnCallFrameCommand.cs +++ /dev/null @@ -1,125 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Evaluates expression on a given call frame. - /// - public sealed class EvaluateOnCallFrameCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.evaluateOnCallFrame"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Call frame identifier to evaluate on. - /// - [JsonProperty("callFrameId")] - public string CallFrameId - { - get; - set; - } - /// - /// Expression to evaluate. - /// - [JsonProperty("expression")] - public string Expression - { - get; - set; - } - /// - /// String object group name to put result into (allows rapid releasing resulting object handles - /// using `releaseObjectGroup`). - /// - [JsonProperty("objectGroup", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ObjectGroup - { - get; - set; - } - /// - /// Specifies whether command line API should be available to the evaluated expression, defaults - /// to false. - /// - [JsonProperty("includeCommandLineAPI", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IncludeCommandLineAPI - { - get; - set; - } - /// - /// In silent mode exceptions thrown during evaluation are not reported and do not pause - /// execution. Overrides `setPauseOnException` state. - /// - [JsonProperty("silent", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Silent - { - get; - set; - } - /// - /// Whether the result is expected to be a JSON object that should be sent by value. - /// - [JsonProperty("returnByValue", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? ReturnByValue - { - get; - set; - } - /// - /// Whether preview should be generated for the result. - /// - [JsonProperty("generatePreview", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? GeneratePreview - { - get; - set; - } - /// - /// Whether to throw an exception if side effect cannot be ruled out during evaluation. - /// - [JsonProperty("throwOnSideEffect", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? ThrowOnSideEffect - { - get; - set; - } - /// - /// Terminate execution after timing out (number of milliseconds). - /// - [JsonProperty("timeout", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Timeout - { - get; - set; - } - } - - public sealed class EvaluateOnCallFrameCommandResponse : ICommandResponse - { - /// - /// Object wrapper for the evaluation result. - /// - [JsonProperty("result")] - public Runtime.RemoteObject Result - { - get; - set; - } - /// - /// Exception details. - /// - [JsonProperty("exceptionDetails", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.ExceptionDetails ExceptionDetails - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/GetPossibleBreakpointsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/GetPossibleBreakpointsCommand.cs deleted file mode 100644 index e320846d52c46..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/GetPossibleBreakpointsCommand.cs +++ /dev/null @@ -1,61 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Returns possible locations for breakpoint. scriptId in start and end range locations should be - /// the same. - /// - public sealed class GetPossibleBreakpointsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.getPossibleBreakpoints"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Start of range to search possible breakpoint locations in. - /// - [JsonProperty("start")] - public Location Start - { - get; - set; - } - /// - /// End of range to search possible breakpoint locations in (excluding). When not specified, end - /// of scripts is used as end of range. - /// - [JsonProperty("end", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Location End - { - get; - set; - } - /// - /// Only consider locations which are in the same (non-nested) function as start. - /// - [JsonProperty("restrictToFunction", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? RestrictToFunction - { - get; - set; - } - } - - public sealed class GetPossibleBreakpointsCommandResponse : ICommandResponse - { - /// - /// List of the possible breakpoint locations. - /// - [JsonProperty("locations")] - public BreakLocation[] Locations - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/GetScriptSourceCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/GetScriptSourceCommand.cs deleted file mode 100644 index fb9f896d2174d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/GetScriptSourceCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Returns source for the script with given id. - /// - public sealed class GetScriptSourceCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.getScriptSource"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the script to get source for. - /// - [JsonProperty("scriptId")] - public string ScriptId - { - get; - set; - } - } - - public sealed class GetScriptSourceCommandResponse : ICommandResponse - { - /// - /// Script source. - /// - [JsonProperty("scriptSource")] - public string ScriptSource - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/GetStackTraceCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/GetStackTraceCommand.cs deleted file mode 100644 index 1a7cbd1e14cf5..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/GetStackTraceCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Returns stack trace with given `stackTraceId`. - /// - public sealed class GetStackTraceCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.getStackTrace"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the stackTraceId - /// - [JsonProperty("stackTraceId")] - public Runtime.StackTraceId StackTraceId - { - get; - set; - } - } - - public sealed class GetStackTraceCommandResponse : ICommandResponse - { - /// - /// Gets or sets the stackTrace - /// - [JsonProperty("stackTrace")] - public Runtime.StackTrace StackTrace - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/Location.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/Location.cs deleted file mode 100644 index 75ecf1e02717d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/Location.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Location in the source code. - /// - public sealed class Location - { - /// - /// Script identifier as reported in the `Debugger.scriptParsed`. - /// - [JsonProperty("scriptId")] - public string ScriptId - { - get; - set; - } - /// - /// Line number in the script (0-based). - /// - [JsonProperty("lineNumber")] - public long LineNumber - { - get; - set; - } - /// - /// Column number in the script (0-based). - /// - [JsonProperty("columnNumber", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ColumnNumber - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/PauseCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/PauseCommand.cs deleted file mode 100644 index b1ccf53fa9b42..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/PauseCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Stops on the next JavaScript statement. - /// - public sealed class PauseCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.pause"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class PauseCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/PauseOnAsyncCallCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/PauseOnAsyncCallCommand.cs deleted file mode 100644 index 3506cab4d921d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/PauseOnAsyncCallCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// PauseOnAsyncCall - /// - public sealed class PauseOnAsyncCallCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.pauseOnAsyncCall"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Debugger will pause when async call with given stack trace is started. - /// - [JsonProperty("parentStackTraceId")] - public Runtime.StackTraceId ParentStackTraceId - { - get; - set; - } - } - - public sealed class PauseOnAsyncCallCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/PausedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/PausedEventArgs.cs deleted file mode 100644 index 9cc309343dcbb..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/PausedEventArgs.cs +++ /dev/null @@ -1,76 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - /// - public sealed class PausedEventArgs : EventArgs - { - /// - /// Call stack the virtual machine stopped on. - /// - [JsonProperty("callFrames")] - public CallFrame[] CallFrames - { - get; - set; - } - /// - /// Pause reason. - /// - [JsonProperty("reason")] - public string Reason - { - get; - set; - } - /// - /// Object containing break-specific auxiliary properties. - /// - [JsonProperty("data", DefaultValueHandling = DefaultValueHandling.Ignore)] - public object Data - { - get; - set; - } - /// - /// Hit breakpoints IDs - /// - [JsonProperty("hitBreakpoints", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string[] HitBreakpoints - { - get; - set; - } - /// - /// Async stack trace, if any. - /// - [JsonProperty("asyncStackTrace", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.StackTrace AsyncStackTrace - { - get; - set; - } - /// - /// Async stack trace, if any. - /// - [JsonProperty("asyncStackTraceId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.StackTraceId AsyncStackTraceId - { - get; - set; - } - /// - /// Just scheduled async call will have this stack trace as parent stack during async execution. - /// This field is available only after `Debugger.stepInto` call with `breakOnAsynCall` flag. - /// - [JsonProperty("asyncCallStackTraceId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.StackTraceId AsyncCallStackTraceId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/RemoveBreakpointCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/RemoveBreakpointCommand.cs deleted file mode 100644 index f49cbff84dfe1..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/RemoveBreakpointCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Removes JavaScript breakpoint. - /// - public sealed class RemoveBreakpointCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.removeBreakpoint"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the breakpointId - /// - [JsonProperty("breakpointId")] - public string BreakpointId - { - get; - set; - } - } - - public sealed class RemoveBreakpointCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/RestartFrameCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/RestartFrameCommand.cs deleted file mode 100644 index bdbd47655f234..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/RestartFrameCommand.cs +++ /dev/null @@ -1,59 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Restarts particular call frame from the beginning. - /// - public sealed class RestartFrameCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.restartFrame"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Call frame identifier to evaluate on. - /// - [JsonProperty("callFrameId")] - public string CallFrameId - { - get; - set; - } - } - - public sealed class RestartFrameCommandResponse : ICommandResponse - { - /// - /// New stack trace. - /// - [JsonProperty("callFrames")] - public CallFrame[] CallFrames - { - get; - set; - } - /// - /// Async stack trace, if any. - /// - [JsonProperty("asyncStackTrace", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.StackTrace AsyncStackTrace - { - get; - set; - } - /// - /// Async stack trace, if any. - /// - [JsonProperty("asyncStackTraceId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.StackTraceId AsyncStackTraceId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ResumeCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ResumeCommand.cs deleted file mode 100644 index fb59a7597f6ee..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ResumeCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Resumes JavaScript execution. - /// - public sealed class ResumeCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.resume"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class ResumeCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ResumedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ResumedEventArgs.cs deleted file mode 100644 index 22888c4cda7a5..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ResumedEventArgs.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when the virtual machine resumed execution. - /// - public sealed class ResumedEventArgs : EventArgs - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/Scope.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/Scope.cs deleted file mode 100644 index d870be277d426..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/Scope.cs +++ /dev/null @@ -1,58 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Scope description. - /// - public sealed class Scope - { - /// - /// Scope type. - /// - [JsonProperty("type")] - public string Type - { - get; - set; - } - /// - /// Object representing the scope. For `global` and `with` scopes it represents the actual - /// object; for the rest of the scopes, it is artificial transient object enumerating scope - /// variables as its properties. - /// - [JsonProperty("object")] - public Runtime.RemoteObject Object - { - get; - set; - } - /// - /// name - /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Name - { - get; - set; - } - /// - /// Location in the source code where scope starts - /// - [JsonProperty("startLocation", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Location StartLocation - { - get; - set; - } - /// - /// Location in the source code where scope ends - /// - [JsonProperty("endLocation", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Location EndLocation - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ScriptFailedToParseEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ScriptFailedToParseEventArgs.cs deleted file mode 100644 index fabe2393967a9..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ScriptFailedToParseEventArgs.cs +++ /dev/null @@ -1,138 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when virtual machine fails to parse the script. - /// - public sealed class ScriptFailedToParseEventArgs : EventArgs - { - /// - /// Identifier of the script parsed. - /// - [JsonProperty("scriptId")] - public string ScriptId - { - get; - set; - } - /// - /// URL or name of the script parsed (if any). - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Line offset of the script within the resource with given URL (for script tags). - /// - [JsonProperty("startLine")] - public long StartLine - { - get; - set; - } - /// - /// Column offset of the script within the resource with given URL. - /// - [JsonProperty("startColumn")] - public long StartColumn - { - get; - set; - } - /// - /// Last line of the script. - /// - [JsonProperty("endLine")] - public long EndLine - { - get; - set; - } - /// - /// Length of the last line of the script. - /// - [JsonProperty("endColumn")] - public long EndColumn - { - get; - set; - } - /// - /// Specifies script creation context. - /// - [JsonProperty("executionContextId")] - public long ExecutionContextId - { - get; - set; - } - /// - /// Content hash of the script. - /// - [JsonProperty("hash")] - public string Hash - { - get; - set; - } - /// - /// Embedder-specific auxiliary data. - /// - [JsonProperty("executionContextAuxData", DefaultValueHandling = DefaultValueHandling.Ignore)] - public object ExecutionContextAuxData - { - get; - set; - } - /// - /// URL of source map associated with script (if any). - /// - [JsonProperty("sourceMapURL", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string SourceMapURL - { - get; - set; - } - /// - /// True, if this script has sourceURL. - /// - [JsonProperty("hasSourceURL", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? HasSourceURL - { - get; - set; - } - /// - /// True, if this script is ES6 module. - /// - [JsonProperty("isModule", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IsModule - { - get; - set; - } - /// - /// This script length. - /// - [JsonProperty("length", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Length - { - get; - set; - } - /// - /// JavaScript top stack frame of where the script parsed event was triggered if available. - /// - [JsonProperty("stackTrace", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.StackTrace StackTrace - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ScriptParsedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ScriptParsedEventArgs.cs deleted file mode 100644 index 6e71604d3a3c7..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ScriptParsedEventArgs.cs +++ /dev/null @@ -1,148 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when virtual machine parses script. This event is also fired for all known and uncollected - /// scripts upon enabling debugger. - /// - public sealed class ScriptParsedEventArgs : EventArgs - { - /// - /// Identifier of the script parsed. - /// - [JsonProperty("scriptId")] - public string ScriptId - { - get; - set; - } - /// - /// URL or name of the script parsed (if any). - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Line offset of the script within the resource with given URL (for script tags). - /// - [JsonProperty("startLine")] - public long StartLine - { - get; - set; - } - /// - /// Column offset of the script within the resource with given URL. - /// - [JsonProperty("startColumn")] - public long StartColumn - { - get; - set; - } - /// - /// Last line of the script. - /// - [JsonProperty("endLine")] - public long EndLine - { - get; - set; - } - /// - /// Length of the last line of the script. - /// - [JsonProperty("endColumn")] - public long EndColumn - { - get; - set; - } - /// - /// Specifies script creation context. - /// - [JsonProperty("executionContextId")] - public long ExecutionContextId - { - get; - set; - } - /// - /// Content hash of the script. - /// - [JsonProperty("hash")] - public string Hash - { - get; - set; - } - /// - /// Embedder-specific auxiliary data. - /// - [JsonProperty("executionContextAuxData", DefaultValueHandling = DefaultValueHandling.Ignore)] - public object ExecutionContextAuxData - { - get; - set; - } - /// - /// True, if this script is generated as a result of the live edit operation. - /// - [JsonProperty("isLiveEdit", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IsLiveEdit - { - get; - set; - } - /// - /// URL of source map associated with script (if any). - /// - [JsonProperty("sourceMapURL", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string SourceMapURL - { - get; - set; - } - /// - /// True, if this script has sourceURL. - /// - [JsonProperty("hasSourceURL", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? HasSourceURL - { - get; - set; - } - /// - /// True, if this script is ES6 module. - /// - [JsonProperty("isModule", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IsModule - { - get; - set; - } - /// - /// This script length. - /// - [JsonProperty("length", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Length - { - get; - set; - } - /// - /// JavaScript top stack frame of where the script parsed event was triggered if available. - /// - [JsonProperty("stackTrace", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.StackTrace StackTrace - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ScriptPosition.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ScriptPosition.cs deleted file mode 100644 index 0fd22f4eb4a12..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/ScriptPosition.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Location in the source code. - /// - public sealed class ScriptPosition - { - /// - /// lineNumber - /// - [JsonProperty("lineNumber")] - public long LineNumber - { - get; - set; - } - /// - /// columnNumber - /// - [JsonProperty("columnNumber")] - public long ColumnNumber - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SearchInContentCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SearchInContentCommand.cs deleted file mode 100644 index c73a8872774d6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SearchInContentCommand.cs +++ /dev/null @@ -1,68 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Searches for given string in script content. - /// - public sealed class SearchInContentCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.searchInContent"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the script to search in. - /// - [JsonProperty("scriptId")] - public string ScriptId - { - get; - set; - } - /// - /// String to search for. - /// - [JsonProperty("query")] - public string Query - { - get; - set; - } - /// - /// If true, search is case sensitive. - /// - [JsonProperty("caseSensitive", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? CaseSensitive - { - get; - set; - } - /// - /// If true, treats string parameter as regex. - /// - [JsonProperty("isRegex", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IsRegex - { - get; - set; - } - } - - public sealed class SearchInContentCommandResponse : ICommandResponse - { - /// - /// List of search matches. - /// - [JsonProperty("result")] - public SearchMatch[] Result - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SearchMatch.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SearchMatch.cs deleted file mode 100644 index 069a4e52e7adf..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SearchMatch.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Search match for resource. - /// - public sealed class SearchMatch - { - /// - /// Line number in resource content. - /// - [JsonProperty("lineNumber")] - public double LineNumber - { - get; - set; - } - /// - /// Line with match content. - /// - [JsonProperty("lineContent")] - public string LineContent - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetAsyncCallStackDepthCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetAsyncCallStackDepthCommand.cs deleted file mode 100644 index f38a930b7a53c..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetAsyncCallStackDepthCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Enables or disables async call stacks tracking. - /// - public sealed class SetAsyncCallStackDepthCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.setAsyncCallStackDepth"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async - /// call stacks (default). - /// - [JsonProperty("maxDepth")] - public long MaxDepth - { - get; - set; - } - } - - public sealed class SetAsyncCallStackDepthCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBlackboxPatternsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBlackboxPatternsCommand.cs deleted file mode 100644 index 8471b94e38d0f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBlackboxPatternsCommand.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in - /// scripts with url matching one of the patterns. VM will try to leave blackboxed script by - /// performing 'step in' several times, finally resorting to 'step out' if unsuccessful. - /// - public sealed class SetBlackboxPatternsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.setBlackboxPatterns"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Array of regexps that will be used to check script url for blackbox state. - /// - [JsonProperty("patterns")] - public string[] Patterns - { - get; - set; - } - } - - public sealed class SetBlackboxPatternsCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBlackboxedRangesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBlackboxedRangesCommand.cs deleted file mode 100644 index adbdd86358d2a..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBlackboxedRangesCommand.cs +++ /dev/null @@ -1,44 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted - /// scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. - /// Positions array contains positions where blackbox state is changed. First interval isn't - /// blackboxed. Array should be sorted. - /// - public sealed class SetBlackboxedRangesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.setBlackboxedRanges"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the script. - /// - [JsonProperty("scriptId")] - public string ScriptId - { - get; - set; - } - /// - /// Gets or sets the positions - /// - [JsonProperty("positions")] - public ScriptPosition[] Positions - { - get; - set; - } - } - - public sealed class SetBlackboxedRangesCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBreakpointByUrlCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBreakpointByUrlCommand.cs deleted file mode 100644 index 38714f5400f4d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBreakpointByUrlCommand.cs +++ /dev/null @@ -1,100 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this - /// command is issued, all existing parsed scripts will have breakpoints resolved and returned in - /// `locations` property. Further matching script parsing will result in subsequent - /// `breakpointResolved` events issued. This logical breakpoint will survive page reloads. - /// - public sealed class SetBreakpointByUrlCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.setBreakpointByUrl"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Line number to set breakpoint at. - /// - [JsonProperty("lineNumber")] - public long LineNumber - { - get; - set; - } - /// - /// URL of the resources to set breakpoint on. - /// - [JsonProperty("url", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Url - { - get; - set; - } - /// - /// Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or - /// `urlRegex` must be specified. - /// - [JsonProperty("urlRegex", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string UrlRegex - { - get; - set; - } - /// - /// Script hash of the resources to set breakpoint on. - /// - [JsonProperty("scriptHash", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ScriptHash - { - get; - set; - } - /// - /// Offset in the line to set breakpoint at. - /// - [JsonProperty("columnNumber", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ColumnNumber - { - get; - set; - } - /// - /// Expression to use as a breakpoint condition. When specified, debugger will only stop on the - /// breakpoint if this expression evaluates to true. - /// - [JsonProperty("condition", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Condition - { - get; - set; - } - } - - public sealed class SetBreakpointByUrlCommandResponse : ICommandResponse - { - /// - /// Id of the created breakpoint for further reference. - /// - [JsonProperty("breakpointId")] - public string BreakpointId - { - get; - set; - } - /// - /// List of the locations this breakpoint resolved into upon addition. - /// - [JsonProperty("locations")] - public Location[] Locations - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBreakpointCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBreakpointCommand.cs deleted file mode 100644 index f1cb3f0b22fb4..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBreakpointCommand.cs +++ /dev/null @@ -1,60 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Sets JavaScript breakpoint at a given location. - /// - public sealed class SetBreakpointCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.setBreakpoint"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Location to set breakpoint in. - /// - [JsonProperty("location")] - public Location Location - { - get; - set; - } - /// - /// Expression to use as a breakpoint condition. When specified, debugger will only stop on the - /// breakpoint if this expression evaluates to true. - /// - [JsonProperty("condition", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Condition - { - get; - set; - } - } - - public sealed class SetBreakpointCommandResponse : ICommandResponse - { - /// - /// Id of the created breakpoint for further reference. - /// - [JsonProperty("breakpointId")] - public string BreakpointId - { - get; - set; - } - /// - /// Location this breakpoint resolved into. - /// - [JsonProperty("actualLocation")] - public Location ActualLocation - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBreakpointOnFunctionCallCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBreakpointOnFunctionCallCommand.cs deleted file mode 100644 index 8494c4fe64e59..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBreakpointOnFunctionCallCommand.cs +++ /dev/null @@ -1,53 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Sets JavaScript breakpoint before each call to the given function. - /// If another function was created from the same source as a given one, - /// calling it will also trigger the breakpoint. - /// - public sealed class SetBreakpointOnFunctionCallCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.setBreakpointOnFunctionCall"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Function object id. - /// - [JsonProperty("objectId")] - public string ObjectId - { - get; - set; - } - /// - /// Expression to use as a breakpoint condition. When specified, debugger will - /// stop on the breakpoint if this expression evaluates to true. - /// - [JsonProperty("condition", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Condition - { - get; - set; - } - } - - public sealed class SetBreakpointOnFunctionCallCommandResponse : ICommandResponse - { - /// - /// Id of the created breakpoint for further reference. - /// - [JsonProperty("breakpointId")] - public string BreakpointId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBreakpointsActiveCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBreakpointsActiveCommand.cs deleted file mode 100644 index 12219838e791e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetBreakpointsActiveCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Activates / deactivates all breakpoints on the page. - /// - public sealed class SetBreakpointsActiveCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.setBreakpointsActive"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// New value for breakpoints active state. - /// - [JsonProperty("active")] - public bool Active - { - get; - set; - } - } - - public sealed class SetBreakpointsActiveCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetPauseOnExceptionsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetPauseOnExceptionsCommand.cs deleted file mode 100644 index 722f2d3d16cee..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetPauseOnExceptionsCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or - /// no exceptions. Initial pause on exceptions state is `none`. - /// - public sealed class SetPauseOnExceptionsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.setPauseOnExceptions"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Pause on exceptions mode. - /// - [JsonProperty("state")] - public string State - { - get; - set; - } - } - - public sealed class SetPauseOnExceptionsCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetReturnValueCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetReturnValueCommand.cs deleted file mode 100644 index 9dc21eac5d7db..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetReturnValueCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Changes return value in top frame. Available only at return break position. - /// - public sealed class SetReturnValueCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.setReturnValue"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// New return value. - /// - [JsonProperty("newValue")] - public Runtime.CallArgument NewValue - { - get; - set; - } - } - - public sealed class SetReturnValueCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetScriptSourceCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetScriptSourceCommand.cs deleted file mode 100644 index 08d41580a5835..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetScriptSourceCommand.cs +++ /dev/null @@ -1,96 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Edits JavaScript source live. - /// - public sealed class SetScriptSourceCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.setScriptSource"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the script to edit. - /// - [JsonProperty("scriptId")] - public string ScriptId - { - get; - set; - } - /// - /// New content of the script. - /// - [JsonProperty("scriptSource")] - public string ScriptSource - { - get; - set; - } - /// - /// If true the change will not actually be applied. Dry run may be used to get result - /// description without actually modifying the code. - /// - [JsonProperty("dryRun", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? DryRun - { - get; - set; - } - } - - public sealed class SetScriptSourceCommandResponse : ICommandResponse - { - /// - /// New stack trace in case editing has happened while VM was stopped. - /// - [JsonProperty("callFrames", DefaultValueHandling = DefaultValueHandling.Ignore)] - public CallFrame[] CallFrames - { - get; - set; - } - /// - /// Whether current call stack was modified after applying the changes. - /// - [JsonProperty("stackChanged", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? StackChanged - { - get; - set; - } - /// - /// Async stack trace, if any. - /// - [JsonProperty("asyncStackTrace", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.StackTrace AsyncStackTrace - { - get; - set; - } - /// - /// Async stack trace, if any. - /// - [JsonProperty("asyncStackTraceId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.StackTraceId AsyncStackTraceId - { - get; - set; - } - /// - /// Exception details if any. - /// - [JsonProperty("exceptionDetails", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.ExceptionDetails ExceptionDetails - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetSkipAllPausesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetSkipAllPausesCommand.cs deleted file mode 100644 index 33e3c7005edcd..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetSkipAllPausesCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). - /// - public sealed class SetSkipAllPausesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.setSkipAllPauses"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// New value for skip pauses state. - /// - [JsonProperty("skip")] - public bool Skip - { - get; - set; - } - } - - public sealed class SetSkipAllPausesCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetVariableValueCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetVariableValueCommand.cs deleted file mode 100644 index 5ef1164b37c4d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/SetVariableValueCommand.cs +++ /dev/null @@ -1,61 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Changes value of variable in a callframe. Object-based scopes are not supported and must be - /// mutated manually. - /// - public sealed class SetVariableValueCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.setVariableValue"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' - /// scope types are allowed. Other scopes could be manipulated manually. - /// - [JsonProperty("scopeNumber")] - public long ScopeNumber - { - get; - set; - } - /// - /// Variable name. - /// - [JsonProperty("variableName")] - public string VariableName - { - get; - set; - } - /// - /// New variable value. - /// - [JsonProperty("newValue")] - public Runtime.CallArgument NewValue - { - get; - set; - } - /// - /// Id of callframe that holds variable. - /// - [JsonProperty("callFrameId")] - public string CallFrameId - { - get; - set; - } - } - - public sealed class SetVariableValueCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/StepIntoCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/StepIntoCommand.cs deleted file mode 100644 index cd82f894ca55f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/StepIntoCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Steps into the function call. - /// - public sealed class StepIntoCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.stepInto"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Debugger will issue additional Debugger.paused notification if any async task is scheduled - /// before next pause. - /// - [JsonProperty("breakOnAsyncCall", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? BreakOnAsyncCall - { - get; - set; - } - } - - public sealed class StepIntoCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/StepOutCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/StepOutCommand.cs deleted file mode 100644 index df0e666e54458..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/StepOutCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Steps out of the function call. - /// - public sealed class StepOutCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.stepOut"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class StepOutCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/StepOverCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/StepOverCommand.cs deleted file mode 100644 index e642ecaf84cfb..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Debugger/StepOverCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Debugger -{ - using Newtonsoft.Json; - - /// - /// Steps over the statement. - /// - public sealed class StepOverCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Debugger.stepOver"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class StepOverCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsSession_Domains.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsSession_Domains.cs deleted file mode 100644 index 1cb2e3cd3e27f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsSession_Domains.cs +++ /dev/null @@ -1,183 +0,0 @@ -namespace OpenQA.Selenium.DevTools -{ - using System; - - public partial class DevToolsSession - { - private Lazy m_Browser; - private Lazy m_DOM; - private Lazy m_DOMDebugger; - private Lazy m_Emulation; - private Lazy m_IO; - private Lazy m_Input; - private Lazy m_Log; - private Lazy m_Network; - private Lazy m_Page; - private Lazy m_Performance; - private Lazy m_Security; - private Lazy m_Target; - private Lazy m_Console; - private Lazy m_Debugger; - private Lazy m_Profiler; - private Lazy m_Runtime; - private Lazy m_Schema; - - public DevToolsSession() - { - m_Browser = new Lazy(() => new Browser.BrowserAdapter(this)); - m_DOM = new Lazy(() => new DOM.DOMAdapter(this)); - m_DOMDebugger = new Lazy(() => new DOMDebugger.DOMDebuggerAdapter(this)); - m_Emulation = new Lazy(() => new Emulation.EmulationAdapter(this)); - m_IO = new Lazy(() => new IO.IOAdapter(this)); - m_Input = new Lazy(() => new Input.InputAdapter(this)); - m_Log = new Lazy(() => new Log.LogAdapter(this)); - m_Network = new Lazy(() => new Network.NetworkAdapter(this)); - m_Page = new Lazy(() => new Page.PageAdapter(this)); - m_Performance = new Lazy(() => new Performance.PerformanceAdapter(this)); - m_Security = new Lazy(() => new Security.SecurityAdapter(this)); - m_Target = new Lazy(() => new Target.TargetAdapter(this)); - m_Console = new Lazy(() => new Console.ConsoleAdapter(this)); - m_Debugger = new Lazy(() => new Debugger.DebuggerAdapter(this)); - m_Profiler = new Lazy(() => new Profiler.ProfilerAdapter(this)); - m_Runtime = new Lazy(() => new Runtime.RuntimeAdapter(this)); - m_Schema = new Lazy(() => new Schema.SchemaAdapter(this)); - } - - /// - /// Gets the adapter for the Browser domain. - /// - public Browser.BrowserAdapter Browser - { - get { return m_Browser.Value; } - } - - /// - /// Gets the adapter for the DOM domain. - /// - public DOM.DOMAdapter DOM - { - get { return m_DOM.Value; } - } - - /// - /// Gets the adapter for the DOMDebugger domain. - /// - public DOMDebugger.DOMDebuggerAdapter DOMDebugger - { - get { return m_DOMDebugger.Value; } - } - - /// - /// Gets the adapter for the Emulation domain. - /// - public Emulation.EmulationAdapter Emulation - { - get { return m_Emulation.Value; } - } - - /// - /// Gets the adapter for the IO domain. - /// - public IO.IOAdapter IO - { - get { return m_IO.Value; } - } - - /// - /// Gets the adapter for the Input domain. - /// - public Input.InputAdapter Input - { - get { return m_Input.Value; } - } - - /// - /// Gets the adapter for the Log domain. - /// - public Log.LogAdapter Log - { - get { return m_Log.Value; } - } - - /// - /// Gets the adapter for the Network domain. - /// - public Network.NetworkAdapter Network - { - get { return m_Network.Value; } - } - - /// - /// Gets the adapter for the Page domain. - /// - public Page.PageAdapter Page - { - get { return m_Page.Value; } - } - - /// - /// Gets the adapter for the Performance domain. - /// - public Performance.PerformanceAdapter Performance - { - get { return m_Performance.Value; } - } - - /// - /// Gets the adapter for the Security domain. - /// - public Security.SecurityAdapter Security - { - get { return m_Security.Value; } - } - - /// - /// Gets the adapter for the Target domain. - /// - public Target.TargetAdapter Target - { - get { return m_Target.Value; } - } - - /// - /// Gets the adapter for the Console domain. - /// - public Console.ConsoleAdapter Console - { - get { return m_Console.Value; } - } - - /// - /// Gets the adapter for the Debugger domain. - /// - public Debugger.DebuggerAdapter Debugger - { - get { return m_Debugger.Value; } - } - - /// - /// Gets the adapter for the Profiler domain. - /// - public Profiler.ProfilerAdapter Profiler - { - get { return m_Profiler.Value; } - } - - /// - /// Gets the adapter for the Runtime domain. - /// - public Runtime.RuntimeAdapter Runtime - { - get { return m_Runtime.Value; } - } - - /// - /// Gets the adapter for the Schema domain. - /// - public Schema.SchemaAdapter Schema - { - get { return m_Schema.Value; } - } - - } -} diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/CanEmulateCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/CanEmulateCommand.cs deleted file mode 100644 index f14bc8d667727..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/CanEmulateCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Tells whether emulation is supported. - /// - public sealed class CanEmulateCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.canEmulate"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class CanEmulateCommandResponse : ICommandResponse - { - /// - /// True if emulation is supported. - /// - [JsonProperty("result")] - public bool Result - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/ClearDeviceMetricsOverrideCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/ClearDeviceMetricsOverrideCommand.cs deleted file mode 100644 index 97a2026aec033..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/ClearDeviceMetricsOverrideCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Clears the overriden device metrics. - /// - public sealed class ClearDeviceMetricsOverrideCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.clearDeviceMetricsOverride"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class ClearDeviceMetricsOverrideCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/ClearGeolocationOverrideCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/ClearGeolocationOverrideCommand.cs deleted file mode 100644 index 7ee38236ed51f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/ClearGeolocationOverrideCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Clears the overriden Geolocation Position and Error. - /// - public sealed class ClearGeolocationOverrideCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.clearGeolocationOverride"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class ClearGeolocationOverrideCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/EmulationAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/EmulationAdapter.cs deleted file mode 100644 index 4580ecc4b4c6f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/EmulationAdapter.cs +++ /dev/null @@ -1,207 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the Emulation domain to simplify the command interface. - /// - public class EmulationAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "Emulation"; - private Dictionary m_eventMap = new Dictionary(); - - public EmulationAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - m_eventMap["virtualTimeBudgetExpired"] = new DevToolsEventData(typeof(VirtualTimeBudgetExpiredEventArgs), OnVirtualTimeBudgetExpired); - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - /// - /// Notification sent after the virtual time budget for the current VirtualTimePolicy has run out. - /// - public event EventHandler VirtualTimeBudgetExpired; - - /// - /// Tells whether emulation is supported. - /// - public async Task CanEmulate(CanEmulateCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new CanEmulateCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Clears the overriden device metrics. - /// - public async Task ClearDeviceMetricsOverride(ClearDeviceMetricsOverrideCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new ClearDeviceMetricsOverrideCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Clears the overriden Geolocation Position and Error. - /// - public async Task ClearGeolocationOverride(ClearGeolocationOverrideCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new ClearGeolocationOverrideCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Requests that page scale factor is reset to initial values. - /// - public async Task ResetPageScaleFactor(ResetPageScaleFactorCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new ResetPageScaleFactorCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enables or disables simulating a focused and active page. - /// - public async Task SetFocusEmulationEnabled(SetFocusEmulationEnabledCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enables CPU throttling to emulate slow CPUs. - /// - public async Task SetCPUThrottlingRate(SetCPUThrottlingRateCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets or clears an override of the default background color of the frame. This override is used - /// if the content does not specify one. - /// - public async Task SetDefaultBackgroundColorOverride(SetDefaultBackgroundColorOverrideCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Overrides the values of device screen dimensions (window.screen.width, window.screen.height, - /// window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media - /// query results). - /// - public async Task SetDeviceMetricsOverride(SetDeviceMetricsOverrideCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// setScrollbarsHidden - /// - public async Task SetScrollbarsHidden(SetScrollbarsHiddenCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// setDocumentCookieDisabled - /// - public async Task SetDocumentCookieDisabled(SetDocumentCookieDisabledCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// setEmitTouchEventsForMouse - /// - public async Task SetEmitTouchEventsForMouse(SetEmitTouchEventsForMouseCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Emulates the given media for CSS media queries. - /// - public async Task SetEmulatedMedia(SetEmulatedMediaCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position - /// unavailable. - /// - public async Task SetGeolocationOverride(SetGeolocationOverrideCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Overrides value returned by the javascript navigator object. - /// - public async Task SetNavigatorOverrides(SetNavigatorOverridesCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets a specified page scale factor. - /// - public async Task SetPageScaleFactor(SetPageScaleFactorCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Switches script execution in the page. - /// - public async Task SetScriptExecutionDisabled(SetScriptExecutionDisabledCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enables touch on platforms which do not support them. - /// - public async Task SetTouchEmulationEnabled(SetTouchEmulationEnabledCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets - /// the current virtual time policy. Note this supersedes any previous time budget. - /// - public async Task SetVirtualTimePolicy(SetVirtualTimePolicyCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Resizes the frame/viewport of the page. Note that this does not affect the frame's container - /// (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported - /// on Android. - /// - public async Task SetVisibleSize(SetVisibleSizeCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Allows overriding user agent with the given string. - /// - public async Task SetUserAgentOverride(SetUserAgentOverrideCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - private void OnVirtualTimeBudgetExpired(object rawEventArgs) - { - VirtualTimeBudgetExpiredEventArgs e = rawEventArgs as VirtualTimeBudgetExpiredEventArgs; - if (e != null && VirtualTimeBudgetExpired != null) - { - VirtualTimeBudgetExpired(this, e); - } - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/ResetPageScaleFactorCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/ResetPageScaleFactorCommand.cs deleted file mode 100644 index 88d40a2e04c9b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/ResetPageScaleFactorCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Requests that page scale factor is reset to initial values. - /// - public sealed class ResetPageScaleFactorCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.resetPageScaleFactor"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class ResetPageScaleFactorCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/ScreenOrientation.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/ScreenOrientation.cs deleted file mode 100644 index 1c4db7917ab9a..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/ScreenOrientation.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Screen orientation. - /// - public sealed class ScreenOrientation - { - /// - /// Orientation type. - /// - [JsonProperty("type")] - public string Type - { - get; - set; - } - /// - /// Orientation angle. - /// - [JsonProperty("angle")] - public long Angle - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetCPUThrottlingRateCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetCPUThrottlingRateCommand.cs deleted file mode 100644 index 54aecc2129fe3..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetCPUThrottlingRateCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Enables CPU throttling to emulate slow CPUs. - /// - public sealed class SetCPUThrottlingRateCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.setCPUThrottlingRate"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc). - /// - [JsonProperty("rate")] - public double Rate - { - get; - set; - } - } - - public sealed class SetCPUThrottlingRateCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetDefaultBackgroundColorOverrideCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetDefaultBackgroundColorOverrideCommand.cs deleted file mode 100644 index b68907d284a09..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetDefaultBackgroundColorOverrideCommand.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Sets or clears an override of the default background color of the frame. This override is used - /// if the content does not specify one. - /// - public sealed class SetDefaultBackgroundColorOverrideCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.setDefaultBackgroundColorOverride"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// RGBA of the default background color. If not specified, any existing override will be - /// cleared. - /// - [JsonProperty("color", DefaultValueHandling = DefaultValueHandling.Ignore)] - public DOM.RGBA Color - { - get; - set; - } - } - - public sealed class SetDefaultBackgroundColorOverrideCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetDeviceMetricsOverrideCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetDeviceMetricsOverrideCommand.cs deleted file mode 100644 index e9653ce1bf876..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetDeviceMetricsOverrideCommand.cs +++ /dev/null @@ -1,135 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Overrides the values of device screen dimensions (window.screen.width, window.screen.height, - /// window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media - /// query results). - /// - public sealed class SetDeviceMetricsOverrideCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.setDeviceMetricsOverride"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. - /// - [JsonProperty("width")] - public long Width - { - get; - set; - } - /// - /// Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. - /// - [JsonProperty("height")] - public long Height - { - get; - set; - } - /// - /// Overriding device scale factor value. 0 disables the override. - /// - [JsonProperty("deviceScaleFactor")] - public double DeviceScaleFactor - { - get; - set; - } - /// - /// Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text - /// autosizing and more. - /// - [JsonProperty("mobile")] - public bool Mobile - { - get; - set; - } - /// - /// Scale to apply to resulting view image. - /// - [JsonProperty("scale", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Scale - { - get; - set; - } - /// - /// Overriding screen width value in pixels (minimum 0, maximum 10000000). - /// - [JsonProperty("screenWidth", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ScreenWidth - { - get; - set; - } - /// - /// Overriding screen height value in pixels (minimum 0, maximum 10000000). - /// - [JsonProperty("screenHeight", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ScreenHeight - { - get; - set; - } - /// - /// Overriding view X position on screen in pixels (minimum 0, maximum 10000000). - /// - [JsonProperty("positionX", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? PositionX - { - get; - set; - } - /// - /// Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). - /// - [JsonProperty("positionY", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? PositionY - { - get; - set; - } - /// - /// Do not set visible view size, rely upon explicit setVisibleSize call. - /// - [JsonProperty("dontSetVisibleSize", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? DontSetVisibleSize - { - get; - set; - } - /// - /// Screen orientation override. - /// - [JsonProperty("screenOrientation", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ScreenOrientation ScreenOrientation - { - get; - set; - } - /// - /// If set, the visible area of the page will be overridden to this viewport. This viewport - /// change is not observed by the page, e.g. viewport-relative elements do not change positions. - /// - [JsonProperty("viewport", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Page.Viewport Viewport - { - get; - set; - } - } - - public sealed class SetDeviceMetricsOverrideCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetDocumentCookieDisabledCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetDocumentCookieDisabledCommand.cs deleted file mode 100644 index 24dcd6afdb512..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetDocumentCookieDisabledCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// SetDocumentCookieDisabled - /// - public sealed class SetDocumentCookieDisabledCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.setDocumentCookieDisabled"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Whether document.coookie API should be disabled. - /// - [JsonProperty("disabled")] - public bool Disabled - { - get; - set; - } - } - - public sealed class SetDocumentCookieDisabledCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetEmitTouchEventsForMouseCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetEmitTouchEventsForMouseCommand.cs deleted file mode 100644 index 2a828f628baad..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetEmitTouchEventsForMouseCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// SetEmitTouchEventsForMouse - /// - public sealed class SetEmitTouchEventsForMouseCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.setEmitTouchEventsForMouse"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Whether touch emulation based on mouse input should be enabled. - /// - [JsonProperty("enabled")] - public bool Enabled - { - get; - set; - } - /// - /// Touch/gesture events configuration. Default: current platform. - /// - [JsonProperty("configuration", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Configuration - { - get; - set; - } - } - - public sealed class SetEmitTouchEventsForMouseCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetEmulatedMediaCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetEmulatedMediaCommand.cs deleted file mode 100644 index 349cde3a08dc7..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetEmulatedMediaCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Emulates the given media for CSS media queries. - /// - public sealed class SetEmulatedMediaCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.setEmulatedMedia"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Media type to emulate. Empty string disables the override. - /// - [JsonProperty("media")] - public string Media - { - get; - set; - } - } - - public sealed class SetEmulatedMediaCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetFocusEmulationEnabledCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetFocusEmulationEnabledCommand.cs deleted file mode 100644 index 6f8fb71de7c02..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetFocusEmulationEnabledCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Enables or disables simulating a focused and active page. - /// - public sealed class SetFocusEmulationEnabledCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.setFocusEmulationEnabled"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Whether to enable to disable focus emulation. - /// - [JsonProperty("enabled")] - public bool Enabled - { - get; - set; - } - } - - public sealed class SetFocusEmulationEnabledCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetGeolocationOverrideCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetGeolocationOverrideCommand.cs deleted file mode 100644 index a9513d77beb6f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetGeolocationOverrideCommand.cs +++ /dev/null @@ -1,51 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position - /// unavailable. - /// - public sealed class SetGeolocationOverrideCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.setGeolocationOverride"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Mock latitude - /// - [JsonProperty("latitude", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Latitude - { - get; - set; - } - /// - /// Mock longitude - /// - [JsonProperty("longitude", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Longitude - { - get; - set; - } - /// - /// Mock accuracy - /// - [JsonProperty("accuracy", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Accuracy - { - get; - set; - } - } - - public sealed class SetGeolocationOverrideCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetNavigatorOverridesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetNavigatorOverridesCommand.cs deleted file mode 100644 index 2e9ceaf5d9bed..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetNavigatorOverridesCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Overrides value returned by the javascript navigator object. - /// - public sealed class SetNavigatorOverridesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.setNavigatorOverrides"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// The platform navigator.platform should return. - /// - [JsonProperty("platform")] - public string Platform - { - get; - set; - } - } - - public sealed class SetNavigatorOverridesCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetPageScaleFactorCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetPageScaleFactorCommand.cs deleted file mode 100644 index faf066b95b1f4..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetPageScaleFactorCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Sets a specified page scale factor. - /// - public sealed class SetPageScaleFactorCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.setPageScaleFactor"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Page scale factor. - /// - [JsonProperty("pageScaleFactor")] - public double PageScaleFactor - { - get; - set; - } - } - - public sealed class SetPageScaleFactorCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetScriptExecutionDisabledCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetScriptExecutionDisabledCommand.cs deleted file mode 100644 index 2a9cb5efe4562..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetScriptExecutionDisabledCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Switches script execution in the page. - /// - public sealed class SetScriptExecutionDisabledCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.setScriptExecutionDisabled"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Whether script execution should be disabled in the page. - /// - [JsonProperty("value")] - public bool Value - { - get; - set; - } - } - - public sealed class SetScriptExecutionDisabledCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetScrollbarsHiddenCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetScrollbarsHiddenCommand.cs deleted file mode 100644 index d10538f7803c6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetScrollbarsHiddenCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// SetScrollbarsHidden - /// - public sealed class SetScrollbarsHiddenCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.setScrollbarsHidden"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Whether scrollbars should be always hidden. - /// - [JsonProperty("hidden")] - public bool Hidden - { - get; - set; - } - } - - public sealed class SetScrollbarsHiddenCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetTouchEmulationEnabledCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetTouchEmulationEnabledCommand.cs deleted file mode 100644 index 2b8bcd8b58da2..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetTouchEmulationEnabledCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Enables touch on platforms which do not support them. - /// - public sealed class SetTouchEmulationEnabledCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.setTouchEmulationEnabled"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Whether the touch event emulation should be enabled. - /// - [JsonProperty("enabled")] - public bool Enabled - { - get; - set; - } - /// - /// Maximum touch points supported. Defaults to one. - /// - [JsonProperty("maxTouchPoints", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? MaxTouchPoints - { - get; - set; - } - } - - public sealed class SetTouchEmulationEnabledCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetUserAgentOverrideCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetUserAgentOverrideCommand.cs deleted file mode 100644 index 04293cdde2c27..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetUserAgentOverrideCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Allows overriding user agent with the given string. - /// - public sealed class SetUserAgentOverrideCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.setUserAgentOverride"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// User agent to use. - /// - [JsonProperty("userAgent")] - public string UserAgent - { - get; - set; - } - /// - /// Browser langugage to emulate. - /// - [JsonProperty("acceptLanguage", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string AcceptLanguage - { - get; - set; - } - /// - /// The platform navigator.platform should return. - /// - [JsonProperty("platform", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Platform - { - get; - set; - } - } - - public sealed class SetUserAgentOverrideCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetVirtualTimePolicyCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetVirtualTimePolicyCommand.cs deleted file mode 100644 index 9c1961a9056e4..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetVirtualTimePolicyCommand.cs +++ /dev/null @@ -1,81 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets - /// the current virtual time policy. Note this supersedes any previous time budget. - /// - public sealed class SetVirtualTimePolicyCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.setVirtualTimePolicy"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the policy - /// - [JsonProperty("policy")] - public VirtualTimePolicy Policy - { - get; - set; - } - /// - /// If set, after this many virtual milliseconds have elapsed virtual time will be paused and a - /// virtualTimeBudgetExpired event is sent. - /// - [JsonProperty("budget", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Budget - { - get; - set; - } - /// - /// If set this specifies the maximum number of tasks that can be run before virtual is forced - /// forwards to prevent deadlock. - /// - [JsonProperty("maxVirtualTimeTaskStarvationCount", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? MaxVirtualTimeTaskStarvationCount - { - get; - set; - } - /// - /// If set the virtual time policy change should be deferred until any frame starts navigating. - /// Note any previous deferred policy change is superseded. - /// - [JsonProperty("waitForNavigation", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? WaitForNavigation - { - get; - set; - } - /// - /// If set, base::Time::Now will be overriden to initially return this value. - /// - [JsonProperty("initialVirtualTime", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? InitialVirtualTime - { - get; - set; - } - } - - public sealed class SetVirtualTimePolicyCommandResponse : ICommandResponse - { - /// - /// Absolute timestamp at which virtual time was first enabled (up time in milliseconds). - /// - [JsonProperty("virtualTimeTicksBase")] - public double VirtualTimeTicksBase - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetVisibleSizeCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetVisibleSizeCommand.cs deleted file mode 100644 index d5e9eff32acb1..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/SetVisibleSizeCommand.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - - /// - /// Resizes the frame/viewport of the page. Note that this does not affect the frame's container - /// (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported - /// on Android. - /// - public sealed class SetVisibleSizeCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Emulation.setVisibleSize"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Frame width (DIP). - /// - [JsonProperty("width")] - public long Width - { - get; - set; - } - /// - /// Frame height (DIP). - /// - [JsonProperty("height")] - public long Height - { - get; - set; - } - } - - public sealed class SetVisibleSizeCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/VirtualTimeBudgetExpiredEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/VirtualTimeBudgetExpiredEventArgs.cs deleted file mode 100644 index 7142e96f42a03..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/VirtualTimeBudgetExpiredEventArgs.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using System; - using Newtonsoft.Json; - - /// - /// Notification sent after the virtual time budget for the current VirtualTimePolicy has run out. - /// - public sealed class VirtualTimeBudgetExpiredEventArgs : EventArgs - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/VirtualTimePolicy.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/VirtualTimePolicy.cs deleted file mode 100644 index a45b2d1366509..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Emulation/VirtualTimePolicy.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Emulation -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to - /// allow the next delayed task (if any) to run; pause: The virtual time base may not advance; - /// pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending - /// resource fetches. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum VirtualTimePolicy - { - [EnumMember(Value = "advance")] - Advance, - [EnumMember(Value = "pause")] - Pause, - [EnumMember(Value = "pauseIfNetworkFetchesPending")] - PauseIfNetworkFetchesPending, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/IO/CloseCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/IO/CloseCommand.cs deleted file mode 100644 index 97b03e032acc9..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/IO/CloseCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.IO -{ - using Newtonsoft.Json; - - /// - /// Close the stream, discard any temporary backing storage. - /// - public sealed class CloseCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "IO.close"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Handle of the stream to close. - /// - [JsonProperty("handle")] - public string Handle - { - get; - set; - } - } - - public sealed class CloseCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/IO/IOAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/IO/IOAdapter.cs deleted file mode 100644 index 0d7675fea542e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/IO/IOAdapter.cs +++ /dev/null @@ -1,68 +0,0 @@ -namespace OpenQA.Selenium.DevTools.IO -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the IO domain to simplify the command interface. - /// - public class IOAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "IO"; - private Dictionary m_eventMap = new Dictionary(); - - public IOAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - - /// - /// Close the stream, discard any temporary backing storage. - /// - public async Task Close(CloseCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Read a chunk of the stream - /// - public async Task Read(ReadCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Return UUID of Blob object specified by a remote object id. - /// - public async Task ResolveBlob(ResolveBlobCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/IO/ReadCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/IO/ReadCommand.cs deleted file mode 100644 index 0c840b5ff69ad..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/IO/ReadCommand.cs +++ /dev/null @@ -1,78 +0,0 @@ -namespace OpenQA.Selenium.DevTools.IO -{ - using Newtonsoft.Json; - - /// - /// Read a chunk of the stream - /// - public sealed class ReadCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "IO.read"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Handle of the stream to read. - /// - [JsonProperty("handle")] - public string Handle - { - get; - set; - } - /// - /// Seek to the specified offset before reading (if not specificed, proceed with offset - /// following the last read). Some types of streams may only support sequential reads. - /// - [JsonProperty("offset", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Offset - { - get; - set; - } - /// - /// Maximum number of bytes to read (left upon the agent discretion if not specified). - /// - [JsonProperty("size", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Size - { - get; - set; - } - } - - public sealed class ReadCommandResponse : ICommandResponse - { - /// - /// Set if the data is base64-encoded - /// - [JsonProperty("base64Encoded", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Base64Encoded - { - get; - set; - } - /// - /// Data that were read. - /// - [JsonProperty("data")] - public string Data - { - get; - set; - } - /// - /// Set if the end-of-file condition occured while reading. - /// - [JsonProperty("eof")] - public bool Eof - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/IO/ResolveBlobCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/IO/ResolveBlobCommand.cs deleted file mode 100644 index 56885f23ec6ca..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/IO/ResolveBlobCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.IO -{ - using Newtonsoft.Json; - - /// - /// Return UUID of Blob object specified by a remote object id. - /// - public sealed class ResolveBlobCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "IO.resolveBlob"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Object id of a Blob object wrapper. - /// - [JsonProperty("objectId")] - public string ObjectId - { - get; - set; - } - } - - public sealed class ResolveBlobCommandResponse : ICommandResponse - { - /// - /// UUID of the specified Blob. - /// - [JsonProperty("uuid")] - public string Uuid - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/DispatchKeyEventCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Input/DispatchKeyEventCommand.cs deleted file mode 100644 index ba83d8f1cd482..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/DispatchKeyEventCommand.cs +++ /dev/null @@ -1,154 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Input -{ - using Newtonsoft.Json; - - /// - /// Dispatches a key event to the page. - /// - public sealed class DispatchKeyEventCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Input.dispatchKeyEvent"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Type of the key event. - /// - [JsonProperty("type")] - public string Type - { - get; - set; - } - /// - /// Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 - /// (default: 0). - /// - [JsonProperty("modifiers", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Modifiers - { - get; - set; - } - /// - /// Time at which the event occurred. - /// - [JsonProperty("timestamp", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Timestamp - { - get; - set; - } - /// - /// Text as generated by processing a virtual key code with a keyboard layout. Not needed for - /// for `keyUp` and `rawKeyDown` events (default: "") - /// - [JsonProperty("text", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Text - { - get; - set; - } - /// - /// Text that would have been generated by the keyboard if no modifiers were pressed (except for - /// shift). Useful for shortcut (accelerator) key handling (default: ""). - /// - [JsonProperty("unmodifiedText", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string UnmodifiedText - { - get; - set; - } - /// - /// Unique key identifier (e.g., 'U+0041') (default: ""). - /// - [JsonProperty("keyIdentifier", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string KeyIdentifier - { - get; - set; - } - /// - /// Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: ""). - /// - [JsonProperty("code", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Code - { - get; - set; - } - /// - /// Unique DOM defined string value describing the meaning of the key in the context of active - /// modifiers, keyboard layout, etc (e.g., 'AltGr') (default: ""). - /// - [JsonProperty("key", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Key - { - get; - set; - } - /// - /// Windows virtual key code (default: 0). - /// - [JsonProperty("windowsVirtualKeyCode", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? WindowsVirtualKeyCode - { - get; - set; - } - /// - /// Native virtual key code (default: 0). - /// - [JsonProperty("nativeVirtualKeyCode", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? NativeVirtualKeyCode - { - get; - set; - } - /// - /// Whether the event was generated from auto repeat (default: false). - /// - [JsonProperty("autoRepeat", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? AutoRepeat - { - get; - set; - } - /// - /// Whether the event was generated from the keypad (default: false). - /// - [JsonProperty("isKeypad", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IsKeypad - { - get; - set; - } - /// - /// Whether the event was a system key event (default: false). - /// - [JsonProperty("isSystemKey", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IsSystemKey - { - get; - set; - } - /// - /// Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: - /// 0). - /// - [JsonProperty("location", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Location - { - get; - set; - } - } - - public sealed class DispatchKeyEventCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/DispatchMouseEventCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Input/DispatchMouseEventCommand.cs deleted file mode 100644 index 05952d0ec161b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/DispatchMouseEventCommand.cs +++ /dev/null @@ -1,125 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Input -{ - using Newtonsoft.Json; - - /// - /// Dispatches a mouse event to the page. - /// - public sealed class DispatchMouseEventCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Input.dispatchMouseEvent"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Type of the mouse event. - /// - [JsonProperty("type")] - public string Type - { - get; - set; - } - /// - /// X coordinate of the event relative to the main frame's viewport in CSS pixels. - /// - [JsonProperty("x")] - public double X - { - get; - set; - } - /// - /// Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to - /// the top of the viewport and Y increases as it proceeds towards the bottom of the viewport. - /// - [JsonProperty("y")] - public double Y - { - get; - set; - } - /// - /// Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 - /// (default: 0). - /// - [JsonProperty("modifiers", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Modifiers - { - get; - set; - } - /// - /// Time at which the event occurred. - /// - [JsonProperty("timestamp", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Timestamp - { - get; - set; - } - /// - /// Mouse button (default: "none"). - /// - [JsonProperty("button", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Button - { - get; - set; - } - /// - /// A number indicating which buttons are pressed on the mouse when a mouse event is triggered. - /// Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0. - /// - [JsonProperty("buttons", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Buttons - { - get; - set; - } - /// - /// Number of times the mouse button was clicked (default: 0). - /// - [JsonProperty("clickCount", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ClickCount - { - get; - set; - } - /// - /// X delta in CSS pixels for mouse wheel event (default: 0). - /// - [JsonProperty("deltaX", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? DeltaX - { - get; - set; - } - /// - /// Y delta in CSS pixels for mouse wheel event (default: 0). - /// - [JsonProperty("deltaY", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? DeltaY - { - get; - set; - } - /// - /// Pointer type (default: "mouse"). - /// - [JsonProperty("pointerType", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string PointerType - { - get; - set; - } - } - - public sealed class DispatchMouseEventCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/DispatchTouchEventCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Input/DispatchTouchEventCommand.cs deleted file mode 100644 index 334b279c53a76..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/DispatchTouchEventCommand.cs +++ /dev/null @@ -1,63 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Input -{ - using Newtonsoft.Json; - - /// - /// Dispatches a touch event to the page. - /// - public sealed class DispatchTouchEventCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Input.dispatchTouchEvent"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while - /// TouchStart and TouchMove must contains at least one. - /// - [JsonProperty("type")] - public string Type - { - get; - set; - } - /// - /// Active touch points on the touch device. One event per any changed point (compared to - /// previous touch event in a sequence) is generated, emulating pressing/moving/releasing points - /// one by one. - /// - [JsonProperty("touchPoints")] - public TouchPoint[] TouchPoints - { - get; - set; - } - /// - /// Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 - /// (default: 0). - /// - [JsonProperty("modifiers", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Modifiers - { - get; - set; - } - /// - /// Time at which the event occurred. - /// - [JsonProperty("timestamp", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Timestamp - { - get; - set; - } - } - - public sealed class DispatchTouchEventCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/EmulateTouchFromMouseEventCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Input/EmulateTouchFromMouseEventCommand.cs deleted file mode 100644 index 56097123254f0..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/EmulateTouchFromMouseEventCommand.cs +++ /dev/null @@ -1,105 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Input -{ - using Newtonsoft.Json; - - /// - /// Emulates touch event from the mouse event parameters. - /// - public sealed class EmulateTouchFromMouseEventCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Input.emulateTouchFromMouseEvent"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Type of the mouse event. - /// - [JsonProperty("type")] - public string Type - { - get; - set; - } - /// - /// X coordinate of the mouse pointer in DIP. - /// - [JsonProperty("x")] - public long X - { - get; - set; - } - /// - /// Y coordinate of the mouse pointer in DIP. - /// - [JsonProperty("y")] - public long Y - { - get; - set; - } - /// - /// Mouse button. - /// - [JsonProperty("button")] - public string Button - { - get; - set; - } - /// - /// Time at which the event occurred (default: current time). - /// - [JsonProperty("timestamp", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Timestamp - { - get; - set; - } - /// - /// X delta in DIP for mouse wheel event (default: 0). - /// - [JsonProperty("deltaX", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? DeltaX - { - get; - set; - } - /// - /// Y delta in DIP for mouse wheel event (default: 0). - /// - [JsonProperty("deltaY", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? DeltaY - { - get; - set; - } - /// - /// Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 - /// (default: 0). - /// - [JsonProperty("modifiers", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Modifiers - { - get; - set; - } - /// - /// Number of times the mouse button was clicked (default: 0). - /// - [JsonProperty("clickCount", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ClickCount - { - get; - set; - } - } - - public sealed class EmulateTouchFromMouseEventCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/GestureSourceType.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Input/GestureSourceType.cs deleted file mode 100644 index cb86b2b8a86c4..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/GestureSourceType.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Input -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// GestureSourceType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum GestureSourceType - { - [EnumMember(Value = "default")] - Default, - [EnumMember(Value = "touch")] - Touch, - [EnumMember(Value = "mouse")] - Mouse, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/InputAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Input/InputAdapter.cs deleted file mode 100644 index 4fd8b79a7e260..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/InputAdapter.cs +++ /dev/null @@ -1,111 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Input -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the Input domain to simplify the command interface. - /// - public class InputAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "Input"; - private Dictionary m_eventMap = new Dictionary(); - - public InputAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - - /// - /// Dispatches a key event to the page. - /// - public async Task DispatchKeyEvent(DispatchKeyEventCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// This method emulates inserting text that doesn't come from a key press, - /// for example an emoji keyboard or an IME. - /// - public async Task InsertText(InsertTextCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Dispatches a mouse event to the page. - /// - public async Task DispatchMouseEvent(DispatchMouseEventCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Dispatches a touch event to the page. - /// - public async Task DispatchTouchEvent(DispatchTouchEventCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Emulates touch event from the mouse event parameters. - /// - public async Task EmulateTouchFromMouseEvent(EmulateTouchFromMouseEventCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Ignores input events (useful while auditing page). - /// - public async Task SetIgnoreInputEvents(SetIgnoreInputEventsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Synthesizes a pinch gesture over a time period by issuing appropriate touch events. - /// - public async Task SynthesizePinchGesture(SynthesizePinchGestureCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Synthesizes a scroll gesture over a time period by issuing appropriate touch events. - /// - public async Task SynthesizeScrollGesture(SynthesizeScrollGestureCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Synthesizes a tap gesture over a time period by issuing appropriate touch events. - /// - public async Task SynthesizeTapGesture(SynthesizeTapGestureCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/InsertTextCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Input/InsertTextCommand.cs deleted file mode 100644 index 47c41b8abd315..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/InsertTextCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Input -{ - using Newtonsoft.Json; - - /// - /// This method emulates inserting text that doesn't come from a key press, - /// for example an emoji keyboard or an IME. - /// - public sealed class InsertTextCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Input.insertText"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// The text to insert. - /// - [JsonProperty("text")] - public string Text - { - get; - set; - } - } - - public sealed class InsertTextCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/SetIgnoreInputEventsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Input/SetIgnoreInputEventsCommand.cs deleted file mode 100644 index 12080f7115f80..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/SetIgnoreInputEventsCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Input -{ - using Newtonsoft.Json; - - /// - /// Ignores input events (useful while auditing page). - /// - public sealed class SetIgnoreInputEventsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Input.setIgnoreInputEvents"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Ignores input events processing when set to true. - /// - [JsonProperty("ignore")] - public bool Ignore - { - get; - set; - } - } - - public sealed class SetIgnoreInputEventsCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/SynthesizePinchGestureCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Input/SynthesizePinchGestureCommand.cs deleted file mode 100644 index 26ae83dba155e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/SynthesizePinchGestureCommand.cs +++ /dev/null @@ -1,69 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Input -{ - using Newtonsoft.Json; - - /// - /// Synthesizes a pinch gesture over a time period by issuing appropriate touch events. - /// - public sealed class SynthesizePinchGestureCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Input.synthesizePinchGesture"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// X coordinate of the start of the gesture in CSS pixels. - /// - [JsonProperty("x")] - public double X - { - get; - set; - } - /// - /// Y coordinate of the start of the gesture in CSS pixels. - /// - [JsonProperty("y")] - public double Y - { - get; - set; - } - /// - /// Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out). - /// - [JsonProperty("scaleFactor")] - public double ScaleFactor - { - get; - set; - } - /// - /// Relative pointer speed in pixels per second (default: 800). - /// - [JsonProperty("relativeSpeed", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? RelativeSpeed - { - get; - set; - } - /// - /// Which type of input events to be generated (default: 'default', which queries the platform - /// for the preferred input type). - /// - [JsonProperty("gestureSourceType", DefaultValueHandling = DefaultValueHandling.Ignore)] - public GestureSourceType? GestureSourceType - { - get; - set; - } - } - - public sealed class SynthesizePinchGestureCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/SynthesizeScrollGestureCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Input/SynthesizeScrollGestureCommand.cs deleted file mode 100644 index 0a8ce056b7027..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/SynthesizeScrollGestureCommand.cs +++ /dev/null @@ -1,134 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Input -{ - using Newtonsoft.Json; - - /// - /// Synthesizes a scroll gesture over a time period by issuing appropriate touch events. - /// - public sealed class SynthesizeScrollGestureCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Input.synthesizeScrollGesture"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// X coordinate of the start of the gesture in CSS pixels. - /// - [JsonProperty("x")] - public double X - { - get; - set; - } - /// - /// Y coordinate of the start of the gesture in CSS pixels. - /// - [JsonProperty("y")] - public double Y - { - get; - set; - } - /// - /// The distance to scroll along the X axis (positive to scroll left). - /// - [JsonProperty("xDistance", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? XDistance - { - get; - set; - } - /// - /// The distance to scroll along the Y axis (positive to scroll up). - /// - [JsonProperty("yDistance", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? YDistance - { - get; - set; - } - /// - /// The number of additional pixels to scroll back along the X axis, in addition to the given - /// distance. - /// - [JsonProperty("xOverscroll", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? XOverscroll - { - get; - set; - } - /// - /// The number of additional pixels to scroll back along the Y axis, in addition to the given - /// distance. - /// - [JsonProperty("yOverscroll", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? YOverscroll - { - get; - set; - } - /// - /// Prevent fling (default: true). - /// - [JsonProperty("preventFling", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? PreventFling - { - get; - set; - } - /// - /// Swipe speed in pixels per second (default: 800). - /// - [JsonProperty("speed", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Speed - { - get; - set; - } - /// - /// Which type of input events to be generated (default: 'default', which queries the platform - /// for the preferred input type). - /// - [JsonProperty("gestureSourceType", DefaultValueHandling = DefaultValueHandling.Ignore)] - public GestureSourceType? GestureSourceType - { - get; - set; - } - /// - /// The number of times to repeat the gesture (default: 0). - /// - [JsonProperty("repeatCount", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? RepeatCount - { - get; - set; - } - /// - /// The number of milliseconds delay between each repeat. (default: 250). - /// - [JsonProperty("repeatDelayMs", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? RepeatDelayMs - { - get; - set; - } - /// - /// The name of the interaction markers to generate, if not empty (default: ""). - /// - [JsonProperty("interactionMarkerName", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string InteractionMarkerName - { - get; - set; - } - } - - public sealed class SynthesizeScrollGestureCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/SynthesizeTapGestureCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Input/SynthesizeTapGestureCommand.cs deleted file mode 100644 index e862aa1ee026d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/SynthesizeTapGestureCommand.cs +++ /dev/null @@ -1,69 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Input -{ - using Newtonsoft.Json; - - /// - /// Synthesizes a tap gesture over a time period by issuing appropriate touch events. - /// - public sealed class SynthesizeTapGestureCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Input.synthesizeTapGesture"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// X coordinate of the start of the gesture in CSS pixels. - /// - [JsonProperty("x")] - public double X - { - get; - set; - } - /// - /// Y coordinate of the start of the gesture in CSS pixels. - /// - [JsonProperty("y")] - public double Y - { - get; - set; - } - /// - /// Duration between touchdown and touchup events in ms (default: 50). - /// - [JsonProperty("duration", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Duration - { - get; - set; - } - /// - /// Number of times to perform the tap (e.g. 2 for double tap, default: 1). - /// - [JsonProperty("tapCount", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? TapCount - { - get; - set; - } - /// - /// Which type of input events to be generated (default: 'default', which queries the platform - /// for the preferred input type). - /// - [JsonProperty("gestureSourceType", DefaultValueHandling = DefaultValueHandling.Ignore)] - public GestureSourceType? GestureSourceType - { - get; - set; - } - } - - public sealed class SynthesizeTapGestureCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/TouchPoint.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Input/TouchPoint.cs deleted file mode 100644 index 1dc60b55633c8..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Input/TouchPoint.cs +++ /dev/null @@ -1,75 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Input -{ - using Newtonsoft.Json; - - /// - /// TouchPoint - /// - public sealed class TouchPoint - { - /// - /// X coordinate of the event relative to the main frame's viewport in CSS pixels. - /// - [JsonProperty("x")] - public double X - { - get; - set; - } - /// - /// Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to - /// the top of the viewport and Y increases as it proceeds towards the bottom of the viewport. - /// - [JsonProperty("y")] - public double Y - { - get; - set; - } - /// - /// X radius of the touch area (default: 1.0). - /// - [JsonProperty("radiusX", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? RadiusX - { - get; - set; - } - /// - /// Y radius of the touch area (default: 1.0). - /// - [JsonProperty("radiusY", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? RadiusY - { - get; - set; - } - /// - /// Rotation angle (default: 0.0). - /// - [JsonProperty("rotationAngle", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? RotationAngle - { - get; - set; - } - /// - /// Force (default: 1.0). - /// - [JsonProperty("force", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Force - { - get; - set; - } - /// - /// Identifier used to track touch sources between events, must be unique within an event. - /// - [JsonProperty("id", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Id - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/ClearCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Log/ClearCommand.cs deleted file mode 100644 index b50558aa2c19d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/ClearCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Log -{ - using Newtonsoft.Json; - - /// - /// Clears the log. - /// - public sealed class ClearCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Log.clear"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class ClearCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/DisableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Log/DisableCommand.cs deleted file mode 100644 index a57f567feecb6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/DisableCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Log -{ - using Newtonsoft.Json; - - /// - /// Disables log domain, prevents further log entries from being reported to the client. - /// - public sealed class DisableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Log.disable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class DisableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/EnableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Log/EnableCommand.cs deleted file mode 100644 index 329d77178ef30..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/EnableCommand.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Log -{ - using Newtonsoft.Json; - - /// - /// Enables log domain, sends the entries collected so far to the client by means of the - /// `entryAdded` notification. - /// - public sealed class EnableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Log.enable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class EnableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/EntryAddedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Log/EntryAddedEventArgs.cs deleted file mode 100644 index efc0a01079a24..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/EntryAddedEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Log -{ - using System; - using Newtonsoft.Json; - - /// - /// Issued when new message was logged. - /// - public sealed class EntryAddedEventArgs : EventArgs - { - /// - /// The entry. - /// - [JsonProperty("entry")] - public LogEntry Entry - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/LogAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Log/LogAdapter.cs deleted file mode 100644 index 880fa45f9e59a..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/LogAdapter.cs +++ /dev/null @@ -1,96 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Log -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the Log domain to simplify the command interface. - /// - public class LogAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "Log"; - private Dictionary m_eventMap = new Dictionary(); - - public LogAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - m_eventMap["entryAdded"] = new DevToolsEventData(typeof(EntryAddedEventArgs), OnEntryAdded); - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - /// - /// Issued when new message was logged. - /// - public event EventHandler EntryAdded; - - /// - /// Clears the log. - /// - public async Task Clear(ClearCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new ClearCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Disables log domain, prevents further log entries from being reported to the client. - /// - public async Task Disable(DisableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new DisableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enables log domain, sends the entries collected so far to the client by means of the - /// `entryAdded` notification. - /// - public async Task Enable(EnableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new EnableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// start violation reporting. - /// - public async Task StartViolationsReport(StartViolationsReportCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Stop violation reporting. - /// - public async Task StopViolationsReport(StopViolationsReportCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new StopViolationsReportCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - private void OnEntryAdded(object rawEventArgs) - { - EntryAddedEventArgs e = rawEventArgs as EntryAddedEventArgs; - if (e != null && EntryAdded != null) - { - EntryAdded(this, e); - } - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/LogEntry.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Log/LogEntry.cs deleted file mode 100644 index 72646bf7ab97e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/LogEntry.cs +++ /dev/null @@ -1,101 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Log -{ - using Newtonsoft.Json; - - /// - /// Log entry. - /// - public sealed class LogEntry - { - /// - /// Log entry source. - /// - [JsonProperty("source")] - public string Source - { - get; - set; - } - /// - /// Log entry severity. - /// - [JsonProperty("level")] - public string Level - { - get; - set; - } - /// - /// Logged text. - /// - [JsonProperty("text")] - public string Text - { - get; - set; - } - /// - /// Timestamp when this entry was added. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - /// - /// URL of the resource if known. - /// - [JsonProperty("url", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Url - { - get; - set; - } - /// - /// Line number in the resource. - /// - [JsonProperty("lineNumber", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? LineNumber - { - get; - set; - } - /// - /// JavaScript stack trace. - /// - [JsonProperty("stackTrace", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.StackTrace StackTrace - { - get; - set; - } - /// - /// Identifier of the network request associated with this entry. - /// - [JsonProperty("networkRequestId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string NetworkRequestId - { - get; - set; - } - /// - /// Identifier of the worker associated with this entry. - /// - [JsonProperty("workerId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string WorkerId - { - get; - set; - } - /// - /// Call arguments. - /// - [JsonProperty("args", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.RemoteObject[] Args - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/StartViolationsReportCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Log/StartViolationsReportCommand.cs deleted file mode 100644 index e1b5f569ef764..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/StartViolationsReportCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Log -{ - using Newtonsoft.Json; - - /// - /// start violation reporting. - /// - public sealed class StartViolationsReportCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Log.startViolationsReport"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Configuration for violations. - /// - [JsonProperty("config")] - public ViolationSetting[] Config - { - get; - set; - } - } - - public sealed class StartViolationsReportCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/StopViolationsReportCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Log/StopViolationsReportCommand.cs deleted file mode 100644 index 0353aa8eedc3e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/StopViolationsReportCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Log -{ - using Newtonsoft.Json; - - /// - /// Stop violation reporting. - /// - public sealed class StopViolationsReportCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Log.stopViolationsReport"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class StopViolationsReportCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/ViolationSetting.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Log/ViolationSetting.cs deleted file mode 100644 index 2d95abd2b6561..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Log/ViolationSetting.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Log -{ - using Newtonsoft.Json; - - /// - /// Violation configuration setting. - /// - public sealed class ViolationSetting - { - /// - /// Violation type. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// Time threshold to trigger upon. - /// - [JsonProperty("threshold")] - public double Threshold - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/AuthChallenge.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/AuthChallenge.cs deleted file mode 100644 index b3f688488abd2..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/AuthChallenge.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Authorization challenge for HTTP status code 401 or 407. - /// - public sealed class AuthChallenge - { - /// - /// Source of the authentication challenge. - /// - [JsonProperty("source", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Source - { - get; - set; - } - /// - /// Origin of the challenger. - /// - [JsonProperty("origin")] - public string Origin - { - get; - set; - } - /// - /// The authentication scheme used, such as basic or digest - /// - [JsonProperty("scheme")] - public string Scheme - { - get; - set; - } - /// - /// The realm of the challenge. May be empty. - /// - [JsonProperty("realm")] - public string Realm - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/AuthChallengeResponse.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/AuthChallengeResponse.cs deleted file mode 100644 index b4c70e7eb72d2..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/AuthChallengeResponse.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Response to an AuthChallenge. - /// - public sealed class AuthChallengeResponse - { - /// - /// The decision on what to do in response to the authorization challenge. Default means - /// deferring to the default behavior of the net stack, which will likely either the Cancel - /// authentication or display a popup dialog box. - /// - [JsonProperty("response")] - public string Response - { - get; - set; - } - /// - /// The username to provide, possibly empty. Should only be set if response is - /// ProvideCredentials. - /// - [JsonProperty("username", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Username - { - get; - set; - } - /// - /// The password to provide, possibly empty. Should only be set if response is - /// ProvideCredentials. - /// - [JsonProperty("password", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Password - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/BlockedReason.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/BlockedReason.cs deleted file mode 100644 index f03b11fdc6c94..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/BlockedReason.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// The reason why request was blocked. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum BlockedReason - { - [EnumMember(Value = "other")] - Other, - [EnumMember(Value = "csp")] - Csp, - [EnumMember(Value = "mixed-content")] - MixedContent, - [EnumMember(Value = "origin")] - Origin, - [EnumMember(Value = "inspector")] - Inspector, - [EnumMember(Value = "subresource-filter")] - SubresourceFilter, - [EnumMember(Value = "content-type")] - ContentType, - [EnumMember(Value = "collapsed-by-client")] - CollapsedByClient, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CachedResource.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CachedResource.cs deleted file mode 100644 index 2e7cf87478b3e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CachedResource.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Information about the cached resource. - /// - public sealed class CachedResource - { - /// - /// Resource URL. This is the url of the original network request. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Type of this resource. - /// - [JsonProperty("type")] - public ResourceType Type - { - get; - set; - } - /// - /// Cached response data. - /// - [JsonProperty("response", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Response Response - { - get; - set; - } - /// - /// Cached response body size. - /// - [JsonProperty("bodySize")] - public double BodySize - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CanClearBrowserCacheCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CanClearBrowserCacheCommand.cs deleted file mode 100644 index 30223b1961278..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CanClearBrowserCacheCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Tells whether clearing browser cache is supported. - /// - public sealed class CanClearBrowserCacheCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.canClearBrowserCache"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class CanClearBrowserCacheCommandResponse : ICommandResponse - { - /// - /// True if browser cache can be cleared. - /// - [JsonProperty("result")] - public bool Result - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CanClearBrowserCookiesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CanClearBrowserCookiesCommand.cs deleted file mode 100644 index 712f42e8ebfa3..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CanClearBrowserCookiesCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Tells whether clearing browser cookies is supported. - /// - public sealed class CanClearBrowserCookiesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.canClearBrowserCookies"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class CanClearBrowserCookiesCommandResponse : ICommandResponse - { - /// - /// True if browser cookies can be cleared. - /// - [JsonProperty("result")] - public bool Result - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CanEmulateNetworkConditionsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CanEmulateNetworkConditionsCommand.cs deleted file mode 100644 index 9027b2a6b572c..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CanEmulateNetworkConditionsCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Tells whether emulation of network conditions is supported. - /// - public sealed class CanEmulateNetworkConditionsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.canEmulateNetworkConditions"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class CanEmulateNetworkConditionsCommandResponse : ICommandResponse - { - /// - /// True if emulation of network conditions is supported. - /// - [JsonProperty("result")] - public bool Result - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CertificateTransparencyCompliance.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CertificateTransparencyCompliance.cs deleted file mode 100644 index ecb91654910f9..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CertificateTransparencyCompliance.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// Whether the request complied with Certificate Transparency policy. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CertificateTransparencyCompliance - { - [EnumMember(Value = "unknown")] - Unknown, - [EnumMember(Value = "not-compliant")] - NotCompliant, - [EnumMember(Value = "compliant")] - Compliant, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ClearBrowserCacheCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ClearBrowserCacheCommand.cs deleted file mode 100644 index d78c873a2a004..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ClearBrowserCacheCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Clears browser cache. - /// - public sealed class ClearBrowserCacheCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.clearBrowserCache"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class ClearBrowserCacheCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ClearBrowserCookiesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ClearBrowserCookiesCommand.cs deleted file mode 100644 index 6b233a70d20fd..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ClearBrowserCookiesCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Clears browser cookies. - /// - public sealed class ClearBrowserCookiesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.clearBrowserCookies"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class ClearBrowserCookiesCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ConnectionType.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ConnectionType.cs deleted file mode 100644 index e45ad97d3936b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ConnectionType.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// The underlying connection technology that the browser is supposedly using. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ConnectionType - { - [EnumMember(Value = "none")] - None, - [EnumMember(Value = "cellular2g")] - Cellular2g, - [EnumMember(Value = "cellular3g")] - Cellular3g, - [EnumMember(Value = "cellular4g")] - Cellular4g, - [EnumMember(Value = "bluetooth")] - Bluetooth, - [EnumMember(Value = "ethernet")] - Ethernet, - [EnumMember(Value = "wifi")] - Wifi, - [EnumMember(Value = "wimax")] - Wimax, - [EnumMember(Value = "other")] - Other, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ContinueInterceptedRequestCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ContinueInterceptedRequestCommand.cs deleted file mode 100644 index edc42ebbed927..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ContinueInterceptedRequestCommand.cs +++ /dev/null @@ -1,104 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Response to Network.requestIntercepted which either modifies the request to continue with any - /// modifications, or blocks it, or completes it with the provided response bytes. If a network - /// fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted - /// event will be sent with the same InterceptionId. - /// - public sealed class ContinueInterceptedRequestCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.continueInterceptedRequest"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the interceptionId - /// - [JsonProperty("interceptionId")] - public string InterceptionId - { - get; - set; - } - /// - /// If set this causes the request to fail with the given reason. Passing `Aborted` for requests - /// marked with `isNavigationRequest` also cancels the navigation. Must not be set in response - /// to an authChallenge. - /// - [JsonProperty("errorReason", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ErrorReason? ErrorReason - { - get; - set; - } - /// - /// If set the requests completes using with the provided base64 encoded raw response, including - /// HTTP status line and headers etc... Must not be set in response to an authChallenge. - /// - [JsonProperty("rawResponse", DefaultValueHandling = DefaultValueHandling.Ignore)] - public byte[] RawResponse - { - get; - set; - } - /// - /// If set the request url will be modified in a way that's not observable by page. Must not be - /// set in response to an authChallenge. - /// - [JsonProperty("url", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Url - { - get; - set; - } - /// - /// If set this allows the request method to be overridden. Must not be set in response to an - /// authChallenge. - /// - [JsonProperty("method", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Method - { - get; - set; - } - /// - /// If set this allows postData to be set. Must not be set in response to an authChallenge. - /// - [JsonProperty("postData", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string PostData - { - get; - set; - } - /// - /// If set this allows the request headers to be changed. Must not be set in response to an - /// authChallenge. - /// - [JsonProperty("headers", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Headers Headers - { - get; - set; - } - /// - /// Response to a requestIntercepted with an authChallenge. Must not be set otherwise. - /// - [JsonProperty("authChallengeResponse", DefaultValueHandling = DefaultValueHandling.Ignore)] - public AuthChallengeResponse AuthChallengeResponse - { - get; - set; - } - } - - public sealed class ContinueInterceptedRequestCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/Cookie.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/Cookie.cs deleted file mode 100644 index 70eaf47792cc5..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/Cookie.cs +++ /dev/null @@ -1,101 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Cookie object - /// - public sealed class Cookie - { - /// - /// Cookie name. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// Cookie value. - /// - [JsonProperty("value")] - public string Value - { - get; - set; - } - /// - /// Cookie domain. - /// - [JsonProperty("domain")] - public string Domain - { - get; - set; - } - /// - /// Cookie path. - /// - [JsonProperty("path")] - public string Path - { - get; - set; - } - /// - /// Cookie expiration date as the number of seconds since the UNIX epoch. - /// - [JsonProperty("expires")] - public double Expires - { - get; - set; - } - /// - /// Cookie size. - /// - [JsonProperty("size")] - public long Size - { - get; - set; - } - /// - /// True if cookie is http-only. - /// - [JsonProperty("httpOnly")] - public bool HttpOnly - { - get; - set; - } - /// - /// True if cookie is secure. - /// - [JsonProperty("secure")] - public bool Secure - { - get; - set; - } - /// - /// True in case of session cookie. - /// - [JsonProperty("session")] - public bool Session - { - get; - set; - } - /// - /// Cookie SameSite type. - /// - [JsonProperty("sameSite", DefaultValueHandling = DefaultValueHandling.Ignore)] - public CookieSameSite? SameSite - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CookieParam.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CookieParam.cs deleted file mode 100644 index 6077ed07d1ffd..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CookieParam.cs +++ /dev/null @@ -1,93 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Cookie parameter object - /// - public sealed class CookieParam - { - /// - /// Cookie name. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// Cookie value. - /// - [JsonProperty("value")] - public string Value - { - get; - set; - } - /// - /// The request-URI to associate with the setting of the cookie. This value can affect the - /// default domain and path values of the created cookie. - /// - [JsonProperty("url", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Url - { - get; - set; - } - /// - /// Cookie domain. - /// - [JsonProperty("domain", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Domain - { - get; - set; - } - /// - /// Cookie path. - /// - [JsonProperty("path", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Path - { - get; - set; - } - /// - /// True if cookie is secure. - /// - [JsonProperty("secure", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Secure - { - get; - set; - } - /// - /// True if cookie is http-only. - /// - [JsonProperty("httpOnly", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? HttpOnly - { - get; - set; - } - /// - /// Cookie SameSite type. - /// - [JsonProperty("sameSite", DefaultValueHandling = DefaultValueHandling.Ignore)] - public CookieSameSite? SameSite - { - get; - set; - } - /// - /// Cookie expiration date, session cookie if not set - /// - [JsonProperty("expires", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Expires - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CookieSameSite.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CookieSameSite.cs deleted file mode 100644 index 4a6ad9005fefb..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/CookieSameSite.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// Represents the cookie's 'SameSite' status: - /// https://tools.ietf.org/html/draft-west-first-party-cookies - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CookieSameSite - { - [EnumMember(Value = "Strict")] - Strict, - [EnumMember(Value = "Lax")] - Lax, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/DataReceivedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/DataReceivedEventArgs.cs deleted file mode 100644 index 48df02e0a62a6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/DataReceivedEventArgs.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when data chunk was received over the network. - /// - public sealed class DataReceivedEventArgs : EventArgs - { - /// - /// Request identifier. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - /// - /// Timestamp. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - /// - /// Data chunk length. - /// - [JsonProperty("dataLength")] - public long DataLength - { - get; - set; - } - /// - /// Actual bytes received (might be less than dataLength for compressed encodings). - /// - [JsonProperty("encodedDataLength")] - public long EncodedDataLength - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/DeleteCookiesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/DeleteCookiesCommand.cs deleted file mode 100644 index e7c663cf2cb76..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/DeleteCookiesCommand.cs +++ /dev/null @@ -1,60 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Deletes browser cookies with matching name and url or domain/path pair. - /// - public sealed class DeleteCookiesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.deleteCookies"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Name of the cookies to remove. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// If specified, deletes all the cookies with the given name where domain and path match - /// provided URL. - /// - [JsonProperty("url", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Url - { - get; - set; - } - /// - /// If specified, deletes only cookies with the exact domain. - /// - [JsonProperty("domain", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Domain - { - get; - set; - } - /// - /// If specified, deletes only cookies with the exact path. - /// - [JsonProperty("path", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Path - { - get; - set; - } - } - - public sealed class DeleteCookiesCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/DisableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/DisableCommand.cs deleted file mode 100644 index 0738596595577..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/DisableCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Disables network tracking, prevents network events from being sent to the client. - /// - public sealed class DisableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.disable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class DisableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/EmulateNetworkConditionsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/EmulateNetworkConditionsCommand.cs deleted file mode 100644 index 20f7447e85f50..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/EmulateNetworkConditionsCommand.cs +++ /dev/null @@ -1,68 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Activates emulation of network conditions. - /// - public sealed class EmulateNetworkConditionsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.emulateNetworkConditions"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// True to emulate internet disconnection. - /// - [JsonProperty("offline")] - public bool Offline - { - get; - set; - } - /// - /// Minimum latency from request sent to response headers received (ms). - /// - [JsonProperty("latency")] - public double Latency - { - get; - set; - } - /// - /// Maximal aggregated download throughput (bytes/sec). -1 disables download throttling. - /// - [JsonProperty("downloadThroughput")] - public double DownloadThroughput - { - get; - set; - } - /// - /// Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling. - /// - [JsonProperty("uploadThroughput")] - public double UploadThroughput - { - get; - set; - } - /// - /// Connection type if known. - /// - [JsonProperty("connectionType", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ConnectionType? ConnectionType - { - get; - set; - } - } - - public sealed class EmulateNetworkConditionsCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/EnableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/EnableCommand.cs deleted file mode 100644 index 0837bbda79394..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/EnableCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Enables network tracking, network events will now be delivered to the client. - /// - public sealed class EnableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.enable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Buffer size in bytes to use when preserving network payloads (XHRs, etc). - /// - [JsonProperty("maxTotalBufferSize", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? MaxTotalBufferSize - { - get; - set; - } - /// - /// Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc). - /// - [JsonProperty("maxResourceBufferSize", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? MaxResourceBufferSize - { - get; - set; - } - /// - /// Longest post body size (in bytes) that would be included in requestWillBeSent notification - /// - [JsonProperty("maxPostDataSize", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? MaxPostDataSize - { - get; - set; - } - } - - public sealed class EnableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ErrorReason.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ErrorReason.cs deleted file mode 100644 index f034f3b06dd49..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ErrorReason.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// Network level fetch failure reason. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ErrorReason - { - [EnumMember(Value = "Failed")] - Failed, - [EnumMember(Value = "Aborted")] - Aborted, - [EnumMember(Value = "TimedOut")] - TimedOut, - [EnumMember(Value = "AccessDenied")] - AccessDenied, - [EnumMember(Value = "ConnectionClosed")] - ConnectionClosed, - [EnumMember(Value = "ConnectionReset")] - ConnectionReset, - [EnumMember(Value = "ConnectionRefused")] - ConnectionRefused, - [EnumMember(Value = "ConnectionAborted")] - ConnectionAborted, - [EnumMember(Value = "ConnectionFailed")] - ConnectionFailed, - [EnumMember(Value = "NameNotResolved")] - NameNotResolved, - [EnumMember(Value = "InternetDisconnected")] - InternetDisconnected, - [EnumMember(Value = "AddressUnreachable")] - AddressUnreachable, - [EnumMember(Value = "BlockedByClient")] - BlockedByClient, - [EnumMember(Value = "BlockedByResponse")] - BlockedByResponse, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/EventSourceMessageReceivedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/EventSourceMessageReceivedEventArgs.cs deleted file mode 100644 index 8365314de60dd..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/EventSourceMessageReceivedEventArgs.cs +++ /dev/null @@ -1,57 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when EventSource message is received. - /// - public sealed class EventSourceMessageReceivedEventArgs : EventArgs - { - /// - /// Request identifier. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - /// - /// Timestamp. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - /// - /// Message type. - /// - [JsonProperty("eventName")] - public string EventName - { - get; - set; - } - /// - /// Message identifier. - /// - [JsonProperty("eventId")] - public string EventId - { - get; - set; - } - /// - /// Message content. - /// - [JsonProperty("data")] - public string Data - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetAllCookiesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetAllCookiesCommand.cs deleted file mode 100644 index 5c96b68f99827..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetAllCookiesCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Returns all browser cookies. Depending on the backend support, will return detailed cookie - /// information in the `cookies` field. - /// - public sealed class GetAllCookiesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.getAllCookies"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetAllCookiesCommandResponse : ICommandResponse - { - /// - /// Array of cookie objects. - /// - [JsonProperty("cookies")] - public Cookie[] Cookies - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetCertificateCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetCertificateCommand.cs deleted file mode 100644 index b3409e7d91421..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetCertificateCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Returns the DER-encoded certificate. - /// - public sealed class GetCertificateCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.getCertificate"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Origin to get certificate for. - /// - [JsonProperty("origin")] - public string Origin - { - get; - set; - } - } - - public sealed class GetCertificateCommandResponse : ICommandResponse - { - /// - /// Gets or sets the tableNames - /// - [JsonProperty("tableNames")] - public string[] TableNames - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetCookiesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetCookiesCommand.cs deleted file mode 100644 index ebec0a083d8e6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetCookiesCommand.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Returns all browser cookies for the current URL. Depending on the backend support, will return - /// detailed cookie information in the `cookies` field. - /// - public sealed class GetCookiesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.getCookies"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// The list of URLs for which applicable cookies will be fetched - /// - [JsonProperty("urls", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string[] Urls - { - get; - set; - } - } - - public sealed class GetCookiesCommandResponse : ICommandResponse - { - /// - /// Array of cookie objects. - /// - [JsonProperty("cookies")] - public Cookie[] Cookies - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetRequestPostDataCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetRequestPostDataCommand.cs deleted file mode 100644 index 193392dff9405..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetRequestPostDataCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Returns post data sent with the request. Returns an error when no data was sent with the request. - /// - public sealed class GetRequestPostDataCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.getRequestPostData"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier of the network request to get content for. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - } - - public sealed class GetRequestPostDataCommandResponse : ICommandResponse - { - /// - /// Request body string, omitting files from multipart requests - /// - [JsonProperty("postData")] - public string PostData - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetResponseBodyCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetResponseBodyCommand.cs deleted file mode 100644 index aef6b06d0fc37..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetResponseBodyCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Returns content served for the given request. - /// - public sealed class GetResponseBodyCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.getResponseBody"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier of the network request to get content for. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - } - - public sealed class GetResponseBodyCommandResponse : ICommandResponse - { - /// - /// Response body. - /// - [JsonProperty("body")] - public string Body - { - get; - set; - } - /// - /// True, if content was sent as base64. - /// - [JsonProperty("base64Encoded")] - public bool Base64Encoded - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetResponseBodyForInterceptionCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetResponseBodyForInterceptionCommand.cs deleted file mode 100644 index 8e0713a5a6da4..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/GetResponseBodyForInterceptionCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Returns content served for the given currently intercepted request. - /// - public sealed class GetResponseBodyForInterceptionCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.getResponseBodyForInterception"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier for the intercepted request to get body for. - /// - [JsonProperty("interceptionId")] - public string InterceptionId - { - get; - set; - } - } - - public sealed class GetResponseBodyForInterceptionCommandResponse : ICommandResponse - { - /// - /// Response body. - /// - [JsonProperty("body")] - public string Body - { - get; - set; - } - /// - /// True, if content was sent as base64. - /// - [JsonProperty("base64Encoded")] - public bool Base64Encoded - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/Headers.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/Headers.cs deleted file mode 100644 index 4306fa767d427..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/Headers.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System.Collections.Generic; - - /// - /// Request / response headers as keys / values of JSON object. - /// - public sealed class Headers : Dictionary - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/Initiator.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/Initiator.cs deleted file mode 100644 index 1117d9661c62d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/Initiator.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Information about the request initiator. - /// - public sealed class Initiator - { - /// - /// Type of this initiator. - /// - [JsonProperty("type")] - public string Type - { - get; - set; - } - /// - /// Initiator JavaScript stack trace, set for Script only. - /// - [JsonProperty("stack", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.StackTrace Stack - { - get; - set; - } - /// - /// Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type. - /// - [JsonProperty("url", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Url - { - get; - set; - } - /// - /// Initiator line number, set for Parser type or for Script type (when script is importing - /// module) (0-based). - /// - [JsonProperty("lineNumber", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? LineNumber - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/InterceptionStage.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/InterceptionStage.cs deleted file mode 100644 index 4274ee3eac2a1..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/InterceptionStage.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// Stages of the interception to begin intercepting. Request will intercept before the request is - /// sent. Response will intercept after the response is received. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum InterceptionStage - { - [EnumMember(Value = "Request")] - Request, - [EnumMember(Value = "HeadersReceived")] - HeadersReceived, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/LoadingFailedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/LoadingFailedEventArgs.cs deleted file mode 100644 index c285af8051e80..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/LoadingFailedEventArgs.cs +++ /dev/null @@ -1,66 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when HTTP request has failed to load. - /// - public sealed class LoadingFailedEventArgs : EventArgs - { - /// - /// Request identifier. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - /// - /// Timestamp. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - /// - /// Resource type. - /// - [JsonProperty("type")] - public ResourceType Type - { - get; - set; - } - /// - /// User friendly error message. - /// - [JsonProperty("errorText")] - public string ErrorText - { - get; - set; - } - /// - /// True if loading was canceled. - /// - [JsonProperty("canceled", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Canceled - { - get; - set; - } - /// - /// The reason why loading was blocked, if any. - /// - [JsonProperty("blockedReason", DefaultValueHandling = DefaultValueHandling.Ignore)] - public BlockedReason? BlockedReason - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/LoadingFinishedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/LoadingFinishedEventArgs.cs deleted file mode 100644 index d203328c4f9f9..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/LoadingFinishedEventArgs.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when HTTP request has finished loading. - /// - public sealed class LoadingFinishedEventArgs : EventArgs - { - /// - /// Request identifier. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - /// - /// Timestamp. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - /// - /// Total number of bytes received for this request. - /// - [JsonProperty("encodedDataLength")] - public double EncodedDataLength - { - get; - set; - } - /// - /// Set when 1) response was blocked by Cross-Origin Read Blocking and also - /// 2) this needs to be reported to the DevTools console. - /// - [JsonProperty("shouldReportCorbBlocking", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? ShouldReportCorbBlocking - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/NetworkAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/NetworkAdapter.cs deleted file mode 100644 index 4c6f986d7bd1d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/NetworkAdapter.cs +++ /dev/null @@ -1,475 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the Network domain to simplify the command interface. - /// - public class NetworkAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "Network"; - private Dictionary m_eventMap = new Dictionary(); - - public NetworkAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - m_eventMap["dataReceived"] = new DevToolsEventData(typeof(DataReceivedEventArgs), OnDataReceived); - m_eventMap["eventSourceMessageReceived"] = new DevToolsEventData(typeof(EventSourceMessageReceivedEventArgs), OnEventSourceMessageReceived); - m_eventMap["loadingFailed"] = new DevToolsEventData(typeof(LoadingFailedEventArgs), OnLoadingFailed); - m_eventMap["loadingFinished"] = new DevToolsEventData(typeof(LoadingFinishedEventArgs), OnLoadingFinished); - m_eventMap["requestIntercepted"] = new DevToolsEventData(typeof(RequestInterceptedEventArgs), OnRequestIntercepted); - m_eventMap["requestServedFromCache"] = new DevToolsEventData(typeof(RequestServedFromCacheEventArgs), OnRequestServedFromCache); - m_eventMap["requestWillBeSent"] = new DevToolsEventData(typeof(RequestWillBeSentEventArgs), OnRequestWillBeSent); - m_eventMap["resourceChangedPriority"] = new DevToolsEventData(typeof(ResourceChangedPriorityEventArgs), OnResourceChangedPriority); - m_eventMap["signedExchangeReceived"] = new DevToolsEventData(typeof(SignedExchangeReceivedEventArgs), OnSignedExchangeReceived); - m_eventMap["responseReceived"] = new DevToolsEventData(typeof(ResponseReceivedEventArgs), OnResponseReceived); - m_eventMap["webSocketClosed"] = new DevToolsEventData(typeof(WebSocketClosedEventArgs), OnWebSocketClosed); - m_eventMap["webSocketCreated"] = new DevToolsEventData(typeof(WebSocketCreatedEventArgs), OnWebSocketCreated); - m_eventMap["webSocketFrameError"] = new DevToolsEventData(typeof(WebSocketFrameErrorEventArgs), OnWebSocketFrameError); - m_eventMap["webSocketFrameReceived"] = new DevToolsEventData(typeof(WebSocketFrameReceivedEventArgs), OnWebSocketFrameReceived); - m_eventMap["webSocketFrameSent"] = new DevToolsEventData(typeof(WebSocketFrameSentEventArgs), OnWebSocketFrameSent); - m_eventMap["webSocketHandshakeResponseReceived"] = new DevToolsEventData(typeof(WebSocketHandshakeResponseReceivedEventArgs), OnWebSocketHandshakeResponseReceived); - m_eventMap["webSocketWillSendHandshakeRequest"] = new DevToolsEventData(typeof(WebSocketWillSendHandshakeRequestEventArgs), OnWebSocketWillSendHandshakeRequest); - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - /// - /// Fired when data chunk was received over the network. - /// - public event EventHandler DataReceived; - /// - /// Fired when EventSource message is received. - /// - public event EventHandler EventSourceMessageReceived; - /// - /// Fired when HTTP request has failed to load. - /// - public event EventHandler LoadingFailed; - /// - /// Fired when HTTP request has finished loading. - /// - public event EventHandler LoadingFinished; - /// - /// Details of an intercepted HTTP request, which must be either allowed, blocked, modified or - /// mocked. - /// - public event EventHandler RequestIntercepted; - /// - /// Fired if request ended up loading from cache. - /// - public event EventHandler RequestServedFromCache; - /// - /// Fired when page is about to send HTTP request. - /// - public event EventHandler RequestWillBeSent; - /// - /// Fired when resource loading priority is changed - /// - public event EventHandler ResourceChangedPriority; - /// - /// Fired when a signed exchange was received over the network - /// - public event EventHandler SignedExchangeReceived; - /// - /// Fired when HTTP response is available. - /// - public event EventHandler ResponseReceived; - /// - /// Fired when WebSocket is closed. - /// - public event EventHandler WebSocketClosed; - /// - /// Fired upon WebSocket creation. - /// - public event EventHandler WebSocketCreated; - /// - /// Fired when WebSocket message error occurs. - /// - public event EventHandler WebSocketFrameError; - /// - /// Fired when WebSocket message is received. - /// - public event EventHandler WebSocketFrameReceived; - /// - /// Fired when WebSocket message is sent. - /// - public event EventHandler WebSocketFrameSent; - /// - /// Fired when WebSocket handshake response becomes available. - /// - public event EventHandler WebSocketHandshakeResponseReceived; - /// - /// Fired when WebSocket is about to initiate handshake. - /// - public event EventHandler WebSocketWillSendHandshakeRequest; - - /// - /// Tells whether clearing browser cache is supported. - /// - public async Task CanClearBrowserCache(CanClearBrowserCacheCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new CanClearBrowserCacheCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Tells whether clearing browser cookies is supported. - /// - public async Task CanClearBrowserCookies(CanClearBrowserCookiesCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new CanClearBrowserCookiesCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Tells whether emulation of network conditions is supported. - /// - public async Task CanEmulateNetworkConditions(CanEmulateNetworkConditionsCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new CanEmulateNetworkConditionsCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Clears browser cache. - /// - public async Task ClearBrowserCache(ClearBrowserCacheCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new ClearBrowserCacheCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Clears browser cookies. - /// - public async Task ClearBrowserCookies(ClearBrowserCookiesCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new ClearBrowserCookiesCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Response to Network.requestIntercepted which either modifies the request to continue with any - /// modifications, or blocks it, or completes it with the provided response bytes. If a network - /// fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted - /// event will be sent with the same InterceptionId. - /// - public async Task ContinueInterceptedRequest(ContinueInterceptedRequestCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Deletes browser cookies with matching name and url or domain/path pair. - /// - public async Task DeleteCookies(DeleteCookiesCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Disables network tracking, prevents network events from being sent to the client. - /// - public async Task Disable(DisableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new DisableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Activates emulation of network conditions. - /// - public async Task EmulateNetworkConditions(EmulateNetworkConditionsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enables network tracking, network events will now be delivered to the client. - /// - public async Task Enable(EnableCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns all browser cookies. Depending on the backend support, will return detailed cookie - /// information in the `cookies` field. - /// - public async Task GetAllCookies(GetAllCookiesCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetAllCookiesCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns the DER-encoded certificate. - /// - public async Task GetCertificate(GetCertificateCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns all browser cookies for the current URL. Depending on the backend support, will return - /// detailed cookie information in the `cookies` field. - /// - public async Task GetCookies(GetCookiesCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns content served for the given request. - /// - public async Task GetResponseBody(GetResponseBodyCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns post data sent with the request. Returns an error when no data was sent with the request. - /// - public async Task GetRequestPostData(GetRequestPostDataCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns content served for the given currently intercepted request. - /// - public async Task GetResponseBodyForInterception(GetResponseBodyForInterceptionCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns a handle to the stream representing the response body. Note that after this command, - /// the intercepted request can't be continued as is -- you either need to cancel it or to provide - /// the response body. The stream only supports sequential read, IO.read will fail if the position - /// is specified. - /// - public async Task TakeResponseBodyForInterceptionAsStream(TakeResponseBodyForInterceptionAsStreamCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// This method sends a new XMLHttpRequest which is identical to the original one. The following - /// parameters should be identical: method, url, async, request body, extra headers, withCredentials - /// attribute, user, password. - /// - public async Task ReplayXHR(ReplayXHRCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Searches for given string in response content. - /// - public async Task SearchInResponseBody(SearchInResponseBodyCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Blocks URLs from loading. - /// - public async Task SetBlockedURLs(SetBlockedURLsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Toggles ignoring of service worker for each request. - /// - public async Task SetBypassServiceWorker(SetBypassServiceWorkerCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Toggles ignoring cache for each request. If `true`, cache will not be used. - /// - public async Task SetCacheDisabled(SetCacheDisabledCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. - /// - public async Task SetCookie(SetCookieCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets given cookies. - /// - public async Task SetCookies(SetCookiesCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// For testing. - /// - public async Task SetDataSizeLimitsForTest(SetDataSizeLimitsForTestCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Specifies whether to always send extra HTTP headers with the requests from this page. - /// - public async Task SetExtraHTTPHeaders(SetExtraHTTPHeadersCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets the requests to intercept that match the provided patterns and optionally resource types. - /// - public async Task SetRequestInterception(SetRequestInterceptionCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Allows overriding user agent with the given string. - /// - public async Task SetUserAgentOverride(SetUserAgentOverrideCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - private void OnDataReceived(object rawEventArgs) - { - DataReceivedEventArgs e = rawEventArgs as DataReceivedEventArgs; - if (e != null && DataReceived != null) - { - DataReceived(this, e); - } - } - private void OnEventSourceMessageReceived(object rawEventArgs) - { - EventSourceMessageReceivedEventArgs e = rawEventArgs as EventSourceMessageReceivedEventArgs; - if (e != null && EventSourceMessageReceived != null) - { - EventSourceMessageReceived(this, e); - } - } - private void OnLoadingFailed(object rawEventArgs) - { - LoadingFailedEventArgs e = rawEventArgs as LoadingFailedEventArgs; - if (e != null && LoadingFailed != null) - { - LoadingFailed(this, e); - } - } - private void OnLoadingFinished(object rawEventArgs) - { - LoadingFinishedEventArgs e = rawEventArgs as LoadingFinishedEventArgs; - if (e != null && LoadingFinished != null) - { - LoadingFinished(this, e); - } - } - private void OnRequestIntercepted(object rawEventArgs) - { - RequestInterceptedEventArgs e = rawEventArgs as RequestInterceptedEventArgs; - if (e != null && RequestIntercepted != null) - { - RequestIntercepted(this, e); - } - } - private void OnRequestServedFromCache(object rawEventArgs) - { - RequestServedFromCacheEventArgs e = rawEventArgs as RequestServedFromCacheEventArgs; - if (e != null && RequestServedFromCache != null) - { - RequestServedFromCache(this, e); - } - } - private void OnRequestWillBeSent(object rawEventArgs) - { - RequestWillBeSentEventArgs e = rawEventArgs as RequestWillBeSentEventArgs; - if (e != null && RequestWillBeSent != null) - { - RequestWillBeSent(this, e); - } - } - private void OnResourceChangedPriority(object rawEventArgs) - { - ResourceChangedPriorityEventArgs e = rawEventArgs as ResourceChangedPriorityEventArgs; - if (e != null && ResourceChangedPriority != null) - { - ResourceChangedPriority(this, e); - } - } - private void OnSignedExchangeReceived(object rawEventArgs) - { - SignedExchangeReceivedEventArgs e = rawEventArgs as SignedExchangeReceivedEventArgs; - if (e != null && SignedExchangeReceived != null) - { - SignedExchangeReceived(this, e); - } - } - private void OnResponseReceived(object rawEventArgs) - { - ResponseReceivedEventArgs e = rawEventArgs as ResponseReceivedEventArgs; - if (e != null && ResponseReceived != null) - { - ResponseReceived(this, e); - } - } - private void OnWebSocketClosed(object rawEventArgs) - { - WebSocketClosedEventArgs e = rawEventArgs as WebSocketClosedEventArgs; - if (e != null && WebSocketClosed != null) - { - WebSocketClosed(this, e); - } - } - private void OnWebSocketCreated(object rawEventArgs) - { - WebSocketCreatedEventArgs e = rawEventArgs as WebSocketCreatedEventArgs; - if (e != null && WebSocketCreated != null) - { - WebSocketCreated(this, e); - } - } - private void OnWebSocketFrameError(object rawEventArgs) - { - WebSocketFrameErrorEventArgs e = rawEventArgs as WebSocketFrameErrorEventArgs; - if (e != null && WebSocketFrameError != null) - { - WebSocketFrameError(this, e); - } - } - private void OnWebSocketFrameReceived(object rawEventArgs) - { - WebSocketFrameReceivedEventArgs e = rawEventArgs as WebSocketFrameReceivedEventArgs; - if (e != null && WebSocketFrameReceived != null) - { - WebSocketFrameReceived(this, e); - } - } - private void OnWebSocketFrameSent(object rawEventArgs) - { - WebSocketFrameSentEventArgs e = rawEventArgs as WebSocketFrameSentEventArgs; - if (e != null && WebSocketFrameSent != null) - { - WebSocketFrameSent(this, e); - } - } - private void OnWebSocketHandshakeResponseReceived(object rawEventArgs) - { - WebSocketHandshakeResponseReceivedEventArgs e = rawEventArgs as WebSocketHandshakeResponseReceivedEventArgs; - if (e != null && WebSocketHandshakeResponseReceived != null) - { - WebSocketHandshakeResponseReceived(this, e); - } - } - private void OnWebSocketWillSendHandshakeRequest(object rawEventArgs) - { - WebSocketWillSendHandshakeRequestEventArgs e = rawEventArgs as WebSocketWillSendHandshakeRequestEventArgs; - if (e != null && WebSocketWillSendHandshakeRequest != null) - { - WebSocketWillSendHandshakeRequest(this, e); - } - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ReplayXHRCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ReplayXHRCommand.cs deleted file mode 100644 index 097f7e00aafb4..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ReplayXHRCommand.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// This method sends a new XMLHttpRequest which is identical to the original one. The following - /// parameters should be identical: method, url, async, request body, extra headers, withCredentials - /// attribute, user, password. - /// - public sealed class ReplayXHRCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.replayXHR"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier of XHR to replay. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - } - - public sealed class ReplayXHRCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/Request.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/Request.cs deleted file mode 100644 index 71fd80abd90c5..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/Request.cs +++ /dev/null @@ -1,101 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// HTTP request data. - /// - public sealed class Request - { - /// - /// Request URL (without fragment). - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Fragment of the requested URL starting with hash, if present. - /// - [JsonProperty("urlFragment", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string UrlFragment - { - get; - set; - } - /// - /// HTTP request method. - /// - [JsonProperty("method")] - public string Method - { - get; - set; - } - /// - /// HTTP request headers. - /// - [JsonProperty("headers")] - public Headers Headers - { - get; - set; - } - /// - /// HTTP POST request data. - /// - [JsonProperty("postData", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string PostData - { - get; - set; - } - /// - /// True when the request has POST data. Note that postData might still be omitted when this flag is true when the data is too long. - /// - [JsonProperty("hasPostData", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? HasPostData - { - get; - set; - } - /// - /// The mixed content type of the request. - /// - [JsonProperty("mixedContentType", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Security.MixedContentType MixedContentType - { - get; - set; - } - /// - /// Priority of the resource request at the time request is sent. - /// - [JsonProperty("initialPriority")] - public ResourcePriority InitialPriority - { - get; - set; - } - /// - /// The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/ - /// - [JsonProperty("referrerPolicy")] - public string ReferrerPolicy - { - get; - set; - } - /// - /// Whether is loaded via link preload. - /// - [JsonProperty("isLinkPreload", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IsLinkPreload - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/RequestInterceptedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/RequestInterceptedEventArgs.cs deleted file mode 100644 index 9b3717bd8ac1f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/RequestInterceptedEventArgs.cs +++ /dev/null @@ -1,129 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Details of an intercepted HTTP request, which must be either allowed, blocked, modified or - /// mocked. - /// - public sealed class RequestInterceptedEventArgs : EventArgs - { - /// - /// Each request the page makes will have a unique id, however if any redirects are encountered - /// while processing that fetch, they will be reported with the same id as the original fetch. - /// Likewise if HTTP authentication is needed then the same fetch id will be used. - /// - [JsonProperty("interceptionId")] - public string InterceptionId - { - get; - set; - } - /// - /// Gets or sets the request - /// - [JsonProperty("request")] - public Request Request - { - get; - set; - } - /// - /// The id of the frame that initiated the request. - /// - [JsonProperty("frameId")] - public string FrameId - { - get; - set; - } - /// - /// How the requested resource will be used. - /// - [JsonProperty("resourceType")] - public ResourceType ResourceType - { - get; - set; - } - /// - /// Whether this is a navigation request, which can abort the navigation completely. - /// - [JsonProperty("isNavigationRequest")] - public bool IsNavigationRequest - { - get; - set; - } - /// - /// Set if the request is a navigation that will result in a download. - /// Only present after response is received from the server (i.e. HeadersReceived stage). - /// - [JsonProperty("isDownload", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IsDownload - { - get; - set; - } - /// - /// Redirect location, only sent if a redirect was intercepted. - /// - [JsonProperty("redirectUrl", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string RedirectUrl - { - get; - set; - } - /// - /// Details of the Authorization Challenge encountered. If this is set then - /// continueInterceptedRequest must contain an authChallengeResponse. - /// - [JsonProperty("authChallenge", DefaultValueHandling = DefaultValueHandling.Ignore)] - public AuthChallenge AuthChallenge - { - get; - set; - } - /// - /// Response error if intercepted at response stage or if redirect occurred while intercepting - /// request. - /// - [JsonProperty("responseErrorReason", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ErrorReason? ResponseErrorReason - { - get; - set; - } - /// - /// Response code if intercepted at response stage or if redirect occurred while intercepting - /// request or auth retry occurred. - /// - [JsonProperty("responseStatusCode", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ResponseStatusCode - { - get; - set; - } - /// - /// Response headers if intercepted at the response stage or if redirect occurred while - /// intercepting request or auth retry occurred. - /// - [JsonProperty("responseHeaders", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Headers ResponseHeaders - { - get; - set; - } - /// - /// If the intercepted request had a corresponding requestWillBeSent event fired for it, then - /// this requestId will be the same as the requestId present in the requestWillBeSent event. - /// - [JsonProperty("requestId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string RequestId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/RequestPattern.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/RequestPattern.cs deleted file mode 100644 index 588f056500b8c..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/RequestPattern.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Request pattern for interception. - /// - public sealed class RequestPattern - { - /// - /// Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is - /// backslash. Omitting is equivalent to "*". - /// - [JsonProperty("urlPattern", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string UrlPattern - { - get; - set; - } - /// - /// If set, only requests for matching resource types will be intercepted. - /// - [JsonProperty("resourceType", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ResourceType? ResourceType - { - get; - set; - } - /// - /// Stage at wich to begin intercepting requests. Default is Request. - /// - [JsonProperty("interceptionStage", DefaultValueHandling = DefaultValueHandling.Ignore)] - public InterceptionStage? InterceptionStage - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/RequestServedFromCacheEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/RequestServedFromCacheEventArgs.cs deleted file mode 100644 index c7c71d2c35832..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/RequestServedFromCacheEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired if request ended up loading from cache. - /// - public sealed class RequestServedFromCacheEventArgs : EventArgs - { - /// - /// Request identifier. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/RequestWillBeSentEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/RequestWillBeSentEventArgs.cs deleted file mode 100644 index 7009f96448148..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/RequestWillBeSentEventArgs.cs +++ /dev/null @@ -1,111 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when page is about to send HTTP request. - /// - public sealed class RequestWillBeSentEventArgs : EventArgs - { - /// - /// Request identifier. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - /// - /// Loader identifier. Empty string if the request is fetched from worker. - /// - [JsonProperty("loaderId")] - public string LoaderId - { - get; - set; - } - /// - /// URL of the document this request is loaded for. - /// - [JsonProperty("documentURL")] - public string DocumentURL - { - get; - set; - } - /// - /// Request data. - /// - [JsonProperty("request")] - public Request Request - { - get; - set; - } - /// - /// Timestamp. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - /// - /// Timestamp. - /// - [JsonProperty("wallTime")] - public double WallTime - { - get; - set; - } - /// - /// Request initiator. - /// - [JsonProperty("initiator")] - public Initiator Initiator - { - get; - set; - } - /// - /// Redirect response data. - /// - [JsonProperty("redirectResponse", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Response RedirectResponse - { - get; - set; - } - /// - /// Type of this resource. - /// - [JsonProperty("type", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ResourceType? Type - { - get; - set; - } - /// - /// Frame identifier. - /// - [JsonProperty("frameId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string FrameId - { - get; - set; - } - /// - /// Whether the request is initiated by a user gesture. Defaults to false. - /// - [JsonProperty("hasUserGesture", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? HasUserGesture - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ResourceChangedPriorityEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ResourceChangedPriorityEventArgs.cs deleted file mode 100644 index 758715339aeee..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ResourceChangedPriorityEventArgs.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when resource loading priority is changed - /// - public sealed class ResourceChangedPriorityEventArgs : EventArgs - { - /// - /// Request identifier. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - /// - /// New priority - /// - [JsonProperty("newPriority")] - public ResourcePriority NewPriority - { - get; - set; - } - /// - /// Timestamp. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ResourcePriority.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ResourcePriority.cs deleted file mode 100644 index 839d18238c8dd..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ResourcePriority.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// Loading priority of a resource request. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ResourcePriority - { - [EnumMember(Value = "VeryLow")] - VeryLow, - [EnumMember(Value = "Low")] - Low, - [EnumMember(Value = "Medium")] - Medium, - [EnumMember(Value = "High")] - High, - [EnumMember(Value = "VeryHigh")] - VeryHigh, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ResourceTiming.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ResourceTiming.cs deleted file mode 100644 index afb6df1eb55c9..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ResourceTiming.cs +++ /dev/null @@ -1,156 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Timing information for the request. - /// - public sealed class ResourceTiming - { - /// - /// Timing's requestTime is a baseline in seconds, while the other numbers are ticks in - /// milliseconds relatively to this requestTime. - /// - [JsonProperty("requestTime")] - public double RequestTime - { - get; - set; - } - /// - /// Started resolving proxy. - /// - [JsonProperty("proxyStart")] - public double ProxyStart - { - get; - set; - } - /// - /// Finished resolving proxy. - /// - [JsonProperty("proxyEnd")] - public double ProxyEnd - { - get; - set; - } - /// - /// Started DNS address resolve. - /// - [JsonProperty("dnsStart")] - public double DnsStart - { - get; - set; - } - /// - /// Finished DNS address resolve. - /// - [JsonProperty("dnsEnd")] - public double DnsEnd - { - get; - set; - } - /// - /// Started connecting to the remote host. - /// - [JsonProperty("connectStart")] - public double ConnectStart - { - get; - set; - } - /// - /// Connected to the remote host. - /// - [JsonProperty("connectEnd")] - public double ConnectEnd - { - get; - set; - } - /// - /// Started SSL handshake. - /// - [JsonProperty("sslStart")] - public double SslStart - { - get; - set; - } - /// - /// Finished SSL handshake. - /// - [JsonProperty("sslEnd")] - public double SslEnd - { - get; - set; - } - /// - /// Started running ServiceWorker. - /// - [JsonProperty("workerStart")] - public double WorkerStart - { - get; - set; - } - /// - /// Finished Starting ServiceWorker. - /// - [JsonProperty("workerReady")] - public double WorkerReady - { - get; - set; - } - /// - /// Started sending request. - /// - [JsonProperty("sendStart")] - public double SendStart - { - get; - set; - } - /// - /// Finished sending request. - /// - [JsonProperty("sendEnd")] - public double SendEnd - { - get; - set; - } - /// - /// Time the server started pushing request. - /// - [JsonProperty("pushStart")] - public double PushStart - { - get; - set; - } - /// - /// Time the server finished pushing request. - /// - [JsonProperty("pushEnd")] - public double PushEnd - { - get; - set; - } - /// - /// Finished receiving response headers. - /// - [JsonProperty("receiveHeadersEnd")] - public double ReceiveHeadersEnd - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ResourceType.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ResourceType.cs deleted file mode 100644 index d63cf6dcfb76a..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ResourceType.cs +++ /dev/null @@ -1,46 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// Resource type as it was perceived by the rendering engine. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ResourceType - { - [EnumMember(Value = "Document")] - Document, - [EnumMember(Value = "Stylesheet")] - Stylesheet, - [EnumMember(Value = "Image")] - Image, - [EnumMember(Value = "Media")] - Media, - [EnumMember(Value = "Font")] - Font, - [EnumMember(Value = "Script")] - Script, - [EnumMember(Value = "TextTrack")] - TextTrack, - [EnumMember(Value = "XHR")] - XHR, - [EnumMember(Value = "Fetch")] - Fetch, - [EnumMember(Value = "EventSource")] - EventSource, - [EnumMember(Value = "WebSocket")] - WebSocket, - [EnumMember(Value = "Manifest")] - Manifest, - [EnumMember(Value = "SignedExchange")] - SignedExchange, - [EnumMember(Value = "Ping")] - Ping, - [EnumMember(Value = "CSPViolationReport")] - CSPViolationReport, - [EnumMember(Value = "Other")] - Other, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/Response.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/Response.cs deleted file mode 100644 index 72d23ae55a261..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/Response.cs +++ /dev/null @@ -1,182 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// HTTP response data. - /// - public sealed class Response - { - /// - /// Response URL. This URL can be different from CachedResource.url in case of redirect. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// HTTP response status code. - /// - [JsonProperty("status")] - public long Status - { - get; - set; - } - /// - /// HTTP response status text. - /// - [JsonProperty("statusText")] - public string StatusText - { - get; - set; - } - /// - /// HTTP response headers. - /// - [JsonProperty("headers")] - public Headers Headers - { - get; - set; - } - /// - /// HTTP response headers text. - /// - [JsonProperty("headersText", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string HeadersText - { - get; - set; - } - /// - /// Resource mimeType as determined by the browser. - /// - [JsonProperty("mimeType")] - public string MimeType - { - get; - set; - } - /// - /// Refined HTTP request headers that were actually transmitted over the network. - /// - [JsonProperty("requestHeaders", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Headers RequestHeaders - { - get; - set; - } - /// - /// HTTP request headers text. - /// - [JsonProperty("requestHeadersText", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string RequestHeadersText - { - get; - set; - } - /// - /// Specifies whether physical connection was actually reused for this request. - /// - [JsonProperty("connectionReused")] - public bool ConnectionReused - { - get; - set; - } - /// - /// Physical connection id that was actually used for this request. - /// - [JsonProperty("connectionId")] - public double ConnectionId - { - get; - set; - } - /// - /// Remote IP address. - /// - [JsonProperty("remoteIPAddress", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string RemoteIPAddress - { - get; - set; - } - /// - /// Remote port. - /// - [JsonProperty("remotePort", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? RemotePort - { - get; - set; - } - /// - /// Specifies that the request was served from the disk cache. - /// - [JsonProperty("fromDiskCache", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? FromDiskCache - { - get; - set; - } - /// - /// Specifies that the request was served from the ServiceWorker. - /// - [JsonProperty("fromServiceWorker", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? FromServiceWorker - { - get; - set; - } - /// - /// Total number of bytes received for this request so far. - /// - [JsonProperty("encodedDataLength")] - public double EncodedDataLength - { - get; - set; - } - /// - /// Timing information for the given request. - /// - [JsonProperty("timing", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ResourceTiming Timing - { - get; - set; - } - /// - /// Protocol used to fetch this request. - /// - [JsonProperty("protocol", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Protocol - { - get; - set; - } - /// - /// Security state of the request resource. - /// - [JsonProperty("securityState")] - public Security.SecurityState SecurityState - { - get; - set; - } - /// - /// Security details for the request. - /// - [JsonProperty("securityDetails", DefaultValueHandling = DefaultValueHandling.Ignore)] - public SecurityDetails SecurityDetails - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ResponseReceivedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ResponseReceivedEventArgs.cs deleted file mode 100644 index 5d57d0b293da0..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/ResponseReceivedEventArgs.cs +++ /dev/null @@ -1,66 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when HTTP response is available. - /// - public sealed class ResponseReceivedEventArgs : EventArgs - { - /// - /// Request identifier. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - /// - /// Loader identifier. Empty string if the request is fetched from worker. - /// - [JsonProperty("loaderId")] - public string LoaderId - { - get; - set; - } - /// - /// Timestamp. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - /// - /// Resource type. - /// - [JsonProperty("type")] - public ResourceType Type - { - get; - set; - } - /// - /// Response data. - /// - [JsonProperty("response")] - public Response Response - { - get; - set; - } - /// - /// Frame identifier. - /// - [JsonProperty("frameId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string FrameId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SearchInResponseBodyCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SearchInResponseBodyCommand.cs deleted file mode 100644 index c30e5fe92f99b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SearchInResponseBodyCommand.cs +++ /dev/null @@ -1,68 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Searches for given string in response content. - /// - public sealed class SearchInResponseBodyCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.searchInResponseBody"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier of the network response to search. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - /// - /// String to search for. - /// - [JsonProperty("query")] - public string Query - { - get; - set; - } - /// - /// If true, search is case sensitive. - /// - [JsonProperty("caseSensitive", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? CaseSensitive - { - get; - set; - } - /// - /// If true, treats string parameter as regex. - /// - [JsonProperty("isRegex", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IsRegex - { - get; - set; - } - } - - public sealed class SearchInResponseBodyCommandResponse : ICommandResponse - { - /// - /// List of search matches. - /// - [JsonProperty("result")] - public Debugger.SearchMatch[] Result - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SecurityDetails.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SecurityDetails.cs deleted file mode 100644 index e110e40f307a1..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SecurityDetails.cs +++ /dev/null @@ -1,128 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Security details about a request. - /// - public sealed class SecurityDetails - { - /// - /// Protocol name (e.g. "TLS 1.2" or "QUIC"). - /// - [JsonProperty("protocol")] - public string Protocol - { - get; - set; - } - /// - /// Key Exchange used by the connection, or the empty string if not applicable. - /// - [JsonProperty("keyExchange")] - public string KeyExchange - { - get; - set; - } - /// - /// (EC)DH group used by the connection, if applicable. - /// - [JsonProperty("keyExchangeGroup", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string KeyExchangeGroup - { - get; - set; - } - /// - /// Cipher name. - /// - [JsonProperty("cipher")] - public string Cipher - { - get; - set; - } - /// - /// TLS MAC. Note that AEAD ciphers do not have separate MACs. - /// - [JsonProperty("mac", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Mac - { - get; - set; - } - /// - /// Certificate ID value. - /// - [JsonProperty("certificateId")] - public long CertificateId - { - get; - set; - } - /// - /// Certificate subject name. - /// - [JsonProperty("subjectName")] - public string SubjectName - { - get; - set; - } - /// - /// Subject Alternative Name (SAN) DNS names and IP addresses. - /// - [JsonProperty("sanList")] - public string[] SanList - { - get; - set; - } - /// - /// Name of the issuing CA. - /// - [JsonProperty("issuer")] - public string Issuer - { - get; - set; - } - /// - /// Certificate valid from date. - /// - [JsonProperty("validFrom")] - public double ValidFrom - { - get; - set; - } - /// - /// Certificate valid to (expiration) date - /// - [JsonProperty("validTo")] - public double ValidTo - { - get; - set; - } - /// - /// List of signed certificate timestamps (SCTs). - /// - [JsonProperty("signedCertificateTimestampList")] - public SignedCertificateTimestamp[] SignedCertificateTimestampList - { - get; - set; - } - /// - /// Whether the request complied with Certificate Transparency policy - /// - [JsonProperty("certificateTransparencyCompliance")] - public CertificateTransparencyCompliance CertificateTransparencyCompliance - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetBlockedURLsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetBlockedURLsCommand.cs deleted file mode 100644 index ebd3e2122fc6b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetBlockedURLsCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Blocks URLs from loading. - /// - public sealed class SetBlockedURLsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.setBlockedURLs"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// URL patterns to block. Wildcards ('*') are allowed. - /// - [JsonProperty("urls")] - public string[] Urls - { - get; - set; - } - } - - public sealed class SetBlockedURLsCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetBypassServiceWorkerCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetBypassServiceWorkerCommand.cs deleted file mode 100644 index 77b6176398787..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetBypassServiceWorkerCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Toggles ignoring of service worker for each request. - /// - public sealed class SetBypassServiceWorkerCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.setBypassServiceWorker"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Bypass service worker and load from network. - /// - [JsonProperty("bypass")] - public bool Bypass - { - get; - set; - } - } - - public sealed class SetBypassServiceWorkerCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetCacheDisabledCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetCacheDisabledCommand.cs deleted file mode 100644 index e9630d9d6cb91..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetCacheDisabledCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Toggles ignoring cache for each request. If `true`, cache will not be used. - /// - public sealed class SetCacheDisabledCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.setCacheDisabled"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Cache disabled state. - /// - [JsonProperty("cacheDisabled")] - public bool CacheDisabled - { - get; - set; - } - } - - public sealed class SetCacheDisabledCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetCookieCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetCookieCommand.cs deleted file mode 100644 index 6a3607e369935..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetCookieCommand.cs +++ /dev/null @@ -1,114 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. - /// - public sealed class SetCookieCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.setCookie"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Cookie name. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// Cookie value. - /// - [JsonProperty("value")] - public string Value - { - get; - set; - } - /// - /// The request-URI to associate with the setting of the cookie. This value can affect the - /// default domain and path values of the created cookie. - /// - [JsonProperty("url", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Url - { - get; - set; - } - /// - /// Cookie domain. - /// - [JsonProperty("domain", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Domain - { - get; - set; - } - /// - /// Cookie path. - /// - [JsonProperty("path", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Path - { - get; - set; - } - /// - /// True if cookie is secure. - /// - [JsonProperty("secure", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Secure - { - get; - set; - } - /// - /// True if cookie is http-only. - /// - [JsonProperty("httpOnly", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? HttpOnly - { - get; - set; - } - /// - /// Cookie SameSite type. - /// - [JsonProperty("sameSite", DefaultValueHandling = DefaultValueHandling.Ignore)] - public CookieSameSite? SameSite - { - get; - set; - } - /// - /// Cookie expiration date, session cookie if not set - /// - [JsonProperty("expires", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Expires - { - get; - set; - } - } - - public sealed class SetCookieCommandResponse : ICommandResponse - { - /// - /// True if successfully set cookie. - /// - [JsonProperty("success")] - public bool Success - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetCookiesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetCookiesCommand.cs deleted file mode 100644 index d8a43b63b39a4..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetCookiesCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Sets given cookies. - /// - public sealed class SetCookiesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.setCookies"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Cookies to be set. - /// - [JsonProperty("cookies")] - public CookieParam[] Cookies - { - get; - set; - } - } - - public sealed class SetCookiesCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetDataSizeLimitsForTestCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetDataSizeLimitsForTestCommand.cs deleted file mode 100644 index 6389d9bb38628..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetDataSizeLimitsForTestCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// For testing. - /// - public sealed class SetDataSizeLimitsForTestCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.setDataSizeLimitsForTest"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Maximum total buffer size. - /// - [JsonProperty("maxTotalSize")] - public long MaxTotalSize - { - get; - set; - } - /// - /// Maximum per-resource size. - /// - [JsonProperty("maxResourceSize")] - public long MaxResourceSize - { - get; - set; - } - } - - public sealed class SetDataSizeLimitsForTestCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetExtraHTTPHeadersCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetExtraHTTPHeadersCommand.cs deleted file mode 100644 index 23ac579b7b6b2..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetExtraHTTPHeadersCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Specifies whether to always send extra HTTP headers with the requests from this page. - /// - public sealed class SetExtraHTTPHeadersCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.setExtraHTTPHeaders"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Map with extra HTTP headers. - /// - [JsonProperty("headers")] - public Headers Headers - { - get; - set; - } - } - - public sealed class SetExtraHTTPHeadersCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetRequestInterceptionCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetRequestInterceptionCommand.cs deleted file mode 100644 index 864ab49bd9ed9..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetRequestInterceptionCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Sets the requests to intercept that match the provided patterns and optionally resource types. - /// - public sealed class SetRequestInterceptionCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.setRequestInterception"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Requests matching any of these patterns will be forwarded and wait for the corresponding - /// continueInterceptedRequest call. - /// - [JsonProperty("patterns")] - public RequestPattern[] Patterns - { - get; - set; - } - } - - public sealed class SetRequestInterceptionCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetUserAgentOverrideCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetUserAgentOverrideCommand.cs deleted file mode 100644 index 4be3ebc3757b6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SetUserAgentOverrideCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Allows overriding user agent with the given string. - /// - public sealed class SetUserAgentOverrideCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.setUserAgentOverride"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// User agent to use. - /// - [JsonProperty("userAgent")] - public string UserAgent - { - get; - set; - } - /// - /// Browser langugage to emulate. - /// - [JsonProperty("acceptLanguage", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string AcceptLanguage - { - get; - set; - } - /// - /// The platform navigator.platform should return. - /// - [JsonProperty("platform", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Platform - { - get; - set; - } - } - - public sealed class SetUserAgentOverrideCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedCertificateTimestamp.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedCertificateTimestamp.cs deleted file mode 100644 index 33b9364cde40a..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedCertificateTimestamp.cs +++ /dev/null @@ -1,83 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Details of a signed certificate timestamp (SCT). - /// - public sealed class SignedCertificateTimestamp - { - /// - /// Validation status. - /// - [JsonProperty("status")] - public string Status - { - get; - set; - } - /// - /// Origin. - /// - [JsonProperty("origin")] - public string Origin - { - get; - set; - } - /// - /// Log name / description. - /// - [JsonProperty("logDescription")] - public string LogDescription - { - get; - set; - } - /// - /// Log ID. - /// - [JsonProperty("logId")] - public string LogId - { - get; - set; - } - /// - /// Issuance date. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - /// - /// Hash algorithm. - /// - [JsonProperty("hashAlgorithm")] - public string HashAlgorithm - { - get; - set; - } - /// - /// Signature algorithm. - /// - [JsonProperty("signatureAlgorithm")] - public string SignatureAlgorithm - { - get; - set; - } - /// - /// Signature data. - /// - [JsonProperty("signatureData")] - public string SignatureData - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeError.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeError.cs deleted file mode 100644 index c7c175284935e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeError.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Information about a signed exchange response. - /// - public sealed class SignedExchangeError - { - /// - /// Error message. - /// - [JsonProperty("message")] - public string Message - { - get; - set; - } - /// - /// The index of the signature which caused the error. - /// - [JsonProperty("signatureIndex", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? SignatureIndex - { - get; - set; - } - /// - /// The field which caused the error. - /// - [JsonProperty("errorField", DefaultValueHandling = DefaultValueHandling.Ignore)] - public SignedExchangeErrorField? ErrorField - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeErrorField.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeErrorField.cs deleted file mode 100644 index 09baecb130acb..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeErrorField.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// Field type for a signed exchange related error. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SignedExchangeErrorField - { - [EnumMember(Value = "signatureSig")] - SignatureSig, - [EnumMember(Value = "signatureIntegrity")] - SignatureIntegrity, - [EnumMember(Value = "signatureCertUrl")] - SignatureCertUrl, - [EnumMember(Value = "signatureCertSha256")] - SignatureCertSha256, - [EnumMember(Value = "signatureValidityUrl")] - SignatureValidityUrl, - [EnumMember(Value = "signatureTimestamps")] - SignatureTimestamps, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeHeader.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeHeader.cs deleted file mode 100644 index af42eecde27d6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeHeader.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Information about a signed exchange header. - /// https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation - /// - public sealed class SignedExchangeHeader - { - /// - /// Signed exchange request URL. - /// - [JsonProperty("requestUrl")] - public string RequestUrl - { - get; - set; - } - /// - /// Signed exchange response code. - /// - [JsonProperty("responseCode")] - public long ResponseCode - { - get; - set; - } - /// - /// Signed exchange response headers. - /// - [JsonProperty("responseHeaders")] - public Headers ResponseHeaders - { - get; - set; - } - /// - /// Signed exchange response signature. - /// - [JsonProperty("signatures")] - public SignedExchangeSignature[] Signatures - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeInfo.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeInfo.cs deleted file mode 100644 index 967ce5d3ef79a..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeInfo.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Information about a signed exchange response. - /// - public sealed class SignedExchangeInfo - { - /// - /// The outer response of signed HTTP exchange which was received from network. - /// - [JsonProperty("outerResponse")] - public Response OuterResponse - { - get; - set; - } - /// - /// Information about the signed exchange header. - /// - [JsonProperty("header", DefaultValueHandling = DefaultValueHandling.Ignore)] - public SignedExchangeHeader Header - { - get; - set; - } - /// - /// Security details for the signed exchange header. - /// - [JsonProperty("securityDetails", DefaultValueHandling = DefaultValueHandling.Ignore)] - public SecurityDetails SecurityDetails - { - get; - set; - } - /// - /// Errors occurred while handling the signed exchagne. - /// - [JsonProperty("errors", DefaultValueHandling = DefaultValueHandling.Ignore)] - public SignedExchangeError[] Errors - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeReceivedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeReceivedEventArgs.cs deleted file mode 100644 index bb96ea37bb484..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeReceivedEventArgs.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when a signed exchange was received over the network - /// - public sealed class SignedExchangeReceivedEventArgs : EventArgs - { - /// - /// Request identifier. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - /// - /// Information about the signed exchange response. - /// - [JsonProperty("info")] - public SignedExchangeInfo Info - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeSignature.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeSignature.cs deleted file mode 100644 index d2b63d5faf044..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/SignedExchangeSignature.cs +++ /dev/null @@ -1,93 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Information about a signed exchange signature. - /// https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1 - /// - public sealed class SignedExchangeSignature - { - /// - /// Signed exchange signature label. - /// - [JsonProperty("label")] - public string Label - { - get; - set; - } - /// - /// The hex string of signed exchange signature. - /// - [JsonProperty("signature")] - public string Signature - { - get; - set; - } - /// - /// Signed exchange signature integrity. - /// - [JsonProperty("integrity")] - public string Integrity - { - get; - set; - } - /// - /// Signed exchange signature cert Url. - /// - [JsonProperty("certUrl", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string CertUrl - { - get; - set; - } - /// - /// The hex string of signed exchange signature cert sha256. - /// - [JsonProperty("certSha256", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string CertSha256 - { - get; - set; - } - /// - /// Signed exchange signature validity Url. - /// - [JsonProperty("validityUrl")] - public string ValidityUrl - { - get; - set; - } - /// - /// Signed exchange signature date. - /// - [JsonProperty("date")] - public long Date - { - get; - set; - } - /// - /// Signed exchange signature expires. - /// - [JsonProperty("expires")] - public long Expires - { - get; - set; - } - /// - /// The encoded certificates. - /// - [JsonProperty("certificates", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string[] Certificates - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/TakeResponseBodyForInterceptionAsStreamCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/TakeResponseBodyForInterceptionAsStreamCommand.cs deleted file mode 100644 index bebc650f180c7..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/TakeResponseBodyForInterceptionAsStreamCommand.cs +++ /dev/null @@ -1,44 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// Returns a handle to the stream representing the response body. Note that after this command, - /// the intercepted request can't be continued as is -- you either need to cancel it or to provide - /// the response body. The stream only supports sequential read, IO.read will fail if the position - /// is specified. - /// - public sealed class TakeResponseBodyForInterceptionAsStreamCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Network.takeResponseBodyForInterceptionAsStream"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the interceptionId - /// - [JsonProperty("interceptionId")] - public string InterceptionId - { - get; - set; - } - } - - public sealed class TakeResponseBodyForInterceptionAsStreamCommandResponse : ICommandResponse - { - /// - /// Gets or sets the stream - /// - [JsonProperty("stream")] - public string Stream - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketClosedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketClosedEventArgs.cs deleted file mode 100644 index ec358ea6813a3..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketClosedEventArgs.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when WebSocket is closed. - /// - public sealed class WebSocketClosedEventArgs : EventArgs - { - /// - /// Request identifier. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - /// - /// Timestamp. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketCreatedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketCreatedEventArgs.cs deleted file mode 100644 index b32e7aba2270c..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketCreatedEventArgs.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired upon WebSocket creation. - /// - public sealed class WebSocketCreatedEventArgs : EventArgs - { - /// - /// Request identifier. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - /// - /// WebSocket request URL. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Request initiator. - /// - [JsonProperty("initiator", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Initiator Initiator - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketFrame.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketFrame.cs deleted file mode 100644 index 0ef697a3b3cb3..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketFrame.cs +++ /dev/null @@ -1,40 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests. - /// - public sealed class WebSocketFrame - { - /// - /// WebSocket message opcode. - /// - [JsonProperty("opcode")] - public double Opcode - { - get; - set; - } - /// - /// WebSocket message mask. - /// - [JsonProperty("mask")] - public bool Mask - { - get; - set; - } - /// - /// WebSocket message payload data. - /// If the opcode is 1, this is a text message and payloadData is a UTF-8 string. - /// If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data. - /// - [JsonProperty("payloadData")] - public string PayloadData - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketFrameErrorEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketFrameErrorEventArgs.cs deleted file mode 100644 index 7e527a3ea70f2..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketFrameErrorEventArgs.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when WebSocket message error occurs. - /// - public sealed class WebSocketFrameErrorEventArgs : EventArgs - { - /// - /// Request identifier. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - /// - /// Timestamp. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - /// - /// WebSocket error message. - /// - [JsonProperty("errorMessage")] - public string ErrorMessage - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketFrameReceivedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketFrameReceivedEventArgs.cs deleted file mode 100644 index 14efb923b2071..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketFrameReceivedEventArgs.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when WebSocket message is received. - /// - public sealed class WebSocketFrameReceivedEventArgs : EventArgs - { - /// - /// Request identifier. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - /// - /// Timestamp. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - /// - /// WebSocket response data. - /// - [JsonProperty("response")] - public WebSocketFrame Response - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketFrameSentEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketFrameSentEventArgs.cs deleted file mode 100644 index d1dede873154b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketFrameSentEventArgs.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when WebSocket message is sent. - /// - public sealed class WebSocketFrameSentEventArgs : EventArgs - { - /// - /// Request identifier. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - /// - /// Timestamp. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - /// - /// WebSocket response data. - /// - [JsonProperty("response")] - public WebSocketFrame Response - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketHandshakeResponseReceivedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketHandshakeResponseReceivedEventArgs.cs deleted file mode 100644 index 43462f2768b68..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketHandshakeResponseReceivedEventArgs.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when WebSocket handshake response becomes available. - /// - public sealed class WebSocketHandshakeResponseReceivedEventArgs : EventArgs - { - /// - /// Request identifier. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - /// - /// Timestamp. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - /// - /// WebSocket response data. - /// - [JsonProperty("response")] - public WebSocketResponse Response - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketRequest.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketRequest.cs deleted file mode 100644 index 132fd71172cfe..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketRequest.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// WebSocket request data. - /// - public sealed class WebSocketRequest - { - /// - /// HTTP request headers. - /// - [JsonProperty("headers")] - public Headers Headers - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketResponse.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketResponse.cs deleted file mode 100644 index 1c2e14b6cbff6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketResponse.cs +++ /dev/null @@ -1,65 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using Newtonsoft.Json; - - /// - /// WebSocket response data. - /// - public sealed class WebSocketResponse - { - /// - /// HTTP response status code. - /// - [JsonProperty("status")] - public long Status - { - get; - set; - } - /// - /// HTTP response status text. - /// - [JsonProperty("statusText")] - public string StatusText - { - get; - set; - } - /// - /// HTTP response headers. - /// - [JsonProperty("headers")] - public Headers Headers - { - get; - set; - } - /// - /// HTTP response headers text. - /// - [JsonProperty("headersText", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string HeadersText - { - get; - set; - } - /// - /// HTTP request headers. - /// - [JsonProperty("requestHeaders", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Headers RequestHeaders - { - get; - set; - } - /// - /// HTTP request headers text. - /// - [JsonProperty("requestHeadersText", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string RequestHeadersText - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketWillSendHandshakeRequestEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketWillSendHandshakeRequestEventArgs.cs deleted file mode 100644 index c2ae212c3adcb..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Network/WebSocketWillSendHandshakeRequestEventArgs.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Network -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when WebSocket is about to initiate handshake. - /// - public sealed class WebSocketWillSendHandshakeRequestEventArgs : EventArgs - { - /// - /// Request identifier. - /// - [JsonProperty("requestId")] - public string RequestId - { - get; - set; - } - /// - /// Timestamp. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - /// - /// UTC Timestamp. - /// - [JsonProperty("wallTime")] - public double WallTime - { - get; - set; - } - /// - /// WebSocket request data. - /// - [JsonProperty("request")] - public WebSocketRequest Request - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/AddCompilationCacheCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/AddCompilationCacheCommand.cs deleted file mode 100644 index ed11ddd3f2de6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/AddCompilationCacheCommand.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Seeds compilation cache for given url. Compilation cache does not survive - /// cross-process navigation. - /// - public sealed class AddCompilationCacheCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.addCompilationCache"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the url - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Base64-encoded data - /// - [JsonProperty("data")] - public byte[] Data - { - get; - set; - } - } - - public sealed class AddCompilationCacheCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/AddScriptToEvaluateOnLoadCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/AddScriptToEvaluateOnLoadCommand.cs deleted file mode 100644 index 2a1e201510e01..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/AddScriptToEvaluateOnLoadCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Deprecated, please use addScriptToEvaluateOnNewDocument instead. - /// - public sealed class AddScriptToEvaluateOnLoadCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.addScriptToEvaluateOnLoad"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the scriptSource - /// - [JsonProperty("scriptSource")] - public string ScriptSource - { - get; - set; - } - } - - public sealed class AddScriptToEvaluateOnLoadCommandResponse : ICommandResponse - { - /// - /// Identifier of the added script. - /// - [JsonProperty("identifier")] - public string Identifier - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/AddScriptToEvaluateOnNewDocumentCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/AddScriptToEvaluateOnNewDocumentCommand.cs deleted file mode 100644 index 3ca5516e1eb52..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/AddScriptToEvaluateOnNewDocumentCommand.cs +++ /dev/null @@ -1,52 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Evaluates given script in every frame upon creation (before loading frame's scripts). - /// - public sealed class AddScriptToEvaluateOnNewDocumentCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.addScriptToEvaluateOnNewDocument"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the source - /// - [JsonProperty("source")] - public string Source - { - get; - set; - } - /// - /// If specified, creates an isolated world with the given name and evaluates given script in it. - /// This world name will be used as the ExecutionContextDescription::name when the corresponding - /// event is emitted. - /// - [JsonProperty("worldName", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string WorldName - { - get; - set; - } - } - - public sealed class AddScriptToEvaluateOnNewDocumentCommandResponse : ICommandResponse - { - /// - /// Identifier of the added script. - /// - [JsonProperty("identifier")] - public string Identifier - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/AppManifestError.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/AppManifestError.cs deleted file mode 100644 index 2769bc177ce85..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/AppManifestError.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Error while paring app manifest. - /// - public sealed class AppManifestError - { - /// - /// Error message. - /// - [JsonProperty("message")] - public string Message - { - get; - set; - } - /// - /// If criticial, this is a non-recoverable parse error. - /// - [JsonProperty("critical")] - public long Critical - { - get; - set; - } - /// - /// Error line. - /// - [JsonProperty("line")] - public long Line - { - get; - set; - } - /// - /// Error column. - /// - [JsonProperty("column")] - public long Column - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/BringToFrontCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/BringToFrontCommand.cs deleted file mode 100644 index 0044427aca6a8..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/BringToFrontCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Brings page to front (activates tab). - /// - public sealed class BringToFrontCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.bringToFront"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class BringToFrontCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CaptureScreenshotCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CaptureScreenshotCommand.cs deleted file mode 100644 index caba3354fce07..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CaptureScreenshotCommand.cs +++ /dev/null @@ -1,68 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Capture page screenshot. - /// - public sealed class CaptureScreenshotCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.captureScreenshot"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Image compression format (defaults to png). - /// - [JsonProperty("format", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Format - { - get; - set; - } - /// - /// Compression quality from range [0..100] (jpeg only). - /// - [JsonProperty("quality", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Quality - { - get; - set; - } - /// - /// Capture the screenshot of a given region only. - /// - [JsonProperty("clip", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Viewport Clip - { - get; - set; - } - /// - /// Capture the screenshot from the surface, rather than the view. Defaults to true. - /// - [JsonProperty("fromSurface", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? FromSurface - { - get; - set; - } - } - - public sealed class CaptureScreenshotCommandResponse : ICommandResponse - { - /// - /// Base64-encoded image data. - /// - [JsonProperty("data")] - public byte[] Data - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CaptureSnapshotCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CaptureSnapshotCommand.cs deleted file mode 100644 index e75378e953694..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CaptureSnapshotCommand.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Returns a snapshot of the page as a string. For MHTML format, the serialization includes - /// iframes, shadow DOM, external resources, and element-inline styles. - /// - public sealed class CaptureSnapshotCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.captureSnapshot"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Format (defaults to mhtml). - /// - [JsonProperty("format", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Format - { - get; - set; - } - } - - public sealed class CaptureSnapshotCommandResponse : ICommandResponse - { - /// - /// Serialized page data. - /// - [JsonProperty("data")] - public string Data - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ClearCompilationCacheCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ClearCompilationCacheCommand.cs deleted file mode 100644 index bffc97ad4c6ca..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ClearCompilationCacheCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Clears seeded compilation cache. - /// - public sealed class ClearCompilationCacheCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.clearCompilationCache"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class ClearCompilationCacheCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ClearDeviceMetricsOverrideCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ClearDeviceMetricsOverrideCommand.cs deleted file mode 100644 index 4a5a0a3e6bc41..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ClearDeviceMetricsOverrideCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Clears the overriden device metrics. - /// - public sealed class ClearDeviceMetricsOverrideCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.clearDeviceMetricsOverride"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class ClearDeviceMetricsOverrideCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ClearDeviceOrientationOverrideCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ClearDeviceOrientationOverrideCommand.cs deleted file mode 100644 index 1d281a658cf60..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ClearDeviceOrientationOverrideCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Clears the overridden Device Orientation. - /// - public sealed class ClearDeviceOrientationOverrideCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.clearDeviceOrientationOverride"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class ClearDeviceOrientationOverrideCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ClearGeolocationOverrideCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ClearGeolocationOverrideCommand.cs deleted file mode 100644 index 74562f46c11df..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ClearGeolocationOverrideCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Clears the overriden Geolocation Position and Error. - /// - public sealed class ClearGeolocationOverrideCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.clearGeolocationOverride"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class ClearGeolocationOverrideCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ClientNavigationReason.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ClientNavigationReason.cs deleted file mode 100644 index 1e2278bd9a5be..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ClientNavigationReason.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// ClientNavigationReason - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ClientNavigationReason - { - [EnumMember(Value = "formSubmissionGet")] - FormSubmissionGet, - [EnumMember(Value = "formSubmissionPost")] - FormSubmissionPost, - [EnumMember(Value = "httpHeaderRefresh")] - HttpHeaderRefresh, - [EnumMember(Value = "scriptInitiated")] - ScriptInitiated, - [EnumMember(Value = "metaTagRefresh")] - MetaTagRefresh, - [EnumMember(Value = "pageBlockInterstitial")] - PageBlockInterstitial, - [EnumMember(Value = "reload")] - Reload, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CloseCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CloseCommand.cs deleted file mode 100644 index ae4aff453202a..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CloseCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Tries to close page, running its beforeunload hooks, if any. - /// - public sealed class CloseCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.close"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class CloseCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CompilationCacheProducedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CompilationCacheProducedEventArgs.cs deleted file mode 100644 index cc5a46e0d5e6f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CompilationCacheProducedEventArgs.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Issued for every compilation cache generated. Is only available - /// if Page.setGenerateCompilationCache is enabled. - /// - public sealed class CompilationCacheProducedEventArgs : EventArgs - { - /// - /// Gets or sets the url - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Base64-encoded data - /// - [JsonProperty("data")] - public byte[] Data - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CrashCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CrashCommand.cs deleted file mode 100644 index 183cc373565e5..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CrashCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Crashes renderer on the IO thread, generates minidumps. - /// - public sealed class CrashCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.crash"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class CrashCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CreateIsolatedWorldCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CreateIsolatedWorldCommand.cs deleted file mode 100644 index b1d03c15004cb..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/CreateIsolatedWorldCommand.cs +++ /dev/null @@ -1,60 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Creates an isolated world for the given frame. - /// - public sealed class CreateIsolatedWorldCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.createIsolatedWorld"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the frame in which the isolated world should be created. - /// - [JsonProperty("frameId")] - public string FrameId - { - get; - set; - } - /// - /// An optional name which is reported in the Execution Context. - /// - [JsonProperty("worldName", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string WorldName - { - get; - set; - } - /// - /// Whether or not universal access should be granted to the isolated world. This is a powerful - /// option, use with caution. - /// - [JsonProperty("grantUniveralAccess", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? GrantUniveralAccess - { - get; - set; - } - } - - public sealed class CreateIsolatedWorldCommandResponse : ICommandResponse - { - /// - /// Execution context of the isolated world. - /// - [JsonProperty("executionContextId")] - public long ExecutionContextId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/DeleteCookieCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/DeleteCookieCommand.cs deleted file mode 100644 index 9b0fa1e8abcf6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/DeleteCookieCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Deletes browser cookie with given name, domain and path. - /// - public sealed class DeleteCookieCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.deleteCookie"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Name of the cookie to remove. - /// - [JsonProperty("cookieName")] - public string CookieName - { - get; - set; - } - /// - /// URL to match cooke domain and path. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - } - - public sealed class DeleteCookieCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/DialogType.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/DialogType.cs deleted file mode 100644 index 95ad3f7bf7e8b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/DialogType.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// Javascript dialog type. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum DialogType - { - [EnumMember(Value = "alert")] - Alert, - [EnumMember(Value = "confirm")] - Confirm, - [EnumMember(Value = "prompt")] - Prompt, - [EnumMember(Value = "beforeunload")] - Beforeunload, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/DisableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/DisableCommand.cs deleted file mode 100644 index 9ed2215a85657..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/DisableCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Disables page domain notifications. - /// - public sealed class DisableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.disable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class DisableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/DomContentEventFiredEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/DomContentEventFiredEventArgs.cs deleted file mode 100644 index 5af2753955ea5..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/DomContentEventFiredEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// DomContentEventFired - /// - public sealed class DomContentEventFiredEventArgs : EventArgs - { - /// - /// Gets or sets the timestamp - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/EnableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/EnableCommand.cs deleted file mode 100644 index 34e6687f1ffc6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/EnableCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Enables page domain notifications. - /// - public sealed class EnableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.enable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class EnableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FontFamilies.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FontFamilies.cs deleted file mode 100644 index 2aa89b9934a37..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FontFamilies.cs +++ /dev/null @@ -1,74 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Generic font families collection. - /// - public sealed class FontFamilies - { - /// - /// The standard font-family. - /// - [JsonProperty("standard", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Standard - { - get; - set; - } - /// - /// The fixed font-family. - /// - [JsonProperty("fixed", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Fixed - { - get; - set; - } - /// - /// The serif font-family. - /// - [JsonProperty("serif", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Serif - { - get; - set; - } - /// - /// The sansSerif font-family. - /// - [JsonProperty("sansSerif", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string SansSerif - { - get; - set; - } - /// - /// The cursive font-family. - /// - [JsonProperty("cursive", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Cursive - { - get; - set; - } - /// - /// The fantasy font-family. - /// - [JsonProperty("fantasy", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Fantasy - { - get; - set; - } - /// - /// The pictograph font-family. - /// - [JsonProperty("pictograph", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Pictograph - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FontSizes.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FontSizes.cs deleted file mode 100644 index 53a00cfa351bf..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FontSizes.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Default font sizes. - /// - public sealed class FontSizes - { - /// - /// Default standard font size. - /// - [JsonProperty("standard", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Standard - { - get; - set; - } - /// - /// Default fixed font size. - /// - [JsonProperty("fixed", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Fixed - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/Frame.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/Frame.cs deleted file mode 100644 index 04698fc8377d7..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/Frame.cs +++ /dev/null @@ -1,83 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Information about the Frame on the page. - /// - public sealed class Frame - { - /// - /// Frame unique identifier. - /// - [JsonProperty("id")] - public string Id - { - get; - set; - } - /// - /// Parent frame identifier. - /// - [JsonProperty("parentId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ParentId - { - get; - set; - } - /// - /// Identifier of the loader associated with this frame. - /// - [JsonProperty("loaderId")] - public string LoaderId - { - get; - set; - } - /// - /// Frame's name as specified in the tag. - /// - [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Name - { - get; - set; - } - /// - /// Frame document's URL. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Frame document's security origin. - /// - [JsonProperty("securityOrigin")] - public string SecurityOrigin - { - get; - set; - } - /// - /// Frame document's mimeType as determined by the browser. - /// - [JsonProperty("mimeType")] - public string MimeType - { - get; - set; - } - /// - /// If the frame failed to load, this contains the URL that could not be loaded. - /// - [JsonProperty("unreachableUrl", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string UnreachableUrl - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameAttachedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameAttachedEventArgs.cs deleted file mode 100644 index e36fe42898c42..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameAttachedEventArgs.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when frame has been attached to its parent. - /// - public sealed class FrameAttachedEventArgs : EventArgs - { - /// - /// Id of the frame that has been attached. - /// - [JsonProperty("frameId")] - public string FrameId - { - get; - set; - } - /// - /// Parent frame identifier. - /// - [JsonProperty("parentFrameId")] - public string ParentFrameId - { - get; - set; - } - /// - /// JavaScript stack trace of when frame was attached, only set if frame initiated from script. - /// - [JsonProperty("stack", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Runtime.StackTrace Stack - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameClearedScheduledNavigationEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameClearedScheduledNavigationEventArgs.cs deleted file mode 100644 index 0fcf8656b552b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameClearedScheduledNavigationEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when frame no longer has a scheduled navigation. - /// - public sealed class FrameClearedScheduledNavigationEventArgs : EventArgs - { - /// - /// Id of the frame that has cleared its scheduled navigation. - /// - [JsonProperty("frameId")] - public string FrameId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameDetachedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameDetachedEventArgs.cs deleted file mode 100644 index 9ba7a242ef605..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameDetachedEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when frame has been detached from its parent. - /// - public sealed class FrameDetachedEventArgs : EventArgs - { - /// - /// Id of the frame that has been detached. - /// - [JsonProperty("frameId")] - public string FrameId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameNavigatedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameNavigatedEventArgs.cs deleted file mode 100644 index e1c9c18d52fa6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameNavigatedEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired once navigation of the frame has completed. Frame is now associated with the new loader. - /// - public sealed class FrameNavigatedEventArgs : EventArgs - { - /// - /// Frame object. - /// - [JsonProperty("frame")] - public Frame Frame - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameRequestedNavigationEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameRequestedNavigationEventArgs.cs deleted file mode 100644 index 57e2cac2a9980..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameRequestedNavigationEventArgs.cs +++ /dev/null @@ -1,40 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when a renderer-initiated navigation is requested. - /// Navigation may still be cancelled after the event is issued. - /// - public sealed class FrameRequestedNavigationEventArgs : EventArgs - { - /// - /// Id of the frame that is being navigated. - /// - [JsonProperty("frameId")] - public string FrameId - { - get; - set; - } - /// - /// The reason for the navigation. - /// - [JsonProperty("reason")] - public ClientNavigationReason Reason - { - get; - set; - } - /// - /// The destination URL for the requested navigation. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameResizedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameResizedEventArgs.cs deleted file mode 100644 index 70b1acb72c505..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameResizedEventArgs.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// FrameResized - /// - public sealed class FrameResizedEventArgs : EventArgs - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameResource.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameResource.cs deleted file mode 100644 index 5a9b4585ba23a..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameResource.cs +++ /dev/null @@ -1,74 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Information about the Resource on the page. - /// - public sealed class FrameResource - { - /// - /// Resource URL. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Type of this resource. - /// - [JsonProperty("type")] - public Network.ResourceType Type - { - get; - set; - } - /// - /// Resource mimeType as determined by the browser. - /// - [JsonProperty("mimeType")] - public string MimeType - { - get; - set; - } - /// - /// last-modified timestamp as reported by server. - /// - [JsonProperty("lastModified", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? LastModified - { - get; - set; - } - /// - /// Resource content size. - /// - [JsonProperty("contentSize", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? ContentSize - { - get; - set; - } - /// - /// True if the resource failed to load. - /// - [JsonProperty("failed", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Failed - { - get; - set; - } - /// - /// True if the resource was canceled during loading. - /// - [JsonProperty("canceled", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Canceled - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameResourceTree.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameResourceTree.cs deleted file mode 100644 index 0fe0690de8a9e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameResourceTree.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Information about the Frame hierarchy along with their cached resources. - /// - public sealed class FrameResourceTree - { - /// - /// Frame information for this tree item. - /// - [JsonProperty("frame")] - public Frame Frame - { - get; - set; - } - /// - /// Child frames. - /// - [JsonProperty("childFrames", DefaultValueHandling = DefaultValueHandling.Ignore)] - public FrameResourceTree[] ChildFrames - { - get; - set; - } - /// - /// Information about frame resources. - /// - [JsonProperty("resources")] - public FrameResource[] Resources - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameScheduledNavigationEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameScheduledNavigationEventArgs.cs deleted file mode 100644 index b23ccbd31d74b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameScheduledNavigationEventArgs.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when frame schedules a potential navigation. - /// - public sealed class FrameScheduledNavigationEventArgs : EventArgs - { - /// - /// Id of the frame that has scheduled a navigation. - /// - [JsonProperty("frameId")] - public string FrameId - { - get; - set; - } - /// - /// Delay (in seconds) until the navigation is scheduled to begin. The navigation is not - /// guaranteed to start. - /// - [JsonProperty("delay")] - public double Delay - { - get; - set; - } - /// - /// The reason for the navigation. - /// - [JsonProperty("reason")] - public string Reason - { - get; - set; - } - /// - /// The destination URL for the scheduled navigation. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameStartedLoadingEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameStartedLoadingEventArgs.cs deleted file mode 100644 index 2d851892896e6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameStartedLoadingEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when frame has started loading. - /// - public sealed class FrameStartedLoadingEventArgs : EventArgs - { - /// - /// Id of the frame that has started loading. - /// - [JsonProperty("frameId")] - public string FrameId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameStoppedLoadingEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameStoppedLoadingEventArgs.cs deleted file mode 100644 index 470ce3dc02738..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameStoppedLoadingEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when frame has stopped loading. - /// - public sealed class FrameStoppedLoadingEventArgs : EventArgs - { - /// - /// Id of the frame that has stopped loading. - /// - [JsonProperty("frameId")] - public string FrameId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameTree.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameTree.cs deleted file mode 100644 index fa490866720f1..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/FrameTree.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Information about the Frame hierarchy. - /// - public sealed class FrameTree - { - /// - /// Frame information for this tree item. - /// - [JsonProperty("frame")] - public Frame Frame - { - get; - set; - } - /// - /// Child frames. - /// - [JsonProperty("childFrames", DefaultValueHandling = DefaultValueHandling.Ignore)] - public FrameTree[] ChildFrames - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GenerateTestReportCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GenerateTestReportCommand.cs deleted file mode 100644 index 24aa41175c263..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GenerateTestReportCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Generates a report for testing. - /// - public sealed class GenerateTestReportCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.generateTestReport"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Message to be displayed in the report. - /// - [JsonProperty("message")] - public string Message - { - get; - set; - } - /// - /// Specifies the endpoint group to deliver the report to. - /// - [JsonProperty("group", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Group - { - get; - set; - } - } - - public sealed class GenerateTestReportCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetAppManifestCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetAppManifestCommand.cs deleted file mode 100644 index 67d4032709e59..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetAppManifestCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// GetAppManifest - /// - public sealed class GetAppManifestCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.getAppManifest"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetAppManifestCommandResponse : ICommandResponse - { - /// - /// Manifest location. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Gets or sets the errors - /// - [JsonProperty("errors")] - public AppManifestError[] Errors - { - get; - set; - } - /// - /// Manifest content. - /// - [JsonProperty("data", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Data - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetCookiesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetCookiesCommand.cs deleted file mode 100644 index 11e683a929cee..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetCookiesCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Returns all browser cookies. Depending on the backend support, will return detailed cookie - /// information in the `cookies` field. - /// - public sealed class GetCookiesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.getCookies"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetCookiesCommandResponse : ICommandResponse - { - /// - /// Array of cookie objects. - /// - [JsonProperty("cookies")] - public Network.Cookie[] Cookies - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetFrameTreeCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetFrameTreeCommand.cs deleted file mode 100644 index 8210e7c4aa561..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetFrameTreeCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Returns present frame tree structure. - /// - public sealed class GetFrameTreeCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.getFrameTree"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetFrameTreeCommandResponse : ICommandResponse - { - /// - /// Present frame tree structure. - /// - [JsonProperty("frameTree")] - public FrameTree FrameTree - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetInstallabilityErrorsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetInstallabilityErrorsCommand.cs deleted file mode 100644 index 495de8aea4de2..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetInstallabilityErrorsCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// GetInstallabilityErrors - /// - public sealed class GetInstallabilityErrorsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.getInstallabilityErrors"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetInstallabilityErrorsCommandResponse : ICommandResponse - { - /// - /// Gets or sets the errors - /// - [JsonProperty("errors")] - public string[] Errors - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetLayoutMetricsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetLayoutMetricsCommand.cs deleted file mode 100644 index b010c5fadb608..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetLayoutMetricsCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Returns metrics relating to the layouting of the page, such as viewport bounds/scale. - /// - public sealed class GetLayoutMetricsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.getLayoutMetrics"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetLayoutMetricsCommandResponse : ICommandResponse - { - /// - /// Metrics relating to the layout viewport. - /// - [JsonProperty("layoutViewport")] - public LayoutViewport LayoutViewport - { - get; - set; - } - /// - /// Metrics relating to the visual viewport. - /// - [JsonProperty("visualViewport")] - public VisualViewport VisualViewport - { - get; - set; - } - /// - /// Size of scrollable area. - /// - [JsonProperty("contentSize")] - public DOM.Rect ContentSize - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetNavigationHistoryCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetNavigationHistoryCommand.cs deleted file mode 100644 index 8113f568d16e8..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetNavigationHistoryCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Returns navigation history for the current page. - /// - public sealed class GetNavigationHistoryCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.getNavigationHistory"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetNavigationHistoryCommandResponse : ICommandResponse - { - /// - /// Index of the current navigation history entry. - /// - [JsonProperty("currentIndex")] - public long CurrentIndex - { - get; - set; - } - /// - /// Array of navigation history entries. - /// - [JsonProperty("entries")] - public NavigationEntry[] Entries - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetResourceContentCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetResourceContentCommand.cs deleted file mode 100644 index 55d46c01f6bb2..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetResourceContentCommand.cs +++ /dev/null @@ -1,59 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Returns content of the given resource. - /// - public sealed class GetResourceContentCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.getResourceContent"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Frame id to get resource for. - /// - [JsonProperty("frameId")] - public string FrameId - { - get; - set; - } - /// - /// URL of the resource to get content for. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - } - - public sealed class GetResourceContentCommandResponse : ICommandResponse - { - /// - /// Resource content. - /// - [JsonProperty("content")] - public string Content - { - get; - set; - } - /// - /// True, if content was served as base64. - /// - [JsonProperty("base64Encoded")] - public bool Base64Encoded - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetResourceTreeCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetResourceTreeCommand.cs deleted file mode 100644 index 5f4e40825702e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/GetResourceTreeCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Returns present frame / resource tree structure. - /// - public sealed class GetResourceTreeCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.getResourceTree"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetResourceTreeCommandResponse : ICommandResponse - { - /// - /// Present frame / resource tree structure. - /// - [JsonProperty("frameTree")] - public FrameResourceTree FrameTree - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/HandleJavaScriptDialogCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/HandleJavaScriptDialogCommand.cs deleted file mode 100644 index 353e099d8915e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/HandleJavaScriptDialogCommand.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). - /// - public sealed class HandleJavaScriptDialogCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.handleJavaScriptDialog"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Whether to accept or dismiss the dialog. - /// - [JsonProperty("accept")] - public bool Accept - { - get; - set; - } - /// - /// The text to enter into the dialog prompt before accepting. Used only if this is a prompt - /// dialog. - /// - [JsonProperty("promptText", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string PromptText - { - get; - set; - } - } - - public sealed class HandleJavaScriptDialogCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/InterstitialHiddenEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/InterstitialHiddenEventArgs.cs deleted file mode 100644 index 74871f141518f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/InterstitialHiddenEventArgs.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when interstitial page was hidden - /// - public sealed class InterstitialHiddenEventArgs : EventArgs - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/InterstitialShownEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/InterstitialShownEventArgs.cs deleted file mode 100644 index 6f6d155ff8a65..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/InterstitialShownEventArgs.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when interstitial page was shown - /// - public sealed class InterstitialShownEventArgs : EventArgs - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/JavascriptDialogClosedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/JavascriptDialogClosedEventArgs.cs deleted file mode 100644 index 0ee4fdb5ee4a5..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/JavascriptDialogClosedEventArgs.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been - /// closed. - /// - public sealed class JavascriptDialogClosedEventArgs : EventArgs - { - /// - /// Whether dialog was confirmed. - /// - [JsonProperty("result")] - public bool Result - { - get; - set; - } - /// - /// User input in case of prompt. - /// - [JsonProperty("userInput")] - public string UserInput - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/JavascriptDialogOpeningEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/JavascriptDialogOpeningEventArgs.cs deleted file mode 100644 index 1b18dea2043ff..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/JavascriptDialogOpeningEventArgs.cs +++ /dev/null @@ -1,60 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to - /// open. - /// - public sealed class JavascriptDialogOpeningEventArgs : EventArgs - { - /// - /// Frame url. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Message that will be displayed by the dialog. - /// - [JsonProperty("message")] - public string Message - { - get; - set; - } - /// - /// Dialog type. - /// - [JsonProperty("type")] - public DialogType Type - { - get; - set; - } - /// - /// True iff browser is capable showing or acting on the given dialog. When browser has no - /// dialog handler for given target, calling alert while Page domain is engaged will stall - /// the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog. - /// - [JsonProperty("hasBrowserHandler")] - public bool HasBrowserHandler - { - get; - set; - } - /// - /// Default dialog prompt. - /// - [JsonProperty("defaultPrompt", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string DefaultPrompt - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/LayoutViewport.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/LayoutViewport.cs deleted file mode 100644 index a94457bb091b3..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/LayoutViewport.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Layout viewport position and dimensions. - /// - public sealed class LayoutViewport - { - /// - /// Horizontal offset relative to the document (CSS pixels). - /// - [JsonProperty("pageX")] - public long PageX - { - get; - set; - } - /// - /// Vertical offset relative to the document (CSS pixels). - /// - [JsonProperty("pageY")] - public long PageY - { - get; - set; - } - /// - /// Width (CSS pixels), excludes scrollbar if present. - /// - [JsonProperty("clientWidth")] - public long ClientWidth - { - get; - set; - } - /// - /// Height (CSS pixels), excludes scrollbar if present. - /// - [JsonProperty("clientHeight")] - public long ClientHeight - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/LifecycleEventEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/LifecycleEventEventArgs.cs deleted file mode 100644 index 18692e1162354..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/LifecycleEventEventArgs.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired for top level page lifecycle events such as navigation, load, paint, etc. - /// - public sealed class LifecycleEventEventArgs : EventArgs - { - /// - /// Id of the frame. - /// - [JsonProperty("frameId")] - public string FrameId - { - get; - set; - } - /// - /// Loader identifier. Empty string if the request is fetched from worker. - /// - [JsonProperty("loaderId")] - public string LoaderId - { - get; - set; - } - /// - /// Gets or sets the name - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// Gets or sets the timestamp - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/LoadEventFiredEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/LoadEventFiredEventArgs.cs deleted file mode 100644 index ff88ca8c3c63c..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/LoadEventFiredEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// LoadEventFired - /// - public sealed class LoadEventFiredEventArgs : EventArgs - { - /// - /// Gets or sets the timestamp - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/NavigateCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/NavigateCommand.cs deleted file mode 100644 index 157fe3c86a389..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/NavigateCommand.cs +++ /dev/null @@ -1,86 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Navigates current page to the given URL. - /// - public sealed class NavigateCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.navigate"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// URL to navigate the page to. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Referrer URL. - /// - [JsonProperty("referrer", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Referrer - { - get; - set; - } - /// - /// Intended transition type. - /// - [JsonProperty("transitionType", DefaultValueHandling = DefaultValueHandling.Ignore)] - public TransitionType? TransitionType - { - get; - set; - } - /// - /// Frame id to navigate, if not specified navigates the top frame. - /// - [JsonProperty("frameId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string FrameId - { - get; - set; - } - } - - public sealed class NavigateCommandResponse : ICommandResponse - { - /// - /// Frame id that has navigated (or failed to navigate) - /// - [JsonProperty("frameId")] - public string FrameId - { - get; - set; - } - /// - /// Loader identifier. - /// - [JsonProperty("loaderId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string LoaderId - { - get; - set; - } - /// - /// User friendly error message, present if and only if navigation has failed. - /// - [JsonProperty("errorText", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ErrorText - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/NavigateToHistoryEntryCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/NavigateToHistoryEntryCommand.cs deleted file mode 100644 index 8d14bf77cbb09..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/NavigateToHistoryEntryCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Navigates current page to the given history entry. - /// - public sealed class NavigateToHistoryEntryCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.navigateToHistoryEntry"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Unique id of the entry to navigate to. - /// - [JsonProperty("entryId")] - public long EntryId - { - get; - set; - } - } - - public sealed class NavigateToHistoryEntryCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/NavigatedWithinDocumentEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/NavigatedWithinDocumentEventArgs.cs deleted file mode 100644 index 457a98d5f50ff..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/NavigatedWithinDocumentEventArgs.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation. - /// - public sealed class NavigatedWithinDocumentEventArgs : EventArgs - { - /// - /// Id of the frame. - /// - [JsonProperty("frameId")] - public string FrameId - { - get; - set; - } - /// - /// Frame's new url. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/NavigationEntry.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/NavigationEntry.cs deleted file mode 100644 index bba23943f9724..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/NavigationEntry.cs +++ /dev/null @@ -1,56 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Navigation history entry. - /// - public sealed class NavigationEntry - { - /// - /// Unique id of the navigation history entry. - /// - [JsonProperty("id")] - public long Id - { - get; - set; - } - /// - /// URL of the navigation history entry. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// URL that the user typed in the url bar. - /// - [JsonProperty("userTypedURL")] - public string UserTypedURL - { - get; - set; - } - /// - /// Title of the navigation history entry. - /// - [JsonProperty("title")] - public string Title - { - get; - set; - } - /// - /// Transition type. - /// - [JsonProperty("transitionType")] - public TransitionType TransitionType - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/PageAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/PageAdapter.cs deleted file mode 100644 index 168b124888f62..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/PageAdapter.cs +++ /dev/null @@ -1,697 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the Page domain to simplify the command interface. - /// - public class PageAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "Page"; - private Dictionary m_eventMap = new Dictionary(); - - public PageAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - m_eventMap["domContentEventFired"] = new DevToolsEventData(typeof(DomContentEventFiredEventArgs), OnDomContentEventFired); - m_eventMap["frameAttached"] = new DevToolsEventData(typeof(FrameAttachedEventArgs), OnFrameAttached); - m_eventMap["frameClearedScheduledNavigation"] = new DevToolsEventData(typeof(FrameClearedScheduledNavigationEventArgs), OnFrameClearedScheduledNavigation); - m_eventMap["frameDetached"] = new DevToolsEventData(typeof(FrameDetachedEventArgs), OnFrameDetached); - m_eventMap["frameNavigated"] = new DevToolsEventData(typeof(FrameNavigatedEventArgs), OnFrameNavigated); - m_eventMap["frameResized"] = new DevToolsEventData(typeof(FrameResizedEventArgs), OnFrameResized); - m_eventMap["frameRequestedNavigation"] = new DevToolsEventData(typeof(FrameRequestedNavigationEventArgs), OnFrameRequestedNavigation); - m_eventMap["frameScheduledNavigation"] = new DevToolsEventData(typeof(FrameScheduledNavigationEventArgs), OnFrameScheduledNavigation); - m_eventMap["frameStartedLoading"] = new DevToolsEventData(typeof(FrameStartedLoadingEventArgs), OnFrameStartedLoading); - m_eventMap["frameStoppedLoading"] = new DevToolsEventData(typeof(FrameStoppedLoadingEventArgs), OnFrameStoppedLoading); - m_eventMap["interstitialHidden"] = new DevToolsEventData(typeof(InterstitialHiddenEventArgs), OnInterstitialHidden); - m_eventMap["interstitialShown"] = new DevToolsEventData(typeof(InterstitialShownEventArgs), OnInterstitialShown); - m_eventMap["javascriptDialogClosed"] = new DevToolsEventData(typeof(JavascriptDialogClosedEventArgs), OnJavascriptDialogClosed); - m_eventMap["javascriptDialogOpening"] = new DevToolsEventData(typeof(JavascriptDialogOpeningEventArgs), OnJavascriptDialogOpening); - m_eventMap["lifecycleEvent"] = new DevToolsEventData(typeof(LifecycleEventEventArgs), OnLifecycleEvent); - m_eventMap["loadEventFired"] = new DevToolsEventData(typeof(LoadEventFiredEventArgs), OnLoadEventFired); - m_eventMap["navigatedWithinDocument"] = new DevToolsEventData(typeof(NavigatedWithinDocumentEventArgs), OnNavigatedWithinDocument); - m_eventMap["screencastFrame"] = new DevToolsEventData(typeof(ScreencastFrameEventArgs), OnScreencastFrame); - m_eventMap["screencastVisibilityChanged"] = new DevToolsEventData(typeof(ScreencastVisibilityChangedEventArgs), OnScreencastVisibilityChanged); - m_eventMap["windowOpen"] = new DevToolsEventData(typeof(WindowOpenEventArgs), OnWindowOpen); - m_eventMap["compilationCacheProduced"] = new DevToolsEventData(typeof(CompilationCacheProducedEventArgs), OnCompilationCacheProduced); - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - /// - /// domContentEventFired - /// - public event EventHandler DomContentEventFired; - /// - /// Fired when frame has been attached to its parent. - /// - public event EventHandler FrameAttached; - /// - /// Fired when frame no longer has a scheduled navigation. - /// - public event EventHandler FrameClearedScheduledNavigation; - /// - /// Fired when frame has been detached from its parent. - /// - public event EventHandler FrameDetached; - /// - /// Fired once navigation of the frame has completed. Frame is now associated with the new loader. - /// - public event EventHandler FrameNavigated; - /// - /// frameResized - /// - public event EventHandler FrameResized; - /// - /// Fired when a renderer-initiated navigation is requested. - /// Navigation may still be cancelled after the event is issued. - /// - public event EventHandler FrameRequestedNavigation; - /// - /// Fired when frame schedules a potential navigation. - /// - public event EventHandler FrameScheduledNavigation; - /// - /// Fired when frame has started loading. - /// - public event EventHandler FrameStartedLoading; - /// - /// Fired when frame has stopped loading. - /// - public event EventHandler FrameStoppedLoading; - /// - /// Fired when interstitial page was hidden - /// - public event EventHandler InterstitialHidden; - /// - /// Fired when interstitial page was shown - /// - public event EventHandler InterstitialShown; - /// - /// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been - /// closed. - /// - public event EventHandler JavascriptDialogClosed; - /// - /// Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to - /// open. - /// - public event EventHandler JavascriptDialogOpening; - /// - /// Fired for top level page lifecycle events such as navigation, load, paint, etc. - /// - public event EventHandler LifecycleEvent; - /// - /// loadEventFired - /// - public event EventHandler LoadEventFired; - /// - /// Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation. - /// - public event EventHandler NavigatedWithinDocument; - /// - /// Compressed image data requested by the `startScreencast`. - /// - public event EventHandler ScreencastFrame; - /// - /// Fired when the page with currently enabled screencast was shown or hidden `. - /// - public event EventHandler ScreencastVisibilityChanged; - /// - /// Fired when a new window is going to be opened, via window.open(), link click, form submission, - /// etc. - /// - public event EventHandler WindowOpen; - /// - /// Issued for every compilation cache generated. Is only available - /// if Page.setGenerateCompilationCache is enabled. - /// - public event EventHandler CompilationCacheProduced; - - /// - /// Deprecated, please use addScriptToEvaluateOnNewDocument instead. - /// - public async Task AddScriptToEvaluateOnLoad(AddScriptToEvaluateOnLoadCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Evaluates given script in every frame upon creation (before loading frame's scripts). - /// - public async Task AddScriptToEvaluateOnNewDocument(AddScriptToEvaluateOnNewDocumentCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Brings page to front (activates tab). - /// - public async Task BringToFront(BringToFrontCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new BringToFrontCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Capture page screenshot. - /// - public async Task CaptureScreenshot(CaptureScreenshotCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns a snapshot of the page as a string. For MHTML format, the serialization includes - /// iframes, shadow DOM, external resources, and element-inline styles. - /// - public async Task CaptureSnapshot(CaptureSnapshotCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Clears the overriden device metrics. - /// - public async Task ClearDeviceMetricsOverride(ClearDeviceMetricsOverrideCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new ClearDeviceMetricsOverrideCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Clears the overridden Device Orientation. - /// - public async Task ClearDeviceOrientationOverride(ClearDeviceOrientationOverrideCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new ClearDeviceOrientationOverrideCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Clears the overriden Geolocation Position and Error. - /// - public async Task ClearGeolocationOverride(ClearGeolocationOverrideCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new ClearGeolocationOverrideCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Creates an isolated world for the given frame. - /// - public async Task CreateIsolatedWorld(CreateIsolatedWorldCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Deletes browser cookie with given name, domain and path. - /// - public async Task DeleteCookie(DeleteCookieCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Disables page domain notifications. - /// - public async Task Disable(DisableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new DisableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enables page domain notifications. - /// - public async Task Enable(EnableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new EnableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// getAppManifest - /// - public async Task GetAppManifest(GetAppManifestCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetAppManifestCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// getInstallabilityErrors - /// - public async Task GetInstallabilityErrors(GetInstallabilityErrorsCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetInstallabilityErrorsCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns all browser cookies. Depending on the backend support, will return detailed cookie - /// information in the `cookies` field. - /// - public async Task GetCookies(GetCookiesCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetCookiesCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns present frame tree structure. - /// - public async Task GetFrameTree(GetFrameTreeCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetFrameTreeCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns metrics relating to the layouting of the page, such as viewport bounds/scale. - /// - public async Task GetLayoutMetrics(GetLayoutMetricsCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetLayoutMetricsCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns navigation history for the current page. - /// - public async Task GetNavigationHistory(GetNavigationHistoryCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetNavigationHistoryCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Resets navigation history for the current page. - /// - public async Task ResetNavigationHistory(ResetNavigationHistoryCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new ResetNavigationHistoryCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns content of the given resource. - /// - public async Task GetResourceContent(GetResourceContentCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns present frame / resource tree structure. - /// - public async Task GetResourceTree(GetResourceTreeCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetResourceTreeCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). - /// - public async Task HandleJavaScriptDialog(HandleJavaScriptDialogCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Navigates current page to the given URL. - /// - public async Task Navigate(NavigateCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Navigates current page to the given history entry. - /// - public async Task NavigateToHistoryEntry(NavigateToHistoryEntryCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Print page as PDF. - /// - public async Task PrintToPDF(PrintToPDFCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Reloads given page optionally ignoring the cache. - /// - public async Task Reload(ReloadCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Deprecated, please use removeScriptToEvaluateOnNewDocument instead. - /// - public async Task RemoveScriptToEvaluateOnLoad(RemoveScriptToEvaluateOnLoadCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Removes given script from the list. - /// - public async Task RemoveScriptToEvaluateOnNewDocument(RemoveScriptToEvaluateOnNewDocumentCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Acknowledges that a screencast frame has been received by the frontend. - /// - public async Task ScreencastFrameAck(ScreencastFrameAckCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Searches for given string in resource content. - /// - public async Task SearchInResource(SearchInResourceCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enable Chrome's experimental ad filter on all sites. - /// - public async Task SetAdBlockingEnabled(SetAdBlockingEnabledCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enable page Content Security Policy by-passing. - /// - public async Task SetBypassCSP(SetBypassCSPCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Overrides the values of device screen dimensions (window.screen.width, window.screen.height, - /// window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media - /// query results). - /// - public async Task SetDeviceMetricsOverride(SetDeviceMetricsOverrideCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Overrides the Device Orientation. - /// - public async Task SetDeviceOrientationOverride(SetDeviceOrientationOverrideCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Set generic font families. - /// - public async Task SetFontFamilies(SetFontFamiliesCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Set default font sizes. - /// - public async Task SetFontSizes(SetFontSizesCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets given markup as the document's HTML. - /// - public async Task SetDocumentContent(SetDocumentContentCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Set the behavior when downloading a file. - /// - public async Task SetDownloadBehavior(SetDownloadBehaviorCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position - /// unavailable. - /// - public async Task SetGeolocationOverride(SetGeolocationOverrideCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Controls whether page will emit lifecycle events. - /// - public async Task SetLifecycleEventsEnabled(SetLifecycleEventsEnabledCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Toggles mouse event-based touch event emulation. - /// - public async Task SetTouchEmulationEnabled(SetTouchEmulationEnabledCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Starts sending each frame using the `screencastFrame` event. - /// - public async Task StartScreencast(StartScreencastCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Force the page stop all navigations and pending resource fetches. - /// - public async Task StopLoading(StopLoadingCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new StopLoadingCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Crashes renderer on the IO thread, generates minidumps. - /// - public async Task Crash(CrashCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new CrashCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Tries to close page, running its beforeunload hooks, if any. - /// - public async Task Close(CloseCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new CloseCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Tries to update the web lifecycle state of the page. - /// It will transition the page to the given state according to: - /// https://github.com/WICG/web-lifecycle/ - /// - public async Task SetWebLifecycleState(SetWebLifecycleStateCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Stops sending each frame in the `screencastFrame`. - /// - public async Task StopScreencast(StopScreencastCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new StopScreencastCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Forces compilation cache to be generated for every subresource script. - /// - public async Task SetProduceCompilationCache(SetProduceCompilationCacheCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Seeds compilation cache for given url. Compilation cache does not survive - /// cross-process navigation. - /// - public async Task AddCompilationCache(AddCompilationCacheCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Clears seeded compilation cache. - /// - public async Task ClearCompilationCache(ClearCompilationCacheCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new ClearCompilationCacheCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Generates a report for testing. - /// - public async Task GenerateTestReport(GenerateTestReportCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger. - /// - public async Task WaitForDebugger(WaitForDebuggerCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new WaitForDebuggerCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - private void OnDomContentEventFired(object rawEventArgs) - { - DomContentEventFiredEventArgs e = rawEventArgs as DomContentEventFiredEventArgs; - if (e != null && DomContentEventFired != null) - { - DomContentEventFired(this, e); - } - } - private void OnFrameAttached(object rawEventArgs) - { - FrameAttachedEventArgs e = rawEventArgs as FrameAttachedEventArgs; - if (e != null && FrameAttached != null) - { - FrameAttached(this, e); - } - } - private void OnFrameClearedScheduledNavigation(object rawEventArgs) - { - FrameClearedScheduledNavigationEventArgs e = rawEventArgs as FrameClearedScheduledNavigationEventArgs; - if (e != null && FrameClearedScheduledNavigation != null) - { - FrameClearedScheduledNavigation(this, e); - } - } - private void OnFrameDetached(object rawEventArgs) - { - FrameDetachedEventArgs e = rawEventArgs as FrameDetachedEventArgs; - if (e != null && FrameDetached != null) - { - FrameDetached(this, e); - } - } - private void OnFrameNavigated(object rawEventArgs) - { - FrameNavigatedEventArgs e = rawEventArgs as FrameNavigatedEventArgs; - if (e != null && FrameNavigated != null) - { - FrameNavigated(this, e); - } - } - private void OnFrameResized(object rawEventArgs) - { - FrameResizedEventArgs e = rawEventArgs as FrameResizedEventArgs; - if (e != null && FrameResized != null) - { - FrameResized(this, e); - } - } - private void OnFrameRequestedNavigation(object rawEventArgs) - { - FrameRequestedNavigationEventArgs e = rawEventArgs as FrameRequestedNavigationEventArgs; - if (e != null && FrameRequestedNavigation != null) - { - FrameRequestedNavigation(this, e); - } - } - private void OnFrameScheduledNavigation(object rawEventArgs) - { - FrameScheduledNavigationEventArgs e = rawEventArgs as FrameScheduledNavigationEventArgs; - if (e != null && FrameScheduledNavigation != null) - { - FrameScheduledNavigation(this, e); - } - } - private void OnFrameStartedLoading(object rawEventArgs) - { - FrameStartedLoadingEventArgs e = rawEventArgs as FrameStartedLoadingEventArgs; - if (e != null && FrameStartedLoading != null) - { - FrameStartedLoading(this, e); - } - } - private void OnFrameStoppedLoading(object rawEventArgs) - { - FrameStoppedLoadingEventArgs e = rawEventArgs as FrameStoppedLoadingEventArgs; - if (e != null && FrameStoppedLoading != null) - { - FrameStoppedLoading(this, e); - } - } - private void OnInterstitialHidden(object rawEventArgs) - { - InterstitialHiddenEventArgs e = rawEventArgs as InterstitialHiddenEventArgs; - if (e != null && InterstitialHidden != null) - { - InterstitialHidden(this, e); - } - } - private void OnInterstitialShown(object rawEventArgs) - { - InterstitialShownEventArgs e = rawEventArgs as InterstitialShownEventArgs; - if (e != null && InterstitialShown != null) - { - InterstitialShown(this, e); - } - } - private void OnJavascriptDialogClosed(object rawEventArgs) - { - JavascriptDialogClosedEventArgs e = rawEventArgs as JavascriptDialogClosedEventArgs; - if (e != null && JavascriptDialogClosed != null) - { - JavascriptDialogClosed(this, e); - } - } - private void OnJavascriptDialogOpening(object rawEventArgs) - { - JavascriptDialogOpeningEventArgs e = rawEventArgs as JavascriptDialogOpeningEventArgs; - if (e != null && JavascriptDialogOpening != null) - { - JavascriptDialogOpening(this, e); - } - } - private void OnLifecycleEvent(object rawEventArgs) - { - LifecycleEventEventArgs e = rawEventArgs as LifecycleEventEventArgs; - if (e != null && LifecycleEvent != null) - { - LifecycleEvent(this, e); - } - } - private void OnLoadEventFired(object rawEventArgs) - { - LoadEventFiredEventArgs e = rawEventArgs as LoadEventFiredEventArgs; - if (e != null && LoadEventFired != null) - { - LoadEventFired(this, e); - } - } - private void OnNavigatedWithinDocument(object rawEventArgs) - { - NavigatedWithinDocumentEventArgs e = rawEventArgs as NavigatedWithinDocumentEventArgs; - if (e != null && NavigatedWithinDocument != null) - { - NavigatedWithinDocument(this, e); - } - } - private void OnScreencastFrame(object rawEventArgs) - { - ScreencastFrameEventArgs e = rawEventArgs as ScreencastFrameEventArgs; - if (e != null && ScreencastFrame != null) - { - ScreencastFrame(this, e); - } - } - private void OnScreencastVisibilityChanged(object rawEventArgs) - { - ScreencastVisibilityChangedEventArgs e = rawEventArgs as ScreencastVisibilityChangedEventArgs; - if (e != null && ScreencastVisibilityChanged != null) - { - ScreencastVisibilityChanged(this, e); - } - } - private void OnWindowOpen(object rawEventArgs) - { - WindowOpenEventArgs e = rawEventArgs as WindowOpenEventArgs; - if (e != null && WindowOpen != null) - { - WindowOpen(this, e); - } - } - private void OnCompilationCacheProduced(object rawEventArgs) - { - CompilationCacheProducedEventArgs e = rawEventArgs as CompilationCacheProducedEventArgs; - if (e != null && CompilationCacheProduced != null) - { - CompilationCacheProduced(this, e); - } - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/PrintToPDFCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/PrintToPDFCommand.cs deleted file mode 100644 index 9f83d10240224..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/PrintToPDFCommand.cs +++ /dev/null @@ -1,178 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Print page as PDF. - /// - public sealed class PrintToPDFCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.printToPDF"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Paper orientation. Defaults to false. - /// - [JsonProperty("landscape", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Landscape - { - get; - set; - } - /// - /// Display header and footer. Defaults to false. - /// - [JsonProperty("displayHeaderFooter", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? DisplayHeaderFooter - { - get; - set; - } - /// - /// Print background graphics. Defaults to false. - /// - [JsonProperty("printBackground", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? PrintBackground - { - get; - set; - } - /// - /// Scale of the webpage rendering. Defaults to 1. - /// - [JsonProperty("scale", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Scale - { - get; - set; - } - /// - /// Paper width in inches. Defaults to 8.5 inches. - /// - [JsonProperty("paperWidth", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? PaperWidth - { - get; - set; - } - /// - /// Paper height in inches. Defaults to 11 inches. - /// - [JsonProperty("paperHeight", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? PaperHeight - { - get; - set; - } - /// - /// Top margin in inches. Defaults to 1cm (~0.4 inches). - /// - [JsonProperty("marginTop", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? MarginTop - { - get; - set; - } - /// - /// Bottom margin in inches. Defaults to 1cm (~0.4 inches). - /// - [JsonProperty("marginBottom", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? MarginBottom - { - get; - set; - } - /// - /// Left margin in inches. Defaults to 1cm (~0.4 inches). - /// - [JsonProperty("marginLeft", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? MarginLeft - { - get; - set; - } - /// - /// Right margin in inches. Defaults to 1cm (~0.4 inches). - /// - [JsonProperty("marginRight", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? MarginRight - { - get; - set; - } - /// - /// Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means - /// print all pages. - /// - [JsonProperty("pageRanges", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string PageRanges - { - get; - set; - } - /// - /// Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. - /// Defaults to false. - /// - [JsonProperty("ignoreInvalidPageRanges", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IgnoreInvalidPageRanges - { - get; - set; - } - /// - /// HTML template for the print header. Should be valid HTML markup with following - /// classes used to inject printing values into them: - /// - `date`: formatted print date - /// - `title`: document title - /// - `url`: document location - /// - `pageNumber`: current page number - /// - `totalPages`: total pages in the document - /// - /// For example, `` would generate span containing the title. - /// - [JsonProperty("headerTemplate", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string HeaderTemplate - { - get; - set; - } - /// - /// HTML template for the print footer. Should use the same format as the `headerTemplate`. - /// - [JsonProperty("footerTemplate", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string FooterTemplate - { - get; - set; - } - /// - /// Whether or not to prefer page size as defined by css. Defaults to false, - /// in which case the content will be scaled to fit the paper size. - /// - [JsonProperty("preferCSSPageSize", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? PreferCSSPageSize - { - get; - set; - } - } - - public sealed class PrintToPDFCommandResponse : ICommandResponse - { - /// - /// Base64-encoded pdf data. - /// - [JsonProperty("data")] - public byte[] Data - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ReloadCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ReloadCommand.cs deleted file mode 100644 index 0ce9610e14691..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ReloadCommand.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Reloads given page optionally ignoring the cache. - /// - public sealed class ReloadCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.reload"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// If true, browser cache is ignored (as if the user pressed Shift+refresh). - /// - [JsonProperty("ignoreCache", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IgnoreCache - { - get; - set; - } - /// - /// If set, the script will be injected into all frames of the inspected page after reload. - /// Argument will be ignored if reloading dataURL origin. - /// - [JsonProperty("scriptToEvaluateOnLoad", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ScriptToEvaluateOnLoad - { - get; - set; - } - } - - public sealed class ReloadCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/RemoveScriptToEvaluateOnLoadCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/RemoveScriptToEvaluateOnLoadCommand.cs deleted file mode 100644 index 8eff59a829f36..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/RemoveScriptToEvaluateOnLoadCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Deprecated, please use removeScriptToEvaluateOnNewDocument instead. - /// - public sealed class RemoveScriptToEvaluateOnLoadCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.removeScriptToEvaluateOnLoad"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the identifier - /// - [JsonProperty("identifier")] - public string Identifier - { - get; - set; - } - } - - public sealed class RemoveScriptToEvaluateOnLoadCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/RemoveScriptToEvaluateOnNewDocumentCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/RemoveScriptToEvaluateOnNewDocumentCommand.cs deleted file mode 100644 index 5499e7dba0ef2..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/RemoveScriptToEvaluateOnNewDocumentCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Removes given script from the list. - /// - public sealed class RemoveScriptToEvaluateOnNewDocumentCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.removeScriptToEvaluateOnNewDocument"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the identifier - /// - [JsonProperty("identifier")] - public string Identifier - { - get; - set; - } - } - - public sealed class RemoveScriptToEvaluateOnNewDocumentCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ResetNavigationHistoryCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ResetNavigationHistoryCommand.cs deleted file mode 100644 index df6ad09e00082..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ResetNavigationHistoryCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Resets navigation history for the current page. - /// - public sealed class ResetNavigationHistoryCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.resetNavigationHistory"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class ResetNavigationHistoryCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ScreencastFrameAckCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ScreencastFrameAckCommand.cs deleted file mode 100644 index 84a8a08c2338d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ScreencastFrameAckCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Acknowledges that a screencast frame has been received by the frontend. - /// - public sealed class ScreencastFrameAckCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.screencastFrameAck"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Frame number. - /// - [JsonProperty("sessionId")] - public long SessionId - { - get; - set; - } - } - - public sealed class ScreencastFrameAckCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ScreencastFrameEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ScreencastFrameEventArgs.cs deleted file mode 100644 index b4fe1e44c1ae3..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ScreencastFrameEventArgs.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Compressed image data requested by the `startScreencast`. - /// - public sealed class ScreencastFrameEventArgs : EventArgs - { - /// - /// Base64-encoded compressed image. - /// - [JsonProperty("data")] - public byte[] Data - { - get; - set; - } - /// - /// Screencast frame metadata. - /// - [JsonProperty("metadata")] - public ScreencastFrameMetadata Metadata - { - get; - set; - } - /// - /// Frame number. - /// - [JsonProperty("sessionId")] - public long SessionId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ScreencastFrameMetadata.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ScreencastFrameMetadata.cs deleted file mode 100644 index 3ddaae8dce8d6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ScreencastFrameMetadata.cs +++ /dev/null @@ -1,74 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Screencast frame metadata. - /// - public sealed class ScreencastFrameMetadata - { - /// - /// Top offset in DIP. - /// - [JsonProperty("offsetTop")] - public double OffsetTop - { - get; - set; - } - /// - /// Page scale factor. - /// - [JsonProperty("pageScaleFactor")] - public double PageScaleFactor - { - get; - set; - } - /// - /// Device screen width in DIP. - /// - [JsonProperty("deviceWidth")] - public double DeviceWidth - { - get; - set; - } - /// - /// Device screen height in DIP. - /// - [JsonProperty("deviceHeight")] - public double DeviceHeight - { - get; - set; - } - /// - /// Position of horizontal scroll in CSS pixels. - /// - [JsonProperty("scrollOffsetX")] - public double ScrollOffsetX - { - get; - set; - } - /// - /// Position of vertical scroll in CSS pixels. - /// - [JsonProperty("scrollOffsetY")] - public double ScrollOffsetY - { - get; - set; - } - /// - /// Frame swap timestamp. - /// - [JsonProperty("timestamp", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Timestamp - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ScreencastVisibilityChangedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ScreencastVisibilityChangedEventArgs.cs deleted file mode 100644 index 2f634d2a4a38d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/ScreencastVisibilityChangedEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when the page with currently enabled screencast was shown or hidden `. - /// - public sealed class ScreencastVisibilityChangedEventArgs : EventArgs - { - /// - /// True if the page is visible. - /// - [JsonProperty("visible")] - public bool Visible - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SearchInResourceCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SearchInResourceCommand.cs deleted file mode 100644 index 79bed4bc962b6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SearchInResourceCommand.cs +++ /dev/null @@ -1,77 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Searches for given string in resource content. - /// - public sealed class SearchInResourceCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.searchInResource"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Frame id for resource to search in. - /// - [JsonProperty("frameId")] - public string FrameId - { - get; - set; - } - /// - /// URL of the resource to search in. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// String to search for. - /// - [JsonProperty("query")] - public string Query - { - get; - set; - } - /// - /// If true, search is case sensitive. - /// - [JsonProperty("caseSensitive", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? CaseSensitive - { - get; - set; - } - /// - /// If true, treats string parameter as regex. - /// - [JsonProperty("isRegex", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IsRegex - { - get; - set; - } - } - - public sealed class SearchInResourceCommandResponse : ICommandResponse - { - /// - /// List of search matches. - /// - [JsonProperty("result")] - public Debugger.SearchMatch[] Result - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetAdBlockingEnabledCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetAdBlockingEnabledCommand.cs deleted file mode 100644 index 3e05affe6c0fc..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetAdBlockingEnabledCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Enable Chrome's experimental ad filter on all sites. - /// - public sealed class SetAdBlockingEnabledCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.setAdBlockingEnabled"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Whether to block ads. - /// - [JsonProperty("enabled")] - public bool Enabled - { - get; - set; - } - } - - public sealed class SetAdBlockingEnabledCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetBypassCSPCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetBypassCSPCommand.cs deleted file mode 100644 index a9bbc3eb54253..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetBypassCSPCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Enable page Content Security Policy by-passing. - /// - public sealed class SetBypassCSPCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.setBypassCSP"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Whether to bypass page CSP. - /// - [JsonProperty("enabled")] - public bool Enabled - { - get; - set; - } - } - - public sealed class SetBypassCSPCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetDeviceMetricsOverrideCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetDeviceMetricsOverrideCommand.cs deleted file mode 100644 index 45d7e9df309e0..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetDeviceMetricsOverrideCommand.cs +++ /dev/null @@ -1,134 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Overrides the values of device screen dimensions (window.screen.width, window.screen.height, - /// window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media - /// query results). - /// - public sealed class SetDeviceMetricsOverrideCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.setDeviceMetricsOverride"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. - /// - [JsonProperty("width")] - public long Width - { - get; - set; - } - /// - /// Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. - /// - [JsonProperty("height")] - public long Height - { - get; - set; - } - /// - /// Overriding device scale factor value. 0 disables the override. - /// - [JsonProperty("deviceScaleFactor")] - public double DeviceScaleFactor - { - get; - set; - } - /// - /// Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text - /// autosizing and more. - /// - [JsonProperty("mobile")] - public bool Mobile - { - get; - set; - } - /// - /// Scale to apply to resulting view image. - /// - [JsonProperty("scale", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Scale - { - get; - set; - } - /// - /// Overriding screen width value in pixels (minimum 0, maximum 10000000). - /// - [JsonProperty("screenWidth", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ScreenWidth - { - get; - set; - } - /// - /// Overriding screen height value in pixels (minimum 0, maximum 10000000). - /// - [JsonProperty("screenHeight", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ScreenHeight - { - get; - set; - } - /// - /// Overriding view X position on screen in pixels (minimum 0, maximum 10000000). - /// - [JsonProperty("positionX", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? PositionX - { - get; - set; - } - /// - /// Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). - /// - [JsonProperty("positionY", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? PositionY - { - get; - set; - } - /// - /// Do not set visible view size, rely upon explicit setVisibleSize call. - /// - [JsonProperty("dontSetVisibleSize", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? DontSetVisibleSize - { - get; - set; - } - /// - /// Screen orientation override. - /// - [JsonProperty("screenOrientation", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Emulation.ScreenOrientation ScreenOrientation - { - get; - set; - } - /// - /// The viewport dimensions and scale. If not set, the override is cleared. - /// - [JsonProperty("viewport", DefaultValueHandling = DefaultValueHandling.Ignore)] - public Viewport Viewport - { - get; - set; - } - } - - public sealed class SetDeviceMetricsOverrideCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetDeviceOrientationOverrideCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetDeviceOrientationOverrideCommand.cs deleted file mode 100644 index 87f8195d11e6d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetDeviceOrientationOverrideCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Overrides the Device Orientation. - /// - public sealed class SetDeviceOrientationOverrideCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.setDeviceOrientationOverride"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Mock alpha - /// - [JsonProperty("alpha")] - public double Alpha - { - get; - set; - } - /// - /// Mock beta - /// - [JsonProperty("beta")] - public double Beta - { - get; - set; - } - /// - /// Mock gamma - /// - [JsonProperty("gamma")] - public double Gamma - { - get; - set; - } - } - - public sealed class SetDeviceOrientationOverrideCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetDocumentContentCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetDocumentContentCommand.cs deleted file mode 100644 index d2e1d87b023ff..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetDocumentContentCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Sets given markup as the document's HTML. - /// - public sealed class SetDocumentContentCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.setDocumentContent"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Frame id to set HTML for. - /// - [JsonProperty("frameId")] - public string FrameId - { - get; - set; - } - /// - /// HTML content to set. - /// - [JsonProperty("html")] - public string Html - { - get; - set; - } - } - - public sealed class SetDocumentContentCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetDownloadBehaviorCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetDownloadBehaviorCommand.cs deleted file mode 100644 index 237ca5ce4b770..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetDownloadBehaviorCommand.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Set the behavior when downloading a file. - /// - public sealed class SetDownloadBehaviorCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.setDownloadBehavior"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Whether to allow all or deny all download requests, or use default Chrome behavior if - /// available (otherwise deny). - /// - [JsonProperty("behavior")] - public string Behavior - { - get; - set; - } - /// - /// The default path to save downloaded files to. This is requred if behavior is set to 'allow' - /// - [JsonProperty("downloadPath", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string DownloadPath - { - get; - set; - } - } - - public sealed class SetDownloadBehaviorCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetFontFamiliesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetFontFamiliesCommand.cs deleted file mode 100644 index e4b0528641b69..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetFontFamiliesCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Set generic font families. - /// - public sealed class SetFontFamiliesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.setFontFamilies"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Specifies font families to set. If a font family is not specified, it won't be changed. - /// - [JsonProperty("fontFamilies")] - public FontFamilies FontFamilies - { - get; - set; - } - } - - public sealed class SetFontFamiliesCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetFontSizesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetFontSizesCommand.cs deleted file mode 100644 index 66a7a8bd518ea..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetFontSizesCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Set default font sizes. - /// - public sealed class SetFontSizesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.setFontSizes"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Specifies font sizes to set. If a font size is not specified, it won't be changed. - /// - [JsonProperty("fontSizes")] - public FontSizes FontSizes - { - get; - set; - } - } - - public sealed class SetFontSizesCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetGeolocationOverrideCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetGeolocationOverrideCommand.cs deleted file mode 100644 index 73ebc2b3fa46d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetGeolocationOverrideCommand.cs +++ /dev/null @@ -1,51 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position - /// unavailable. - /// - public sealed class SetGeolocationOverrideCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.setGeolocationOverride"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Mock latitude - /// - [JsonProperty("latitude", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Latitude - { - get; - set; - } - /// - /// Mock longitude - /// - [JsonProperty("longitude", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Longitude - { - get; - set; - } - /// - /// Mock accuracy - /// - [JsonProperty("accuracy", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Accuracy - { - get; - set; - } - } - - public sealed class SetGeolocationOverrideCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetLifecycleEventsEnabledCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetLifecycleEventsEnabledCommand.cs deleted file mode 100644 index 886f563543b2f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetLifecycleEventsEnabledCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Controls whether page will emit lifecycle events. - /// - public sealed class SetLifecycleEventsEnabledCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.setLifecycleEventsEnabled"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// If true, starts emitting lifecycle events. - /// - [JsonProperty("enabled")] - public bool Enabled - { - get; - set; - } - } - - public sealed class SetLifecycleEventsEnabledCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetProduceCompilationCacheCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetProduceCompilationCacheCommand.cs deleted file mode 100644 index f4ddde668dbb8..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetProduceCompilationCacheCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Forces compilation cache to be generated for every subresource script. - /// - public sealed class SetProduceCompilationCacheCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.setProduceCompilationCache"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the enabled - /// - [JsonProperty("enabled")] - public bool Enabled - { - get; - set; - } - } - - public sealed class SetProduceCompilationCacheCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetTouchEmulationEnabledCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetTouchEmulationEnabledCommand.cs deleted file mode 100644 index dac3c31e4ffac..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetTouchEmulationEnabledCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Toggles mouse event-based touch event emulation. - /// - public sealed class SetTouchEmulationEnabledCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.setTouchEmulationEnabled"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Whether the touch event emulation should be enabled. - /// - [JsonProperty("enabled")] - public bool Enabled - { - get; - set; - } - /// - /// Touch/gesture events configuration. Default: current platform. - /// - [JsonProperty("configuration", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Configuration - { - get; - set; - } - } - - public sealed class SetTouchEmulationEnabledCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetWebLifecycleStateCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetWebLifecycleStateCommand.cs deleted file mode 100644 index f284f70f7af6c..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/SetWebLifecycleStateCommand.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Tries to update the web lifecycle state of the page. - /// It will transition the page to the given state according to: - /// https://github.com/WICG/web-lifecycle/ - /// - public sealed class SetWebLifecycleStateCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.setWebLifecycleState"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Target lifecycle state - /// - [JsonProperty("state")] - public string State - { - get; - set; - } - } - - public sealed class SetWebLifecycleStateCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/StartScreencastCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/StartScreencastCommand.cs deleted file mode 100644 index 74fa1153d668d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/StartScreencastCommand.cs +++ /dev/null @@ -1,68 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Starts sending each frame using the `screencastFrame` event. - /// - public sealed class StartScreencastCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.startScreencast"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Image compression format. - /// - [JsonProperty("format", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Format - { - get; - set; - } - /// - /// Compression quality from range [0..100]. - /// - [JsonProperty("quality", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Quality - { - get; - set; - } - /// - /// Maximum screenshot width. - /// - [JsonProperty("maxWidth", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? MaxWidth - { - get; - set; - } - /// - /// Maximum screenshot height. - /// - [JsonProperty("maxHeight", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? MaxHeight - { - get; - set; - } - /// - /// Send every n-th frame. - /// - [JsonProperty("everyNthFrame", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? EveryNthFrame - { - get; - set; - } - } - - public sealed class StartScreencastCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/StopLoadingCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/StopLoadingCommand.cs deleted file mode 100644 index f463e5a07a33f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/StopLoadingCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Force the page stop all navigations and pending resource fetches. - /// - public sealed class StopLoadingCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.stopLoading"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class StopLoadingCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/StopScreencastCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/StopScreencastCommand.cs deleted file mode 100644 index 10db7a425b826..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/StopScreencastCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Stops sending each frame in the `screencastFrame`. - /// - public sealed class StopScreencastCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.stopScreencast"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class StopScreencastCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/TransitionType.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/TransitionType.cs deleted file mode 100644 index d64b22a509e23..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/TransitionType.cs +++ /dev/null @@ -1,40 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// Transition type. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TransitionType - { - [EnumMember(Value = "link")] - Link, - [EnumMember(Value = "typed")] - Typed, - [EnumMember(Value = "address_bar")] - AddressBar, - [EnumMember(Value = "auto_bookmark")] - AutoBookmark, - [EnumMember(Value = "auto_subframe")] - AutoSubframe, - [EnumMember(Value = "manual_subframe")] - ManualSubframe, - [EnumMember(Value = "generated")] - Generated, - [EnumMember(Value = "auto_toplevel")] - AutoToplevel, - [EnumMember(Value = "form_submit")] - FormSubmit, - [EnumMember(Value = "reload")] - Reload, - [EnumMember(Value = "keyword")] - Keyword, - [EnumMember(Value = "keyword_generated")] - KeywordGenerated, - [EnumMember(Value = "other")] - Other, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/Viewport.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/Viewport.cs deleted file mode 100644 index becbade5a8acb..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/Viewport.cs +++ /dev/null @@ -1,56 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Viewport for capturing screenshot. - /// - public sealed class Viewport - { - /// - /// X offset in device independent pixels (dip). - /// - [JsonProperty("x")] - public double X - { - get; - set; - } - /// - /// Y offset in device independent pixels (dip). - /// - [JsonProperty("y")] - public double Y - { - get; - set; - } - /// - /// Rectangle width in device independent pixels (dip). - /// - [JsonProperty("width")] - public double Width - { - get; - set; - } - /// - /// Rectangle height in device independent pixels (dip). - /// - [JsonProperty("height")] - public double Height - { - get; - set; - } - /// - /// Page scale factor. - /// - [JsonProperty("scale")] - public double Scale - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/VisualViewport.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/VisualViewport.cs deleted file mode 100644 index b8516bf9ecb72..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/VisualViewport.cs +++ /dev/null @@ -1,83 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Visual viewport position, dimensions, and scale. - /// - public sealed class VisualViewport - { - /// - /// Horizontal offset relative to the layout viewport (CSS pixels). - /// - [JsonProperty("offsetX")] - public double OffsetX - { - get; - set; - } - /// - /// Vertical offset relative to the layout viewport (CSS pixels). - /// - [JsonProperty("offsetY")] - public double OffsetY - { - get; - set; - } - /// - /// Horizontal offset relative to the document (CSS pixels). - /// - [JsonProperty("pageX")] - public double PageX - { - get; - set; - } - /// - /// Vertical offset relative to the document (CSS pixels). - /// - [JsonProperty("pageY")] - public double PageY - { - get; - set; - } - /// - /// Width (CSS pixels), excludes scrollbar if present. - /// - [JsonProperty("clientWidth")] - public double ClientWidth - { - get; - set; - } - /// - /// Height (CSS pixels), excludes scrollbar if present. - /// - [JsonProperty("clientHeight")] - public double ClientHeight - { - get; - set; - } - /// - /// Scale relative to the ideal viewport (size at width=device-width). - /// - [JsonProperty("scale")] - public double Scale - { - get; - set; - } - /// - /// Page zoom factor (CSS to device independent pixels ratio). - /// - [JsonProperty("zoom", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Zoom - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/WaitForDebuggerCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/WaitForDebuggerCommand.cs deleted file mode 100644 index d3b462047a3e6..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/WaitForDebuggerCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using Newtonsoft.Json; - - /// - /// Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger. - /// - public sealed class WaitForDebuggerCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Page.waitForDebugger"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class WaitForDebuggerCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/WindowOpenEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Page/WindowOpenEventArgs.cs deleted file mode 100644 index fdad6c75bf5cf..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Page/WindowOpenEventArgs.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Page -{ - using System; - using Newtonsoft.Json; - - /// - /// Fired when a new window is going to be opened, via window.open(), link click, form submission, - /// etc. - /// - public sealed class WindowOpenEventArgs : EventArgs - { - /// - /// The URL for the new window. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Window name. - /// - [JsonProperty("windowName")] - public string WindowName - { - get; - set; - } - /// - /// An array of enabled window features. - /// - [JsonProperty("windowFeatures")] - public string[] WindowFeatures - { - get; - set; - } - /// - /// Whether or not it was triggered by user gesture. - /// - [JsonProperty("userGesture")] - public bool UserGesture - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/DisableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/DisableCommand.cs deleted file mode 100644 index cb7e12b2701f0..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/DisableCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Performance -{ - using Newtonsoft.Json; - - /// - /// Disable collecting and reporting metrics. - /// - public sealed class DisableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Performance.disable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class DisableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/EnableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/EnableCommand.cs deleted file mode 100644 index b1278fb126532..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/EnableCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Performance -{ - using Newtonsoft.Json; - - /// - /// Enable collecting and reporting metrics. - /// - public sealed class EnableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Performance.enable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class EnableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/GetMetricsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/GetMetricsCommand.cs deleted file mode 100644 index 7e8cf0610f068..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/GetMetricsCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Performance -{ - using Newtonsoft.Json; - - /// - /// Retrieve current values of run-time metrics. - /// - public sealed class GetMetricsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Performance.getMetrics"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetMetricsCommandResponse : ICommandResponse - { - /// - /// Current values for run-time metrics. - /// - [JsonProperty("metrics")] - public Metric[] Metrics - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/Metric.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/Metric.cs deleted file mode 100644 index 8c3d8963b04f3..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/Metric.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Performance -{ - using Newtonsoft.Json; - - /// - /// Run-time execution metric. - /// - public sealed class Metric - { - /// - /// Metric name. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// Metric value. - /// - [JsonProperty("value")] - public double Value - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/MetricsEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/MetricsEventArgs.cs deleted file mode 100644 index ba5efb1b663cc..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/MetricsEventArgs.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Performance -{ - using System; - using Newtonsoft.Json; - - /// - /// Current values of the metrics. - /// - public sealed class MetricsEventArgs : EventArgs - { - /// - /// Current values of the metrics. - /// - [JsonProperty("metrics")] - public Metric[] Metrics - { - get; - set; - } - /// - /// Timestamp title. - /// - [JsonProperty("title")] - public string Title - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/PerformanceAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/PerformanceAdapter.cs deleted file mode 100644 index 577b289a4e7b9..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/PerformanceAdapter.cs +++ /dev/null @@ -1,90 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Performance -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the Performance domain to simplify the command interface. - /// - public class PerformanceAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "Performance"; - private Dictionary m_eventMap = new Dictionary(); - - public PerformanceAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - m_eventMap["metrics"] = new DevToolsEventData(typeof(MetricsEventArgs), OnMetrics); - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - /// - /// Current values of the metrics. - /// - public event EventHandler Metrics; - - /// - /// Disable collecting and reporting metrics. - /// - public async Task Disable(DisableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new DisableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enable collecting and reporting metrics. - /// - public async Task Enable(EnableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new EnableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sets time domain to use for collecting and reporting duration metrics. - /// Note that this must be called before enabling metrics collection. Calling - /// this method while metrics collection is enabled returns an error. - /// - public async Task SetTimeDomain(SetTimeDomainCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Retrieve current values of run-time metrics. - /// - public async Task GetMetrics(GetMetricsCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetMetricsCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - private void OnMetrics(object rawEventArgs) - { - MetricsEventArgs e = rawEventArgs as MetricsEventArgs; - if (e != null && Metrics != null) - { - Metrics(this, e); - } - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/SetTimeDomainCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/SetTimeDomainCommand.cs deleted file mode 100644 index 647e1626907f9..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Performance/SetTimeDomainCommand.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Performance -{ - using Newtonsoft.Json; - - /// - /// Sets time domain to use for collecting and reporting duration metrics. - /// Note that this must be called before enabling metrics collection. Calling - /// this method while metrics collection is enabled returns an error. - /// - public sealed class SetTimeDomainCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Performance.setTimeDomain"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Time domain - /// - [JsonProperty("timeDomain")] - public string TimeDomain - { - get; - set; - } - } - - public sealed class SetTimeDomainCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ConsoleProfileFinishedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ConsoleProfileFinishedEventArgs.cs deleted file mode 100644 index 11038d126f247..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ConsoleProfileFinishedEventArgs.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using System; - using Newtonsoft.Json; - - /// - /// ConsoleProfileFinished - /// - public sealed class ConsoleProfileFinishedEventArgs : EventArgs - { - /// - /// Gets or sets the id - /// - [JsonProperty("id")] - public string Id - { - get; - set; - } - /// - /// Location of console.profileEnd(). - /// - [JsonProperty("location")] - public Debugger.Location Location - { - get; - set; - } - /// - /// Gets or sets the profile - /// - [JsonProperty("profile")] - public Profile Profile - { - get; - set; - } - /// - /// Profile title passed as an argument to console.profile(). - /// - [JsonProperty("title", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Title - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ConsoleProfileStartedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ConsoleProfileStartedEventArgs.cs deleted file mode 100644 index 317a96f303fb9..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ConsoleProfileStartedEventArgs.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using System; - using Newtonsoft.Json; - - /// - /// Sent when new profile recording is started using console.profile() call. - /// - public sealed class ConsoleProfileStartedEventArgs : EventArgs - { - /// - /// Gets or sets the id - /// - [JsonProperty("id")] - public string Id - { - get; - set; - } - /// - /// Location of console.profile(). - /// - [JsonProperty("location")] - public Debugger.Location Location - { - get; - set; - } - /// - /// Profile title passed as an argument to console.profile(). - /// - [JsonProperty("title", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Title - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/CoverageRange.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/CoverageRange.cs deleted file mode 100644 index f9692677e5db3..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/CoverageRange.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Coverage data for a source range. - /// - public sealed class CoverageRange - { - /// - /// JavaScript script source offset for the range start. - /// - [JsonProperty("startOffset")] - public long StartOffset - { - get; - set; - } - /// - /// JavaScript script source offset for the range end. - /// - [JsonProperty("endOffset")] - public long EndOffset - { - get; - set; - } - /// - /// Collected execution count of the source range. - /// - [JsonProperty("count")] - public long Count - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/DisableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/DisableCommand.cs deleted file mode 100644 index b83727ee29337..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/DisableCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Disable - /// - public sealed class DisableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Profiler.disable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class DisableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/EnableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/EnableCommand.cs deleted file mode 100644 index 6ed16fbd16a24..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/EnableCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Enable - /// - public sealed class EnableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Profiler.enable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class EnableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/FunctionCoverage.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/FunctionCoverage.cs deleted file mode 100644 index d76cad3d4cfe1..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/FunctionCoverage.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Coverage data for a JavaScript function. - /// - public sealed class FunctionCoverage - { - /// - /// JavaScript function name. - /// - [JsonProperty("functionName")] - public string FunctionName - { - get; - set; - } - /// - /// Source ranges inside the function with coverage data. - /// - [JsonProperty("ranges")] - public CoverageRange[] Ranges - { - get; - set; - } - /// - /// Whether coverage data for this function has block granularity. - /// - [JsonProperty("isBlockCoverage")] - public bool IsBlockCoverage - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/GetBestEffortCoverageCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/GetBestEffortCoverageCommand.cs deleted file mode 100644 index e8651d964a733..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/GetBestEffortCoverageCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Collect coverage data for the current isolate. The coverage data may be incomplete due to - /// garbage collection. - /// - public sealed class GetBestEffortCoverageCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Profiler.getBestEffortCoverage"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetBestEffortCoverageCommandResponse : ICommandResponse - { - /// - /// Coverage data for the current isolate. - /// - [JsonProperty("result")] - public ScriptCoverage[] Result - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/PositionTickInfo.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/PositionTickInfo.cs deleted file mode 100644 index 86b593e1a6a16..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/PositionTickInfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Specifies a number of samples attributed to a certain source position. - /// - public sealed class PositionTickInfo - { - /// - /// Source line number (1-based). - /// - [JsonProperty("line")] - public long Line - { - get; - set; - } - /// - /// Number of samples attributed to the source line. - /// - [JsonProperty("ticks")] - public long Ticks - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/Profile.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/Profile.cs deleted file mode 100644 index 74e1002cae171..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/Profile.cs +++ /dev/null @@ -1,57 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Profile. - /// - public sealed class Profile - { - /// - /// The list of profile nodes. First item is the root node. - /// - [JsonProperty("nodes")] - public ProfileNode[] Nodes - { - get; - set; - } - /// - /// Profiling start timestamp in microseconds. - /// - [JsonProperty("startTime")] - public double StartTime - { - get; - set; - } - /// - /// Profiling end timestamp in microseconds. - /// - [JsonProperty("endTime")] - public double EndTime - { - get; - set; - } - /// - /// Ids of samples top nodes. - /// - [JsonProperty("samples", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long[] Samples - { - get; - set; - } - /// - /// Time intervals between adjacent samples in microseconds. The first delta is relative to the - /// profile startTime. - /// - [JsonProperty("timeDeltas", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long[] TimeDeltas - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ProfileNode.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ProfileNode.cs deleted file mode 100644 index 26fea0c1b5836..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ProfileNode.cs +++ /dev/null @@ -1,66 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Profile node. Holds callsite information, execution statistics and child nodes. - /// - public sealed class ProfileNode - { - /// - /// Unique id of the node. - /// - [JsonProperty("id")] - public long Id - { - get; - set; - } - /// - /// Function location. - /// - [JsonProperty("callFrame")] - public Runtime.CallFrame CallFrame - { - get; - set; - } - /// - /// Number of samples where this node was on top of the call stack. - /// - [JsonProperty("hitCount", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? HitCount - { - get; - set; - } - /// - /// Child node ids. - /// - [JsonProperty("children", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long[] Children - { - get; - set; - } - /// - /// The reason of being not optimized. The function may be deoptimized or marked as don't - /// optimize. - /// - [JsonProperty("deoptReason", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string DeoptReason - { - get; - set; - } - /// - /// An array of source position ticks. - /// - [JsonProperty("positionTicks", DefaultValueHandling = DefaultValueHandling.Ignore)] - public PositionTickInfo[] PositionTicks - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ProfilerAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ProfilerAdapter.cs deleted file mode 100644 index a129b29870fa7..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ProfilerAdapter.cs +++ /dev/null @@ -1,162 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the Profiler domain to simplify the command interface. - /// - public class ProfilerAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "Profiler"; - private Dictionary m_eventMap = new Dictionary(); - - public ProfilerAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - m_eventMap["consoleProfileFinished"] = new DevToolsEventData(typeof(ConsoleProfileFinishedEventArgs), OnConsoleProfileFinished); - m_eventMap["consoleProfileStarted"] = new DevToolsEventData(typeof(ConsoleProfileStartedEventArgs), OnConsoleProfileStarted); - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - /// - /// consoleProfileFinished - /// - public event EventHandler ConsoleProfileFinished; - /// - /// Sent when new profile recording is started using console.profile() call. - /// - public event EventHandler ConsoleProfileStarted; - - /// - /// disable - /// - public async Task Disable(DisableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new DisableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// enable - /// - public async Task Enable(EnableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new EnableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Collect coverage data for the current isolate. The coverage data may be incomplete due to - /// garbage collection. - /// - public async Task GetBestEffortCoverage(GetBestEffortCoverageCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetBestEffortCoverageCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. - /// - public async Task SetSamplingInterval(SetSamplingIntervalCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// start - /// - public async Task Start(StartCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new StartCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code - /// coverage may be incomplete. Enabling prevents running optimized code and resets execution - /// counters. - /// - public async Task StartPreciseCoverage(StartPreciseCoverageCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enable type profile. - /// - public async Task StartTypeProfile(StartTypeProfileCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new StartTypeProfileCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// stop - /// - public async Task Stop(StopCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new StopCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Disable precise code coverage. Disabling releases unnecessary execution count records and allows - /// executing optimized code. - /// - public async Task StopPreciseCoverage(StopPreciseCoverageCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new StopPreciseCoverageCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Disable type profile. Disabling releases type profile data collected so far. - /// - public async Task StopTypeProfile(StopTypeProfileCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new StopTypeProfileCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Collect coverage data for the current isolate, and resets execution counters. Precise code - /// coverage needs to have started. - /// - public async Task TakePreciseCoverage(TakePreciseCoverageCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new TakePreciseCoverageCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Collect type profile. - /// - public async Task TakeTypeProfile(TakeTypeProfileCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new TakeTypeProfileCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - private void OnConsoleProfileFinished(object rawEventArgs) - { - ConsoleProfileFinishedEventArgs e = rawEventArgs as ConsoleProfileFinishedEventArgs; - if (e != null && ConsoleProfileFinished != null) - { - ConsoleProfileFinished(this, e); - } - } - private void OnConsoleProfileStarted(object rawEventArgs) - { - ConsoleProfileStartedEventArgs e = rawEventArgs as ConsoleProfileStartedEventArgs; - if (e != null && ConsoleProfileStarted != null) - { - ConsoleProfileStarted(this, e); - } - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ScriptCoverage.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ScriptCoverage.cs deleted file mode 100644 index 1c0e88476fd69..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ScriptCoverage.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Coverage data for a JavaScript script. - /// - public sealed class ScriptCoverage - { - /// - /// JavaScript script id. - /// - [JsonProperty("scriptId")] - public string ScriptId - { - get; - set; - } - /// - /// JavaScript script name or url. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Functions contained in the script that has coverage data. - /// - [JsonProperty("functions")] - public FunctionCoverage[] Functions - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ScriptTypeProfile.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ScriptTypeProfile.cs deleted file mode 100644 index ff31e92b712e1..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/ScriptTypeProfile.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Type profile data collected during runtime for a JavaScript script. - /// - public sealed class ScriptTypeProfile - { - /// - /// JavaScript script id. - /// - [JsonProperty("scriptId")] - public string ScriptId - { - get; - set; - } - /// - /// JavaScript script name or url. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Type profile entries for parameters and return values of the functions in the script. - /// - [JsonProperty("entries")] - public TypeProfileEntry[] Entries - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/SetSamplingIntervalCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/SetSamplingIntervalCommand.cs deleted file mode 100644 index 0fb9e5128762e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/SetSamplingIntervalCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. - /// - public sealed class SetSamplingIntervalCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Profiler.setSamplingInterval"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// New sampling interval in microseconds. - /// - [JsonProperty("interval")] - public long Interval - { - get; - set; - } - } - - public sealed class SetSamplingIntervalCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StartCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StartCommand.cs deleted file mode 100644 index 5476af577f3c5..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StartCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Start - /// - public sealed class StartCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Profiler.start"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class StartCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StartPreciseCoverageCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StartPreciseCoverageCommand.cs deleted file mode 100644 index e43f15610a3cc..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StartPreciseCoverageCommand.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code - /// coverage may be incomplete. Enabling prevents running optimized code and resets execution - /// counters. - /// - public sealed class StartPreciseCoverageCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Profiler.startPreciseCoverage"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Collect accurate call counts beyond simple 'covered' or 'not covered'. - /// - [JsonProperty("callCount", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? CallCount - { - get; - set; - } - /// - /// Collect block-based coverage. - /// - [JsonProperty("detailed", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Detailed - { - get; - set; - } - } - - public sealed class StartPreciseCoverageCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StartTypeProfileCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StartTypeProfileCommand.cs deleted file mode 100644 index 5861142e2e439..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StartTypeProfileCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Enable type profile. - /// - public sealed class StartTypeProfileCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Profiler.startTypeProfile"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class StartTypeProfileCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StopCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StopCommand.cs deleted file mode 100644 index c2913a040baa8..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StopCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Stop - /// - public sealed class StopCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Profiler.stop"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class StopCommandResponse : ICommandResponse - { - /// - /// Recorded profile. - /// - [JsonProperty("profile")] - public Profile Profile - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StopPreciseCoverageCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StopPreciseCoverageCommand.cs deleted file mode 100644 index 2a16b672eb296..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StopPreciseCoverageCommand.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Disable precise code coverage. Disabling releases unnecessary execution count records and allows - /// executing optimized code. - /// - public sealed class StopPreciseCoverageCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Profiler.stopPreciseCoverage"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class StopPreciseCoverageCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StopTypeProfileCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StopTypeProfileCommand.cs deleted file mode 100644 index f8e304344e48a..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/StopTypeProfileCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Disable type profile. Disabling releases type profile data collected so far. - /// - public sealed class StopTypeProfileCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Profiler.stopTypeProfile"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class StopTypeProfileCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/TakePreciseCoverageCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/TakePreciseCoverageCommand.cs deleted file mode 100644 index c6accf3199790..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/TakePreciseCoverageCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Collect coverage data for the current isolate, and resets execution counters. Precise code - /// coverage needs to have started. - /// - public sealed class TakePreciseCoverageCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Profiler.takePreciseCoverage"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class TakePreciseCoverageCommandResponse : ICommandResponse - { - /// - /// Coverage data for the current isolate. - /// - [JsonProperty("result")] - public ScriptCoverage[] Result - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/TakeTypeProfileCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/TakeTypeProfileCommand.cs deleted file mode 100644 index 2bcd285febd7a..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/TakeTypeProfileCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Collect type profile. - /// - public sealed class TakeTypeProfileCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Profiler.takeTypeProfile"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class TakeTypeProfileCommandResponse : ICommandResponse - { - /// - /// Type profile for all scripts since startTypeProfile() was turned on. - /// - [JsonProperty("result")] - public ScriptTypeProfile[] Result - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/TypeObject.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/TypeObject.cs deleted file mode 100644 index 4a65b64533d54..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/TypeObject.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Describes a type collected during runtime. - /// - public sealed class TypeObject - { - /// - /// Name of a type collected with type profiling. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/TypeProfileEntry.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/TypeProfileEntry.cs deleted file mode 100644 index 1703c3ad2bde2..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Profiler/TypeProfileEntry.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Profiler -{ - using Newtonsoft.Json; - - /// - /// Source offset and types for a parameter or return value. - /// - public sealed class TypeProfileEntry - { - /// - /// Source offset of the parameter or end of function for return values. - /// - [JsonProperty("offset")] - public long Offset - { - get; - set; - } - /// - /// The types for this parameter or return value. - /// - [JsonProperty("types")] - public TypeObject[] Types - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/AddBindingCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/AddBindingCommand.cs deleted file mode 100644 index b07c8ac97326e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/AddBindingCommand.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// If executionContextId is empty, adds binding with the given name on the - /// global objects of all inspected contexts, including those created later, - /// bindings survive reloads. - /// If executionContextId is specified, adds binding only on global object of - /// given execution context. - /// Binding function takes exactly one argument, this argument should be string, - /// in case of any other input, function throws an exception. - /// Each binding function call produces Runtime.bindingCalled notification. - /// - public sealed class AddBindingCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.addBinding"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the name - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// Gets or sets the executionContextId - /// - [JsonProperty("executionContextId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ExecutionContextId - { - get; - set; - } - } - - public sealed class AddBindingCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/AwaitPromiseCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/AwaitPromiseCommand.cs deleted file mode 100644 index 4961bad127f90..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/AwaitPromiseCommand.cs +++ /dev/null @@ -1,68 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Add handler to promise with given promise object id. - /// - public sealed class AwaitPromiseCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.awaitPromise"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier of the promise. - /// - [JsonProperty("promiseObjectId")] - public string PromiseObjectId - { - get; - set; - } - /// - /// Whether the result is expected to be a JSON object that should be sent by value. - /// - [JsonProperty("returnByValue", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? ReturnByValue - { - get; - set; - } - /// - /// Whether preview should be generated for the result. - /// - [JsonProperty("generatePreview", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? GeneratePreview - { - get; - set; - } - } - - public sealed class AwaitPromiseCommandResponse : ICommandResponse - { - /// - /// Promise result. Will contain rejected value if promise was rejected. - /// - [JsonProperty("result")] - public RemoteObject Result - { - get; - set; - } - /// - /// Exception details if stack strace is available. - /// - [JsonProperty("exceptionDetails", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ExceptionDetails ExceptionDetails - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/BindingCalledEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/BindingCalledEventArgs.cs deleted file mode 100644 index 675651a620429..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/BindingCalledEventArgs.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using System; - using Newtonsoft.Json; - - /// - /// Notification is issued every time when binding is called. - /// - public sealed class BindingCalledEventArgs : EventArgs - { - /// - /// Gets or sets the name - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// Gets or sets the payload - /// - [JsonProperty("payload")] - public string Payload - { - get; - set; - } - /// - /// Identifier of the context where the call was made. - /// - [JsonProperty("executionContextId")] - public long ExecutionContextId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/CallArgument.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/CallArgument.cs deleted file mode 100644 index 7db48c1a29d29..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/CallArgument.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Represents function call argument. Either remote object id `objectId`, primitive `value`, - /// unserializable primitive value or neither of (for undefined) them should be specified. - /// - public sealed class CallArgument - { - /// - /// Primitive value or serializable javascript object. - /// - [JsonProperty("value", DefaultValueHandling = DefaultValueHandling.Ignore)] - public object Value - { - get; - set; - } - /// - /// Primitive value which can not be JSON-stringified. - /// - [JsonProperty("unserializableValue", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string UnserializableValue - { - get; - set; - } - /// - /// Remote object handle. - /// - [JsonProperty("objectId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ObjectId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/CallFrame.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/CallFrame.cs deleted file mode 100644 index 0050e5db6c9a0..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/CallFrame.cs +++ /dev/null @@ -1,56 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Stack entry for runtime errors and assertions. - /// - public sealed class CallFrame - { - /// - /// JavaScript function name. - /// - [JsonProperty("functionName")] - public string FunctionName - { - get; - set; - } - /// - /// JavaScript script id. - /// - [JsonProperty("scriptId")] - public string ScriptId - { - get; - set; - } - /// - /// JavaScript script name or url. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// JavaScript script line number (0-based). - /// - [JsonProperty("lineNumber")] - public long LineNumber - { - get; - set; - } - /// - /// JavaScript script column number (0-based). - /// - [JsonProperty("columnNumber")] - public long ColumnNumber - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/CallFunctionOnCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/CallFunctionOnCommand.cs deleted file mode 100644 index 36f31bc78c8b3..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/CallFunctionOnCommand.cs +++ /dev/null @@ -1,138 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Calls function with given declaration on the given object. Object group of the result is - /// inherited from the target object. - /// - public sealed class CallFunctionOnCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.callFunctionOn"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Declaration of the function to call. - /// - [JsonProperty("functionDeclaration")] - public string FunctionDeclaration - { - get; - set; - } - /// - /// Identifier of the object to call function on. Either objectId or executionContextId should - /// be specified. - /// - [JsonProperty("objectId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ObjectId - { - get; - set; - } - /// - /// Call arguments. All call arguments must belong to the same JavaScript world as the target - /// object. - /// - [JsonProperty("arguments", DefaultValueHandling = DefaultValueHandling.Ignore)] - public CallArgument[] Arguments - { - get; - set; - } - /// - /// In silent mode exceptions thrown during evaluation are not reported and do not pause - /// execution. Overrides `setPauseOnException` state. - /// - [JsonProperty("silent", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Silent - { - get; - set; - } - /// - /// Whether the result is expected to be a JSON object which should be sent by value. - /// - [JsonProperty("returnByValue", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? ReturnByValue - { - get; - set; - } - /// - /// Whether preview should be generated for the result. - /// - [JsonProperty("generatePreview", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? GeneratePreview - { - get; - set; - } - /// - /// Whether execution should be treated as initiated by user in the UI. - /// - [JsonProperty("userGesture", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? UserGesture - { - get; - set; - } - /// - /// Whether execution should `await` for resulting value and return once awaited promise is - /// resolved. - /// - [JsonProperty("awaitPromise", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? AwaitPromise - { - get; - set; - } - /// - /// Specifies execution context which global object will be used to call function on. Either - /// executionContextId or objectId should be specified. - /// - [JsonProperty("executionContextId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ExecutionContextId - { - get; - set; - } - /// - /// Symbolic group name that can be used to release multiple objects. If objectGroup is not - /// specified and objectId is, objectGroup will be inherited from object. - /// - [JsonProperty("objectGroup", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ObjectGroup - { - get; - set; - } - } - - public sealed class CallFunctionOnCommandResponse : ICommandResponse - { - /// - /// Call result. - /// - [JsonProperty("result")] - public RemoteObject Result - { - get; - set; - } - /// - /// Exception details. - /// - [JsonProperty("exceptionDetails", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ExceptionDetails ExceptionDetails - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/CompileScriptCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/CompileScriptCommand.cs deleted file mode 100644 index 7861bb091997f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/CompileScriptCommand.cs +++ /dev/null @@ -1,78 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Compiles expression. - /// - public sealed class CompileScriptCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.compileScript"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Expression to compile. - /// - [JsonProperty("expression")] - public string Expression - { - get; - set; - } - /// - /// Source url to be set for the script. - /// - [JsonProperty("sourceURL")] - public string SourceURL - { - get; - set; - } - /// - /// Specifies whether the compiled script should be persisted. - /// - [JsonProperty("persistScript")] - public bool PersistScript - { - get; - set; - } - /// - /// Specifies in which execution context to perform script run. If the parameter is omitted the - /// evaluation will be performed in the context of the inspected page. - /// - [JsonProperty("executionContextId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ExecutionContextId - { - get; - set; - } - } - - public sealed class CompileScriptCommandResponse : ICommandResponse - { - /// - /// Id of the script. - /// - [JsonProperty("scriptId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ScriptId - { - get; - set; - } - /// - /// Exception details. - /// - [JsonProperty("exceptionDetails", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ExceptionDetails ExceptionDetails - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ConsoleAPICalledEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ConsoleAPICalledEventArgs.cs deleted file mode 100644 index c98747f1aefcc..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ConsoleAPICalledEventArgs.cs +++ /dev/null @@ -1,70 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using System; - using Newtonsoft.Json; - - /// - /// Issued when console API was called. - /// - public sealed class ConsoleAPICalledEventArgs : EventArgs - { - /// - /// Type of the call. - /// - [JsonProperty("type")] - public string Type - { - get; - set; - } - /// - /// Call arguments. - /// - [JsonProperty("args")] - public RemoteObject[] Args - { - get; - set; - } - /// - /// Identifier of the context where the call was made. - /// - [JsonProperty("executionContextId")] - public long ExecutionContextId - { - get; - set; - } - /// - /// Call timestamp. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - /// - /// Stack trace captured when the call was made. The async stack chain is automatically reported for - /// the following call types: `assert`, `error`, `trace`, `warning`. For other types the async call - /// chain can be retrieved using `Debugger.getStackTrace` and `stackTrace.parentId` field. - /// - [JsonProperty("stackTrace", DefaultValueHandling = DefaultValueHandling.Ignore)] - public StackTrace StackTrace - { - get; - set; - } - /// - /// Console context descriptor for calls on non-default console context (not console.*): - /// 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call - /// on named context. - /// - [JsonProperty("context", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Context - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/CustomPreview.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/CustomPreview.cs deleted file mode 100644 index 28f8374685d9d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/CustomPreview.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// CustomPreview - /// - public sealed class CustomPreview - { - /// - /// The JSON-stringified result of formatter.header(object, config) call. - /// It contains json ML array that represents RemoteObject. - /// - [JsonProperty("header")] - public string Header - { - get; - set; - } - /// - /// If formatter returns true as a result of formatter.hasBody call then bodyGetterId will - /// contain RemoteObjectId for the function that returns result of formatter.body(object, config) call. - /// The result value is json ML array. - /// - [JsonProperty("bodyGetterId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string BodyGetterId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/DisableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/DisableCommand.cs deleted file mode 100644 index 85a9b67a3d685..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/DisableCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Disables reporting of execution contexts creation. - /// - public sealed class DisableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.disable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class DisableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/DiscardConsoleEntriesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/DiscardConsoleEntriesCommand.cs deleted file mode 100644 index 798ee47de7c8b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/DiscardConsoleEntriesCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Discards collected exceptions and console API calls. - /// - public sealed class DiscardConsoleEntriesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.discardConsoleEntries"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class DiscardConsoleEntriesCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/EnableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/EnableCommand.cs deleted file mode 100644 index 7349cf86acd4f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/EnableCommand.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Enables reporting of execution contexts creation by means of `executionContextCreated` event. - /// When the reporting gets enabled the event will be sent immediately for each existing execution - /// context. - /// - public sealed class EnableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.enable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class EnableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/EntryPreview.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/EntryPreview.cs deleted file mode 100644 index f377bef50c04f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/EntryPreview.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// EntryPreview - /// - public sealed class EntryPreview - { - /// - /// Preview of the key. Specified for map-like collection entries. - /// - [JsonProperty("key", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ObjectPreview Key - { - get; - set; - } - /// - /// Preview of the value. - /// - [JsonProperty("value")] - public ObjectPreview Value - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/EvaluateCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/EvaluateCommand.cs deleted file mode 100644 index af84bb492bed7..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/EvaluateCommand.cs +++ /dev/null @@ -1,143 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Evaluates expression on global object. - /// - public sealed class EvaluateCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.evaluate"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Expression to evaluate. - /// - [JsonProperty("expression")] - public string Expression - { - get; - set; - } - /// - /// Symbolic group name that can be used to release multiple objects. - /// - [JsonProperty("objectGroup", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ObjectGroup - { - get; - set; - } - /// - /// Determines whether Command Line API should be available during the evaluation. - /// - [JsonProperty("includeCommandLineAPI", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IncludeCommandLineAPI - { - get; - set; - } - /// - /// In silent mode exceptions thrown during evaluation are not reported and do not pause - /// execution. Overrides `setPauseOnException` state. - /// - [JsonProperty("silent", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Silent - { - get; - set; - } - /// - /// Specifies in which execution context to perform evaluation. If the parameter is omitted the - /// evaluation will be performed in the context of the inspected page. - /// - [JsonProperty("contextId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ContextId - { - get; - set; - } - /// - /// Whether the result is expected to be a JSON object that should be sent by value. - /// - [JsonProperty("returnByValue", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? ReturnByValue - { - get; - set; - } - /// - /// Whether preview should be generated for the result. - /// - [JsonProperty("generatePreview", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? GeneratePreview - { - get; - set; - } - /// - /// Whether execution should be treated as initiated by user in the UI. - /// - [JsonProperty("userGesture", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? UserGesture - { - get; - set; - } - /// - /// Whether execution should `await` for resulting value and return once awaited promise is - /// resolved. - /// - [JsonProperty("awaitPromise", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? AwaitPromise - { - get; - set; - } - /// - /// Whether to throw an exception if side effect cannot be ruled out during evaluation. - /// - [JsonProperty("throwOnSideEffect", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? ThrowOnSideEffect - { - get; - set; - } - /// - /// Terminate execution after timing out (number of milliseconds). - /// - [JsonProperty("timeout", DefaultValueHandling = DefaultValueHandling.Ignore)] - public double? Timeout - { - get; - set; - } - } - - public sealed class EvaluateCommandResponse : ICommandResponse - { - /// - /// Evaluation result. - /// - [JsonProperty("result")] - public RemoteObject Result - { - get; - set; - } - /// - /// Exception details. - /// - [JsonProperty("exceptionDetails", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ExceptionDetails ExceptionDetails - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExceptionDetails.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExceptionDetails.cs deleted file mode 100644 index c6a91d7e09672..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExceptionDetails.cs +++ /dev/null @@ -1,93 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Detailed information about exception (or error) that was thrown during script compilation or - /// execution. - /// - public sealed class ExceptionDetails - { - /// - /// Exception id. - /// - [JsonProperty("exceptionId")] - public long ExceptionId - { - get; - set; - } - /// - /// Exception text, which should be used together with exception object when available. - /// - [JsonProperty("text")] - public string Text - { - get; - set; - } - /// - /// Line number of the exception location (0-based). - /// - [JsonProperty("lineNumber")] - public long LineNumber - { - get; - set; - } - /// - /// Column number of the exception location (0-based). - /// - [JsonProperty("columnNumber")] - public long ColumnNumber - { - get; - set; - } - /// - /// Script ID of the exception location. - /// - [JsonProperty("scriptId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ScriptId - { - get; - set; - } - /// - /// URL of the exception location, to be used when the script was not reported. - /// - [JsonProperty("url", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Url - { - get; - set; - } - /// - /// JavaScript stack trace if available. - /// - [JsonProperty("stackTrace", DefaultValueHandling = DefaultValueHandling.Ignore)] - public StackTrace StackTrace - { - get; - set; - } - /// - /// Exception object if available. - /// - [JsonProperty("exception", DefaultValueHandling = DefaultValueHandling.Ignore)] - public RemoteObject Exception - { - get; - set; - } - /// - /// Identifier of the context where exception happened. - /// - [JsonProperty("executionContextId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ExecutionContextId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExceptionRevokedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExceptionRevokedEventArgs.cs deleted file mode 100644 index 074ca8326bd76..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExceptionRevokedEventArgs.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using System; - using Newtonsoft.Json; - - /// - /// Issued when unhandled exception was revoked. - /// - public sealed class ExceptionRevokedEventArgs : EventArgs - { - /// - /// Reason describing why exception was revoked. - /// - [JsonProperty("reason")] - public string Reason - { - get; - set; - } - /// - /// The id of revoked exception, as reported in `exceptionThrown`. - /// - [JsonProperty("exceptionId")] - public long ExceptionId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExceptionThrownEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExceptionThrownEventArgs.cs deleted file mode 100644 index d5fd59dd8819f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExceptionThrownEventArgs.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using System; - using Newtonsoft.Json; - - /// - /// Issued when exception was thrown and unhandled. - /// - public sealed class ExceptionThrownEventArgs : EventArgs - { - /// - /// Timestamp of the exception. - /// - [JsonProperty("timestamp")] - public double Timestamp - { - get; - set; - } - /// - /// Gets or sets the exceptionDetails - /// - [JsonProperty("exceptionDetails")] - public ExceptionDetails ExceptionDetails - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExecutionContextCreatedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExecutionContextCreatedEventArgs.cs deleted file mode 100644 index 96288527533fd..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExecutionContextCreatedEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using System; - using Newtonsoft.Json; - - /// - /// Issued when new execution context is created. - /// - public sealed class ExecutionContextCreatedEventArgs : EventArgs - { - /// - /// A newly created execution context. - /// - [JsonProperty("context")] - public ExecutionContextDescription Context - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExecutionContextDescription.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExecutionContextDescription.cs deleted file mode 100644 index eebef1ddcd7e1..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExecutionContextDescription.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Description of an isolated world. - /// - public sealed class ExecutionContextDescription - { - /// - /// Unique id of the execution context. It can be used to specify in which execution context - /// script evaluation should be performed. - /// - [JsonProperty("id")] - public long Id - { - get; - set; - } - /// - /// Execution context origin. - /// - [JsonProperty("origin")] - public string Origin - { - get; - set; - } - /// - /// Human readable name describing given context. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// Embedder-specific auxiliary data. - /// - [JsonProperty("auxData", DefaultValueHandling = DefaultValueHandling.Ignore)] - public object AuxData - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExecutionContextDestroyedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExecutionContextDestroyedEventArgs.cs deleted file mode 100644 index 6126f8d7b654a..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExecutionContextDestroyedEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using System; - using Newtonsoft.Json; - - /// - /// Issued when execution context is destroyed. - /// - public sealed class ExecutionContextDestroyedEventArgs : EventArgs - { - /// - /// Id of the destroyed context - /// - [JsonProperty("executionContextId")] - public long ExecutionContextId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExecutionContextsClearedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExecutionContextsClearedEventArgs.cs deleted file mode 100644 index 55788128bdfb2..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ExecutionContextsClearedEventArgs.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using System; - using Newtonsoft.Json; - - /// - /// Issued when all executionContexts were cleared in browser - /// - public sealed class ExecutionContextsClearedEventArgs : EventArgs - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/GetHeapUsageCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/GetHeapUsageCommand.cs deleted file mode 100644 index cf7df3be8a85f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/GetHeapUsageCommand.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Returns the JavaScript heap usage. - /// It is the total usage of the corresponding isolate not scoped to a particular Runtime. - /// - public sealed class GetHeapUsageCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.getHeapUsage"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetHeapUsageCommandResponse : ICommandResponse - { - /// - /// Used heap size in bytes. - /// - [JsonProperty("usedSize")] - public double UsedSize - { - get; - set; - } - /// - /// Allocated heap size in bytes. - /// - [JsonProperty("totalSize")] - public double TotalSize - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/GetIsolateIdCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/GetIsolateIdCommand.cs deleted file mode 100644 index 161bb63b70e87..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/GetIsolateIdCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Returns the isolate id. - /// - public sealed class GetIsolateIdCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.getIsolateId"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetIsolateIdCommandResponse : ICommandResponse - { - /// - /// The isolate id. - /// - [JsonProperty("id")] - public string Id - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/GetPropertiesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/GetPropertiesCommand.cs deleted file mode 100644 index a5340a2539630..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/GetPropertiesCommand.cs +++ /dev/null @@ -1,98 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Returns properties of a given object. Object group of the result is inherited from the target - /// object. - /// - public sealed class GetPropertiesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.getProperties"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier of the object to return properties for. - /// - [JsonProperty("objectId")] - public string ObjectId - { - get; - set; - } - /// - /// If true, returns properties belonging only to the element itself, not to its prototype - /// chain. - /// - [JsonProperty("ownProperties", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? OwnProperties - { - get; - set; - } - /// - /// If true, returns accessor properties (with getter/setter) only; internal properties are not - /// returned either. - /// - [JsonProperty("accessorPropertiesOnly", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? AccessorPropertiesOnly - { - get; - set; - } - /// - /// Whether preview should be generated for the results. - /// - [JsonProperty("generatePreview", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? GeneratePreview - { - get; - set; - } - } - - public sealed class GetPropertiesCommandResponse : ICommandResponse - { - /// - /// Object properties. - /// - [JsonProperty("result")] - public PropertyDescriptor[] Result - { - get; - set; - } - /// - /// Internal object properties (only of the element itself). - /// - [JsonProperty("internalProperties", DefaultValueHandling = DefaultValueHandling.Ignore)] - public InternalPropertyDescriptor[] InternalProperties - { - get; - set; - } - /// - /// Object private properties. - /// - [JsonProperty("privateProperties", DefaultValueHandling = DefaultValueHandling.Ignore)] - public PrivatePropertyDescriptor[] PrivateProperties - { - get; - set; - } - /// - /// Exception details. - /// - [JsonProperty("exceptionDetails", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ExceptionDetails ExceptionDetails - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/GlobalLexicalScopeNamesCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/GlobalLexicalScopeNamesCommand.cs deleted file mode 100644 index 307625c455e2f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/GlobalLexicalScopeNamesCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Returns all let, const and class variables from global scope. - /// - public sealed class GlobalLexicalScopeNamesCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.globalLexicalScopeNames"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Specifies in which execution context to lookup global scope variables. - /// - [JsonProperty("executionContextId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ExecutionContextId - { - get; - set; - } - } - - public sealed class GlobalLexicalScopeNamesCommandResponse : ICommandResponse - { - /// - /// Gets or sets the names - /// - [JsonProperty("names")] - public string[] Names - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/InspectRequestedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/InspectRequestedEventArgs.cs deleted file mode 100644 index 2fa6d54e1eede..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/InspectRequestedEventArgs.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using System; - using Newtonsoft.Json; - - /// - /// Issued when object should be inspected (for example, as a result of inspect() command line API - /// call). - /// - public sealed class InspectRequestedEventArgs : EventArgs - { - /// - /// Gets or sets the object - /// - [JsonProperty("object")] - public RemoteObject Object - { - get; - set; - } - /// - /// Gets or sets the hints - /// - [JsonProperty("hints")] - public object Hints - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/InternalPropertyDescriptor.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/InternalPropertyDescriptor.cs deleted file mode 100644 index 3c9f208fa2dbe..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/InternalPropertyDescriptor.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Object internal property descriptor. This property isn't normally visible in JavaScript code. - /// - public sealed class InternalPropertyDescriptor - { - /// - /// Conventional property name. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// The value associated with the property. - /// - [JsonProperty("value", DefaultValueHandling = DefaultValueHandling.Ignore)] - public RemoteObject Value - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ObjectPreview.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ObjectPreview.cs deleted file mode 100644 index e36b6dbe9cbfc..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ObjectPreview.cs +++ /dev/null @@ -1,65 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Object containing abbreviated remote object value. - /// - public sealed class ObjectPreview - { - /// - /// Object type. - /// - [JsonProperty("type")] - public string Type - { - get; - set; - } - /// - /// Object subtype hint. Specified for `object` type values only. - /// - [JsonProperty("subtype", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Subtype - { - get; - set; - } - /// - /// String representation of the object. - /// - [JsonProperty("description", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Description - { - get; - set; - } - /// - /// True iff some of the properties or entries of the original object did not fit. - /// - [JsonProperty("overflow")] - public bool Overflow - { - get; - set; - } - /// - /// List of the properties. - /// - [JsonProperty("properties")] - public PropertyPreview[] Properties - { - get; - set; - } - /// - /// List of the entries. Specified for `map` and `set` subtype values only. - /// - [JsonProperty("entries", DefaultValueHandling = DefaultValueHandling.Ignore)] - public EntryPreview[] Entries - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/PrivatePropertyDescriptor.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/PrivatePropertyDescriptor.cs deleted file mode 100644 index d533e942422fc..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/PrivatePropertyDescriptor.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Object private field descriptor. - /// - public sealed class PrivatePropertyDescriptor - { - /// - /// Private property name. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// The value associated with the private property. - /// - [JsonProperty("value")] - public RemoteObject Value - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/PropertyDescriptor.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/PropertyDescriptor.cs deleted file mode 100644 index eff05f0358a5c..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/PropertyDescriptor.cs +++ /dev/null @@ -1,105 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Object property descriptor. - /// - public sealed class PropertyDescriptor - { - /// - /// Property name or symbol description. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// The value associated with the property. - /// - [JsonProperty("value", DefaultValueHandling = DefaultValueHandling.Ignore)] - public RemoteObject Value - { - get; - set; - } - /// - /// True if the value associated with the property may be changed (data descriptors only). - /// - [JsonProperty("writable", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Writable - { - get; - set; - } - /// - /// A function which serves as a getter for the property, or `undefined` if there is no getter - /// (accessor descriptors only). - /// - [JsonProperty("get", DefaultValueHandling = DefaultValueHandling.Ignore)] - public RemoteObject Get - { - get; - set; - } - /// - /// A function which serves as a setter for the property, or `undefined` if there is no setter - /// (accessor descriptors only). - /// - [JsonProperty("set", DefaultValueHandling = DefaultValueHandling.Ignore)] - public RemoteObject Set - { - get; - set; - } - /// - /// True if the type of this property descriptor may be changed and if the property may be - /// deleted from the corresponding object. - /// - [JsonProperty("configurable")] - public bool Configurable - { - get; - set; - } - /// - /// True if this property shows up during enumeration of the properties on the corresponding - /// object. - /// - [JsonProperty("enumerable")] - public bool Enumerable - { - get; - set; - } - /// - /// True if the result was thrown during the evaluation. - /// - [JsonProperty("wasThrown", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? WasThrown - { - get; - set; - } - /// - /// True if the property is owned for the object. - /// - [JsonProperty("isOwn", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IsOwn - { - get; - set; - } - /// - /// Property symbol object, if the property is of the `symbol` type. - /// - [JsonProperty("symbol", DefaultValueHandling = DefaultValueHandling.Ignore)] - public RemoteObject Symbol - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/PropertyPreview.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/PropertyPreview.cs deleted file mode 100644 index 36aa9d6e46df5..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/PropertyPreview.cs +++ /dev/null @@ -1,56 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// PropertyPreview - /// - public sealed class PropertyPreview - { - /// - /// Property name. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// Object type. Accessor means that the property itself is an accessor property. - /// - [JsonProperty("type")] - public string Type - { - get; - set; - } - /// - /// User-friendly property value string. - /// - [JsonProperty("value", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Value - { - get; - set; - } - /// - /// Nested value preview. - /// - [JsonProperty("valuePreview", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ObjectPreview ValuePreview - { - get; - set; - } - /// - /// Object subtype hint. Specified for `object` type values only. - /// - [JsonProperty("subtype", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Subtype - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/QueryObjectsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/QueryObjectsCommand.cs deleted file mode 100644 index 2faf3edb3969b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/QueryObjectsCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// QueryObjects - /// - public sealed class QueryObjectsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.queryObjects"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier of the prototype to return objects for. - /// - [JsonProperty("prototypeObjectId")] - public string PrototypeObjectId - { - get; - set; - } - /// - /// Symbolic group name that can be used to release the results. - /// - [JsonProperty("objectGroup", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ObjectGroup - { - get; - set; - } - } - - public sealed class QueryObjectsCommandResponse : ICommandResponse - { - /// - /// Array with objects. - /// - [JsonProperty("objects")] - public RemoteObject Objects - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ReleaseObjectCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ReleaseObjectCommand.cs deleted file mode 100644 index 78b5022dfc4f3..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ReleaseObjectCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Releases remote object with given id. - /// - public sealed class ReleaseObjectCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.releaseObject"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Identifier of the object to release. - /// - [JsonProperty("objectId")] - public string ObjectId - { - get; - set; - } - } - - public sealed class ReleaseObjectCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ReleaseObjectGroupCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ReleaseObjectGroupCommand.cs deleted file mode 100644 index 2e6d6e15d4252..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/ReleaseObjectGroupCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Releases all remote objects that belong to a given group. - /// - public sealed class ReleaseObjectGroupCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.releaseObjectGroup"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Symbolic object group name. - /// - [JsonProperty("objectGroup")] - public string ObjectGroup - { - get; - set; - } - } - - public sealed class ReleaseObjectGroupCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/RemoteObject.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/RemoteObject.cs deleted file mode 100644 index 34235d61f8337..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/RemoteObject.cs +++ /dev/null @@ -1,93 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Mirror object referencing original JavaScript object. - /// - public sealed class RemoteObject - { - /// - /// Object type. - /// - [JsonProperty("type")] - public string Type - { - get; - set; - } - /// - /// Object subtype hint. Specified for `object` type values only. - /// - [JsonProperty("subtype", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Subtype - { - get; - set; - } - /// - /// Object class (constructor) name. Specified for `object` type values only. - /// - [JsonProperty("className", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ClassName - { - get; - set; - } - /// - /// Remote object value in case of primitive values or JSON values (if it was requested). - /// - [JsonProperty("value", DefaultValueHandling = DefaultValueHandling.Ignore)] - public object Value - { - get; - set; - } - /// - /// Primitive value which can not be JSON-stringified does not have `value`, but gets this - /// property. - /// - [JsonProperty("unserializableValue", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string UnserializableValue - { - get; - set; - } - /// - /// String representation of the object. - /// - [JsonProperty("description", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Description - { - get; - set; - } - /// - /// Unique object identifier (for non-primitive values). - /// - [JsonProperty("objectId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ObjectId - { - get; - set; - } - /// - /// Preview containing abbreviated property values. Specified for `object` type values only. - /// - [JsonProperty("preview", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ObjectPreview Preview - { - get; - set; - } - /// - /// customPreview - /// - [JsonProperty("customPreview", DefaultValueHandling = DefaultValueHandling.Ignore)] - public CustomPreview CustomPreview - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/RemoveBindingCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/RemoveBindingCommand.cs deleted file mode 100644 index 68443fc1c8cb1..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/RemoveBindingCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// This method does not remove binding function from global object but - /// unsubscribes current runtime agent from Runtime.bindingCalled notifications. - /// - public sealed class RemoveBindingCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.removeBinding"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the name - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - } - - public sealed class RemoveBindingCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/RunIfWaitingForDebuggerCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/RunIfWaitingForDebuggerCommand.cs deleted file mode 100644 index 7978df3267a1a..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/RunIfWaitingForDebuggerCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Tells inspected instance to run if it was waiting for debugger to attach. - /// - public sealed class RunIfWaitingForDebuggerCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.runIfWaitingForDebugger"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class RunIfWaitingForDebuggerCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/RunScriptCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/RunScriptCommand.cs deleted file mode 100644 index 7231363c3f2fc..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/RunScriptCommand.cs +++ /dev/null @@ -1,116 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Runs script with given id in a given context. - /// - public sealed class RunScriptCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.runScript"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Id of the script to run. - /// - [JsonProperty("scriptId")] - public string ScriptId - { - get; - set; - } - /// - /// Specifies in which execution context to perform script run. If the parameter is omitted the - /// evaluation will be performed in the context of the inspected page. - /// - [JsonProperty("executionContextId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? ExecutionContextId - { - get; - set; - } - /// - /// Symbolic group name that can be used to release multiple objects. - /// - [JsonProperty("objectGroup", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string ObjectGroup - { - get; - set; - } - /// - /// In silent mode exceptions thrown during evaluation are not reported and do not pause - /// execution. Overrides `setPauseOnException` state. - /// - [JsonProperty("silent", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Silent - { - get; - set; - } - /// - /// Determines whether Command Line API should be available during the evaluation. - /// - [JsonProperty("includeCommandLineAPI", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? IncludeCommandLineAPI - { - get; - set; - } - /// - /// Whether the result is expected to be a JSON object which should be sent by value. - /// - [JsonProperty("returnByValue", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? ReturnByValue - { - get; - set; - } - /// - /// Whether preview should be generated for the result. - /// - [JsonProperty("generatePreview", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? GeneratePreview - { - get; - set; - } - /// - /// Whether execution should `await` for resulting value and return once awaited promise is - /// resolved. - /// - [JsonProperty("awaitPromise", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? AwaitPromise - { - get; - set; - } - } - - public sealed class RunScriptCommandResponse : ICommandResponse - { - /// - /// Run result. - /// - [JsonProperty("result")] - public RemoteObject Result - { - get; - set; - } - /// - /// Exception details. - /// - [JsonProperty("exceptionDetails", DefaultValueHandling = DefaultValueHandling.Ignore)] - public ExceptionDetails ExceptionDetails - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/RuntimeAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/RuntimeAdapter.cs deleted file mode 100644 index 8db291e23c9c2..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/RuntimeAdapter.cs +++ /dev/null @@ -1,320 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the Runtime domain to simplify the command interface. - /// - public class RuntimeAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "Runtime"; - private Dictionary m_eventMap = new Dictionary(); - - public RuntimeAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - m_eventMap["bindingCalled"] = new DevToolsEventData(typeof(BindingCalledEventArgs), OnBindingCalled); - m_eventMap["consoleAPICalled"] = new DevToolsEventData(typeof(ConsoleAPICalledEventArgs), OnConsoleAPICalled); - m_eventMap["exceptionRevoked"] = new DevToolsEventData(typeof(ExceptionRevokedEventArgs), OnExceptionRevoked); - m_eventMap["exceptionThrown"] = new DevToolsEventData(typeof(ExceptionThrownEventArgs), OnExceptionThrown); - m_eventMap["executionContextCreated"] = new DevToolsEventData(typeof(ExecutionContextCreatedEventArgs), OnExecutionContextCreated); - m_eventMap["executionContextDestroyed"] = new DevToolsEventData(typeof(ExecutionContextDestroyedEventArgs), OnExecutionContextDestroyed); - m_eventMap["executionContextsCleared"] = new DevToolsEventData(typeof(ExecutionContextsClearedEventArgs), OnExecutionContextsCleared); - m_eventMap["inspectRequested"] = new DevToolsEventData(typeof(InspectRequestedEventArgs), OnInspectRequested); - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - /// - /// Notification is issued every time when binding is called. - /// - public event EventHandler BindingCalled; - /// - /// Issued when console API was called. - /// - public event EventHandler ConsoleAPICalled; - /// - /// Issued when unhandled exception was revoked. - /// - public event EventHandler ExceptionRevoked; - /// - /// Issued when exception was thrown and unhandled. - /// - public event EventHandler ExceptionThrown; - /// - /// Issued when new execution context is created. - /// - public event EventHandler ExecutionContextCreated; - /// - /// Issued when execution context is destroyed. - /// - public event EventHandler ExecutionContextDestroyed; - /// - /// Issued when all executionContexts were cleared in browser - /// - public event EventHandler ExecutionContextsCleared; - /// - /// Issued when object should be inspected (for example, as a result of inspect() command line API - /// call). - /// - public event EventHandler InspectRequested; - - /// - /// Add handler to promise with given promise object id. - /// - public async Task AwaitPromise(AwaitPromiseCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Calls function with given declaration on the given object. Object group of the result is - /// inherited from the target object. - /// - public async Task CallFunctionOn(CallFunctionOnCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Compiles expression. - /// - public async Task CompileScript(CompileScriptCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Disables reporting of execution contexts creation. - /// - public async Task Disable(DisableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new DisableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Discards collected exceptions and console API calls. - /// - public async Task DiscardConsoleEntries(DiscardConsoleEntriesCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new DiscardConsoleEntriesCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enables reporting of execution contexts creation by means of `executionContextCreated` event. - /// When the reporting gets enabled the event will be sent immediately for each existing execution - /// context. - /// - public async Task Enable(EnableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new EnableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Evaluates expression on global object. - /// - public async Task Evaluate(EvaluateCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns the isolate id. - /// - public async Task GetIsolateId(GetIsolateIdCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetIsolateIdCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns the JavaScript heap usage. - /// It is the total usage of the corresponding isolate not scoped to a particular Runtime. - /// - public async Task GetHeapUsage(GetHeapUsageCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetHeapUsageCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns properties of a given object. Object group of the result is inherited from the target - /// object. - /// - public async Task GetProperties(GetPropertiesCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns all let, const and class variables from global scope. - /// - public async Task GlobalLexicalScopeNames(GlobalLexicalScopeNamesCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// queryObjects - /// - public async Task QueryObjects(QueryObjectsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Releases remote object with given id. - /// - public async Task ReleaseObject(ReleaseObjectCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Releases all remote objects that belong to a given group. - /// - public async Task ReleaseObjectGroup(ReleaseObjectGroupCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Tells inspected instance to run if it was waiting for debugger to attach. - /// - public async Task RunIfWaitingForDebugger(RunIfWaitingForDebuggerCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new RunIfWaitingForDebuggerCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Runs script with given id in a given context. - /// - public async Task RunScript(RunScriptCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enables or disables async call stacks tracking. - /// - public async Task SetAsyncCallStackDepth(SetAsyncCallStackDepthCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// setCustomObjectFormatterEnabled - /// - public async Task SetCustomObjectFormatterEnabled(SetCustomObjectFormatterEnabledCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// setMaxCallStackSizeToCapture - /// - public async Task SetMaxCallStackSizeToCapture(SetMaxCallStackSizeToCaptureCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Terminate current or next JavaScript execution. - /// Will cancel the termination when the outer-most script execution ends. - /// - public async Task TerminateExecution(TerminateExecutionCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new TerminateExecutionCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// If executionContextId is empty, adds binding with the given name on the - /// global objects of all inspected contexts, including those created later, - /// bindings survive reloads. - /// If executionContextId is specified, adds binding only on global object of - /// given execution context. - /// Binding function takes exactly one argument, this argument should be string, - /// in case of any other input, function throws an exception. - /// Each binding function call produces Runtime.bindingCalled notification. - /// - public async Task AddBinding(AddBindingCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// This method does not remove binding function from global object but - /// unsubscribes current runtime agent from Runtime.bindingCalled notifications. - /// - public async Task RemoveBinding(RemoveBindingCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - private void OnBindingCalled(object rawEventArgs) - { - BindingCalledEventArgs e = rawEventArgs as BindingCalledEventArgs; - if (e != null && BindingCalled != null) - { - BindingCalled(this, e); - } - } - private void OnConsoleAPICalled(object rawEventArgs) - { - ConsoleAPICalledEventArgs e = rawEventArgs as ConsoleAPICalledEventArgs; - if (e != null && ConsoleAPICalled != null) - { - ConsoleAPICalled(this, e); - } - } - private void OnExceptionRevoked(object rawEventArgs) - { - ExceptionRevokedEventArgs e = rawEventArgs as ExceptionRevokedEventArgs; - if (e != null && ExceptionRevoked != null) - { - ExceptionRevoked(this, e); - } - } - private void OnExceptionThrown(object rawEventArgs) - { - ExceptionThrownEventArgs e = rawEventArgs as ExceptionThrownEventArgs; - if (e != null && ExceptionThrown != null) - { - ExceptionThrown(this, e); - } - } - private void OnExecutionContextCreated(object rawEventArgs) - { - ExecutionContextCreatedEventArgs e = rawEventArgs as ExecutionContextCreatedEventArgs; - if (e != null && ExecutionContextCreated != null) - { - ExecutionContextCreated(this, e); - } - } - private void OnExecutionContextDestroyed(object rawEventArgs) - { - ExecutionContextDestroyedEventArgs e = rawEventArgs as ExecutionContextDestroyedEventArgs; - if (e != null && ExecutionContextDestroyed != null) - { - ExecutionContextDestroyed(this, e); - } - } - private void OnExecutionContextsCleared(object rawEventArgs) - { - ExecutionContextsClearedEventArgs e = rawEventArgs as ExecutionContextsClearedEventArgs; - if (e != null && ExecutionContextsCleared != null) - { - ExecutionContextsCleared(this, e); - } - } - private void OnInspectRequested(object rawEventArgs) - { - InspectRequestedEventArgs e = rawEventArgs as InspectRequestedEventArgs; - if (e != null && InspectRequested != null) - { - InspectRequested(this, e); - } - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/SetAsyncCallStackDepthCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/SetAsyncCallStackDepthCommand.cs deleted file mode 100644 index 97ffed53af257..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/SetAsyncCallStackDepthCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Enables or disables async call stacks tracking. - /// - public sealed class SetAsyncCallStackDepthCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.setAsyncCallStackDepth"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async - /// call stacks (default). - /// - [JsonProperty("maxDepth")] - public long MaxDepth - { - get; - set; - } - } - - public sealed class SetAsyncCallStackDepthCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/SetCustomObjectFormatterEnabledCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/SetCustomObjectFormatterEnabledCommand.cs deleted file mode 100644 index 66125ea1111bd..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/SetCustomObjectFormatterEnabledCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// SetCustomObjectFormatterEnabled - /// - public sealed class SetCustomObjectFormatterEnabledCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.setCustomObjectFormatterEnabled"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the enabled - /// - [JsonProperty("enabled")] - public bool Enabled - { - get; - set; - } - } - - public sealed class SetCustomObjectFormatterEnabledCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/SetMaxCallStackSizeToCaptureCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/SetMaxCallStackSizeToCaptureCommand.cs deleted file mode 100644 index 1b71e866e8d6e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/SetMaxCallStackSizeToCaptureCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// SetMaxCallStackSizeToCapture - /// - public sealed class SetMaxCallStackSizeToCaptureCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.setMaxCallStackSizeToCapture"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the size - /// - [JsonProperty("size")] - public long Size - { - get; - set; - } - } - - public sealed class SetMaxCallStackSizeToCaptureCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/StackTrace.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/StackTrace.cs deleted file mode 100644 index 0473ef278b413..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/StackTrace.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Call frames for assertions or error messages. - /// - public sealed class StackTrace - { - /// - /// String label of this stack trace. For async traces this may be a name of the function that - /// initiated the async call. - /// - [JsonProperty("description", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Description - { - get; - set; - } - /// - /// JavaScript function name. - /// - [JsonProperty("callFrames")] - public CallFrame[] CallFrames - { - get; - set; - } - /// - /// Asynchronous JavaScript stack trace that preceded this stack, if available. - /// - [JsonProperty("parent", DefaultValueHandling = DefaultValueHandling.Ignore)] - public StackTrace Parent - { - get; - set; - } - /// - /// Asynchronous JavaScript stack trace that preceded this stack, if available. - /// - [JsonProperty("parentId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public StackTraceId ParentId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/StackTraceId.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/StackTraceId.cs deleted file mode 100644 index 45a2627aa4b6c..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/StackTraceId.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This - /// allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages. - /// - public sealed class StackTraceId - { - /// - /// id - /// - [JsonProperty("id")] - public string Id - { - get; - set; - } - /// - /// debuggerId - /// - [JsonProperty("debuggerId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string DebuggerId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/TerminateExecutionCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/TerminateExecutionCommand.cs deleted file mode 100644 index 9baa550e4d953..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Runtime/TerminateExecutionCommand.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Runtime -{ - using Newtonsoft.Json; - - /// - /// Terminate current or next JavaScript execution. - /// Will cancel the termination when the outer-most script execution ends. - /// - public sealed class TerminateExecutionCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Runtime.terminateExecution"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class TerminateExecutionCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Schema/Domain.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Schema/Domain.cs deleted file mode 100644 index 12fbc09c8737e..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Schema/Domain.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Schema -{ - using Newtonsoft.Json; - - /// - /// Description of the protocol domain. - /// - public sealed class Domain - { - /// - /// Domain name. - /// - [JsonProperty("name")] - public string Name - { - get; - set; - } - /// - /// Domain version. - /// - [JsonProperty("version")] - public string Version - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Schema/GetDomainsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Schema/GetDomainsCommand.cs deleted file mode 100644 index d256754d20b82..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Schema/GetDomainsCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Schema -{ - using Newtonsoft.Json; - - /// - /// Returns supported domains. - /// - public sealed class GetDomainsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Schema.getDomains"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetDomainsCommandResponse : ICommandResponse - { - /// - /// List of supported domains. - /// - [JsonProperty("domains")] - public Domain[] Domains - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Schema/SchemaAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Schema/SchemaAdapter.cs deleted file mode 100644 index c4fb9de3a2d84..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Schema/SchemaAdapter.cs +++ /dev/null @@ -1,54 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Schema -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the Schema domain to simplify the command interface. - /// - public class SchemaAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "Schema"; - private Dictionary m_eventMap = new Dictionary(); - - public SchemaAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - - /// - /// Returns supported domains. - /// - public async Task GetDomains(GetDomainsCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetDomainsCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/CertificateErrorAction.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Security/CertificateErrorAction.cs deleted file mode 100644 index 4a575ce0d40de..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/CertificateErrorAction.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Security -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// The action to take when a certificate error occurs. continue will continue processing the - /// request and cancel will cancel the request. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CertificateErrorAction - { - [EnumMember(Value = "continue")] - Continue, - [EnumMember(Value = "cancel")] - Cancel, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/CertificateErrorEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Security/CertificateErrorEventArgs.cs deleted file mode 100644 index a30125f7b85da..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/CertificateErrorEventArgs.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Security -{ - using System; - using Newtonsoft.Json; - - /// - /// There is a certificate error. If overriding certificate errors is enabled, then it should be - /// handled with the `handleCertificateError` command. Note: this event does not fire if the - /// certificate error has been allowed internally. Only one client per target should override - /// certificate errors at the same time. - /// - public sealed class CertificateErrorEventArgs : EventArgs - { - /// - /// The ID of the event. - /// - [JsonProperty("eventId")] - public long EventId - { - get; - set; - } - /// - /// The type of the error. - /// - [JsonProperty("errorType")] - public string ErrorType - { - get; - set; - } - /// - /// The url that was requested. - /// - [JsonProperty("requestURL")] - public string RequestURL - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/DisableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Security/DisableCommand.cs deleted file mode 100644 index 94a9aa3a9611f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/DisableCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Security -{ - using Newtonsoft.Json; - - /// - /// Disables tracking security state changes. - /// - public sealed class DisableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Security.disable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class DisableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/EnableCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Security/EnableCommand.cs deleted file mode 100644 index 08c2f2d173c92..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/EnableCommand.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Security -{ - using Newtonsoft.Json; - - /// - /// Enables tracking security state changes. - /// - public sealed class EnableCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Security.enable"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class EnableCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/HandleCertificateErrorCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Security/HandleCertificateErrorCommand.cs deleted file mode 100644 index 632ea7733b0d2..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/HandleCertificateErrorCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Security -{ - using Newtonsoft.Json; - - /// - /// Handles a certificate error that fired a certificateError event. - /// - public sealed class HandleCertificateErrorCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Security.handleCertificateError"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// The ID of the event. - /// - [JsonProperty("eventId")] - public long EventId - { - get; - set; - } - /// - /// The action to take on the certificate error. - /// - [JsonProperty("action")] - public CertificateErrorAction Action - { - get; - set; - } - } - - public sealed class HandleCertificateErrorCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/InsecureContentStatus.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Security/InsecureContentStatus.cs deleted file mode 100644 index 3b2c3c5ae9709..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/InsecureContentStatus.cs +++ /dev/null @@ -1,74 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Security -{ - using Newtonsoft.Json; - - /// - /// Information about insecure content on the page. - /// - public sealed class InsecureContentStatus - { - /// - /// Always false. - /// - [JsonProperty("ranMixedContent")] - public bool RanMixedContent - { - get; - set; - } - /// - /// Always false. - /// - [JsonProperty("displayedMixedContent")] - public bool DisplayedMixedContent - { - get; - set; - } - /// - /// Always false. - /// - [JsonProperty("containedMixedForm")] - public bool ContainedMixedForm - { - get; - set; - } - /// - /// Always false. - /// - [JsonProperty("ranContentWithCertErrors")] - public bool RanContentWithCertErrors - { - get; - set; - } - /// - /// Always false. - /// - [JsonProperty("displayedContentWithCertErrors")] - public bool DisplayedContentWithCertErrors - { - get; - set; - } - /// - /// Always set to unknown. - /// - [JsonProperty("ranInsecureContentStyle")] - public SecurityState RanInsecureContentStyle - { - get; - set; - } - /// - /// Always set to unknown. - /// - [JsonProperty("displayedInsecureContentStyle")] - public SecurityState DisplayedInsecureContentStyle - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/MixedContentType.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Security/MixedContentType.cs deleted file mode 100644 index 412090e45d944..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/MixedContentType.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Security -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// A description of mixed content (HTTP resources on HTTPS pages), as defined by - /// https://www.w3.org/TR/mixed-content/#categories - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum MixedContentType - { - [EnumMember(Value = "blockable")] - Blockable, - [EnumMember(Value = "optionally-blockable")] - OptionallyBlockable, - [EnumMember(Value = "none")] - None, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SecurityAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SecurityAdapter.cs deleted file mode 100644 index 4fb6856279203..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SecurityAdapter.cs +++ /dev/null @@ -1,112 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Security -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the Security domain to simplify the command interface. - /// - public class SecurityAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "Security"; - private Dictionary m_eventMap = new Dictionary(); - - public SecurityAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - m_eventMap["certificateError"] = new DevToolsEventData(typeof(CertificateErrorEventArgs), OnCertificateError); - m_eventMap["securityStateChanged"] = new DevToolsEventData(typeof(SecurityStateChangedEventArgs), OnSecurityStateChanged); - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - /// - /// There is a certificate error. If overriding certificate errors is enabled, then it should be - /// handled with the `handleCertificateError` command. Note: this event does not fire if the - /// certificate error has been allowed internally. Only one client per target should override - /// certificate errors at the same time. - /// - public event EventHandler CertificateError; - /// - /// The security state of the page changed. - /// - public event EventHandler SecurityStateChanged; - - /// - /// Disables tracking security state changes. - /// - public async Task Disable(DisableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new DisableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enables tracking security state changes. - /// - public async Task Enable(EnableCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new EnableCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enable/disable whether all certificate errors should be ignored. - /// - public async Task SetIgnoreCertificateErrors(SetIgnoreCertificateErrorsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Handles a certificate error that fired a certificateError event. - /// - public async Task HandleCertificateError(HandleCertificateErrorCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enable/disable overriding certificate errors. If enabled, all certificate error events need to - /// be handled by the DevTools client and should be answered with `handleCertificateError` commands. - /// - public async Task SetOverrideCertificateErrors(SetOverrideCertificateErrorsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - private void OnCertificateError(object rawEventArgs) - { - CertificateErrorEventArgs e = rawEventArgs as CertificateErrorEventArgs; - if (e != null && CertificateError != null) - { - CertificateError(this, e); - } - } - private void OnSecurityStateChanged(object rawEventArgs) - { - SecurityStateChangedEventArgs e = rawEventArgs as SecurityStateChangedEventArgs; - if (e != null && SecurityStateChanged != null) - { - SecurityStateChanged(this, e); - } - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SecurityState.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SecurityState.cs deleted file mode 100644 index 719a38bd78bae..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SecurityState.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Security -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime.Serialization; - - /// - /// The security level of a page or resource. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SecurityState - { - [EnumMember(Value = "unknown")] - Unknown, - [EnumMember(Value = "neutral")] - Neutral, - [EnumMember(Value = "insecure")] - Insecure, - [EnumMember(Value = "secure")] - Secure, - [EnumMember(Value = "info")] - Info, - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SecurityStateChangedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SecurityStateChangedEventArgs.cs deleted file mode 100644 index 1878d58651635..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SecurityStateChangedEventArgs.cs +++ /dev/null @@ -1,58 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Security -{ - using System; - using Newtonsoft.Json; - - /// - /// The security state of the page changed. - /// - public sealed class SecurityStateChangedEventArgs : EventArgs - { - /// - /// Security state. - /// - [JsonProperty("securityState")] - public SecurityState SecurityState - { - get; - set; - } - /// - /// True if the page was loaded over cryptographic transport such as HTTPS. - /// - [JsonProperty("schemeIsCryptographic")] - public bool SchemeIsCryptographic - { - get; - set; - } - /// - /// List of explanations for the security state. If the overall security state is `insecure` or - /// `warning`, at least one corresponding explanation should be included. - /// - [JsonProperty("explanations")] - public SecurityStateExplanation[] Explanations - { - get; - set; - } - /// - /// Information about insecure content on the page. - /// - [JsonProperty("insecureContentStatus")] - public InsecureContentStatus InsecureContentStatus - { - get; - set; - } - /// - /// Overrides user-visible description of the state. - /// - [JsonProperty("summary", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string Summary - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SecurityStateExplanation.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SecurityStateExplanation.cs deleted file mode 100644 index baef8d0212e97..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SecurityStateExplanation.cs +++ /dev/null @@ -1,74 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Security -{ - using Newtonsoft.Json; - - /// - /// An explanation of an factor contributing to the security state. - /// - public sealed class SecurityStateExplanation - { - /// - /// Security state representing the severity of the factor being explained. - /// - [JsonProperty("securityState")] - public SecurityState SecurityState - { - get; - set; - } - /// - /// Title describing the type of factor. - /// - [JsonProperty("title")] - public string Title - { - get; - set; - } - /// - /// Short phrase describing the type of factor. - /// - [JsonProperty("summary")] - public string Summary - { - get; - set; - } - /// - /// Full text explanation of the factor. - /// - [JsonProperty("description")] - public string Description - { - get; - set; - } - /// - /// The type of mixed content described by the explanation. - /// - [JsonProperty("mixedContentType")] - public MixedContentType MixedContentType - { - get; - set; - } - /// - /// Page certificate. - /// - [JsonProperty("certificate")] - public string[] Certificate - { - get; - set; - } - /// - /// Recommendations to fix any issues. - /// - [JsonProperty("recommendations", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string[] Recommendations - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SetIgnoreCertificateErrorsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SetIgnoreCertificateErrorsCommand.cs deleted file mode 100644 index 999c4816c4331..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SetIgnoreCertificateErrorsCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Security -{ - using Newtonsoft.Json; - - /// - /// Enable/disable whether all certificate errors should be ignored. - /// - public sealed class SetIgnoreCertificateErrorsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Security.setIgnoreCertificateErrors"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// If true, all certificate errors will be ignored. - /// - [JsonProperty("ignore")] - public bool Ignore - { - get; - set; - } - } - - public sealed class SetIgnoreCertificateErrorsCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SetOverrideCertificateErrorsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SetOverrideCertificateErrorsCommand.cs deleted file mode 100644 index b1c167341025a..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Security/SetOverrideCertificateErrorsCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Security -{ - using Newtonsoft.Json; - - /// - /// Enable/disable overriding certificate errors. If enabled, all certificate error events need to - /// be handled by the DevTools client and should be answered with `handleCertificateError` commands. - /// - public sealed class SetOverrideCertificateErrorsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Security.setOverrideCertificateErrors"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// If true, certificate errors will be overridden. - /// - [JsonProperty("override")] - public bool Override - { - get; - set; - } - } - - public sealed class SetOverrideCertificateErrorsCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/ActivateTargetCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/ActivateTargetCommand.cs deleted file mode 100644 index 73f5bfae24a51..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/ActivateTargetCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// Activates (focuses) the target. - /// - public sealed class ActivateTargetCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Target.activateTarget"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the targetId - /// - [JsonProperty("targetId")] - public string TargetId - { - get; - set; - } - } - - public sealed class ActivateTargetCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/AttachToBrowserTargetCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/AttachToBrowserTargetCommand.cs deleted file mode 100644 index caab5db34071d..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/AttachToBrowserTargetCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// Attaches to the browser target, only uses flat sessionId mode. - /// - public sealed class AttachToBrowserTargetCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Target.attachToBrowserTarget"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class AttachToBrowserTargetCommandResponse : ICommandResponse - { - /// - /// Id assigned to the session. - /// - [JsonProperty("sessionId")] - public string SessionId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/AttachToTargetCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/AttachToTargetCommand.cs deleted file mode 100644 index ed754cda7458b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/AttachToTargetCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// Attaches to the target with given id. - /// - public sealed class AttachToTargetCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Target.attachToTarget"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the targetId - /// - [JsonProperty("targetId")] - public string TargetId - { - get; - set; - } - /// - /// Enables "flat" access to the session via specifying sessionId attribute in the commands. - /// - [JsonProperty("flatten", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Flatten - { - get; - set; - } - } - - public sealed class AttachToTargetCommandResponse : ICommandResponse - { - /// - /// Id assigned to the session. - /// - [JsonProperty("sessionId")] - public string SessionId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/AttachedToTargetEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/AttachedToTargetEventArgs.cs deleted file mode 100644 index 844fba8fe42c2..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/AttachedToTargetEventArgs.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using System; - using Newtonsoft.Json; - - /// - /// Issued when attached to target because of auto-attach or `attachToTarget` command. - /// - public sealed class AttachedToTargetEventArgs : EventArgs - { - /// - /// Identifier assigned to the session used to send/receive messages. - /// - [JsonProperty("sessionId")] - public string SessionId - { - get; - set; - } - /// - /// Gets or sets the targetInfo - /// - [JsonProperty("targetInfo")] - public TargetInfo TargetInfo - { - get; - set; - } - /// - /// Gets or sets the waitingForDebugger - /// - [JsonProperty("waitingForDebugger")] - public bool WaitingForDebugger - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/CloseTargetCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/CloseTargetCommand.cs deleted file mode 100644 index 8a5c5bf04edf7..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/CloseTargetCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// Closes the target. If the target is a page that gets closed too. - /// - public sealed class CloseTargetCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Target.closeTarget"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the targetId - /// - [JsonProperty("targetId")] - public string TargetId - { - get; - set; - } - } - - public sealed class CloseTargetCommandResponse : ICommandResponse - { - /// - /// Gets or sets the success - /// - [JsonProperty("success")] - public bool Success - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/CreateBrowserContextCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/CreateBrowserContextCommand.cs deleted file mode 100644 index 35b0c05848356..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/CreateBrowserContextCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than - /// one. - /// - public sealed class CreateBrowserContextCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Target.createBrowserContext"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class CreateBrowserContextCommandResponse : ICommandResponse - { - /// - /// The id of the context created. - /// - [JsonProperty("browserContextId")] - public string BrowserContextId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/CreateTargetCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/CreateTargetCommand.cs deleted file mode 100644 index c067e3d5915c8..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/CreateTargetCommand.cs +++ /dev/null @@ -1,92 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// Creates a new page. - /// - public sealed class CreateTargetCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Target.createTarget"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// The initial URL the page will be navigated to. - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Frame width in DIP (headless chrome only). - /// - [JsonProperty("width", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Width - { - get; - set; - } - /// - /// Frame height in DIP (headless chrome only). - /// - [JsonProperty("height", DefaultValueHandling = DefaultValueHandling.Ignore)] - public long? Height - { - get; - set; - } - /// - /// The browser context to create the page in. - /// - [JsonProperty("browserContextId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string BrowserContextId - { - get; - set; - } - /// - /// Whether BeginFrames for this target will be controlled via DevTools (headless chrome only, - /// not supported on MacOS yet, false by default). - /// - [JsonProperty("enableBeginFrameControl", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? EnableBeginFrameControl - { - get; - set; - } - - [JsonProperty("newWindow", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? NewWindow - { - get; - set; - } - - [JsonProperty("background", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Background - { - get; - set; - } - } - - public sealed class CreateTargetCommandResponse : ICommandResponse - { - /// - /// The id of the page opened. - /// - [JsonProperty("targetId")] - public string TargetId - { - get; - set; - } - } -} diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/DetachFromTargetCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/DetachFromTargetCommand.cs deleted file mode 100644 index 1304eb7e592d0..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/DetachFromTargetCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// Detaches session with given id. - /// - public sealed class DetachFromTargetCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Target.detachFromTarget"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Session to detach. - /// - [JsonProperty("sessionId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string SessionId - { - get; - set; - } - /// - /// Deprecated. - /// - [JsonProperty("targetId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string TargetId - { - get; - set; - } - } - - public sealed class DetachFromTargetCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/DetachedFromTargetEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/DetachedFromTargetEventArgs.cs deleted file mode 100644 index 008a7c01cbe3f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/DetachedFromTargetEventArgs.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using System; - using Newtonsoft.Json; - - /// - /// Issued when detached from target for any reason (including `detachFromTarget` command). Can be - /// issued multiple times per target if multiple sessions have been attached to it. - /// - public sealed class DetachedFromTargetEventArgs : EventArgs - { - /// - /// Detached session identifier. - /// - [JsonProperty("sessionId")] - public string SessionId - { - get; - set; - } - /// - /// Deprecated. - /// - [JsonProperty("targetId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string TargetId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/DisposeBrowserContextCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/DisposeBrowserContextCommand.cs deleted file mode 100644 index 957d5d578e4ae..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/DisposeBrowserContextCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// Deletes a BrowserContext. All the belonging pages will be closed without calling their - /// beforeunload hooks. - /// - public sealed class DisposeBrowserContextCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Target.disposeBrowserContext"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the browserContextId - /// - [JsonProperty("browserContextId")] - public string BrowserContextId - { - get; - set; - } - } - - public sealed class DisposeBrowserContextCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/ExposeDevToolsProtocolCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/ExposeDevToolsProtocolCommand.cs deleted file mode 100644 index 08f383c3ca06b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/ExposeDevToolsProtocolCommand.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// Inject object to the target's main frame that provides a communication - /// channel with browser target. - /// - /// Injected object will be available as `window[bindingName]`. - /// - /// The object has the follwing API: - /// - `binding.send(json)` - a method to send messages over the remote debugging protocol - /// - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses. - /// - public sealed class ExposeDevToolsProtocolCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Target.exposeDevToolsProtocol"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the targetId - /// - [JsonProperty("targetId")] - public string TargetId - { - get; - set; - } - /// - /// Binding name, 'cdp' if not specified. - /// - [JsonProperty("bindingName", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string BindingName - { - get; - set; - } - } - - public sealed class ExposeDevToolsProtocolCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/GetBrowserContextsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/GetBrowserContextsCommand.cs deleted file mode 100644 index a2e73f7a42abe..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/GetBrowserContextsCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// Returns all browser contexts created with `Target.createBrowserContext` method. - /// - public sealed class GetBrowserContextsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Target.getBrowserContexts"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetBrowserContextsCommandResponse : ICommandResponse - { - /// - /// An array of browser context ids. - /// - [JsonProperty("browserContextIds")] - public string[] BrowserContextIds - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/GetTargetInfoCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/GetTargetInfoCommand.cs deleted file mode 100644 index f93ac72700891..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/GetTargetInfoCommand.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// Returns information about a target. - /// - public sealed class GetTargetInfoCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Target.getTargetInfo"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the targetId - /// - [JsonProperty("targetId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string TargetId - { - get; - set; - } - } - - public sealed class GetTargetInfoCommandResponse : ICommandResponse - { - /// - /// Gets or sets the targetInfo - /// - [JsonProperty("targetInfo")] - public TargetInfo TargetInfo - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/GetTargetsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/GetTargetsCommand.cs deleted file mode 100644 index eb8ec374bc41b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/GetTargetsCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// Retrieves a list of available targets. - /// - public sealed class GetTargetsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Target.getTargets"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - } - - public sealed class GetTargetsCommandResponse : ICommandResponse - { - /// - /// The list of targets. - /// - [JsonProperty("targetInfos")] - public TargetInfo[] TargetInfos - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/ReceivedMessageFromTargetEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/ReceivedMessageFromTargetEventArgs.cs deleted file mode 100644 index e076241f09c10..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/ReceivedMessageFromTargetEventArgs.cs +++ /dev/null @@ -1,40 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using System; - using Newtonsoft.Json; - - /// - /// Notifies about a new protocol message received from the session (as reported in - /// `attachedToTarget` event). - /// - public sealed class ReceivedMessageFromTargetEventArgs : EventArgs - { - /// - /// Identifier of a session which sends a message. - /// - [JsonProperty("sessionId")] - public string SessionId - { - get; - set; - } - /// - /// Gets or sets the message - /// - [JsonProperty("message")] - public string Message - { - get; - set; - } - /// - /// Deprecated. - /// - [JsonProperty("targetId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string TargetId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/RemoteLocation.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/RemoteLocation.cs deleted file mode 100644 index 4eb0fb45a47d8..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/RemoteLocation.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// RemoteLocation - /// - public sealed class RemoteLocation - { - /// - /// host - /// - [JsonProperty("host")] - public string Host - { - get; - set; - } - /// - /// port - /// - [JsonProperty("port")] - public long Port - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/SendMessageToTargetCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/SendMessageToTargetCommand.cs deleted file mode 100644 index 083072f0b9629..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/SendMessageToTargetCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// Sends protocol message over session with given id. - /// - public sealed class SendMessageToTargetCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Target.sendMessageToTarget"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Gets or sets the message - /// - [JsonProperty("message")] - public string Message - { - get; - set; - } - /// - /// Identifier of the session. - /// - [JsonProperty("sessionId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string SessionId - { - get; - set; - } - /// - /// Deprecated. - /// - [JsonProperty("targetId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string TargetId - { - get; - set; - } - } - - public sealed class SendMessageToTargetCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/SetAutoAttachCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/SetAutoAttachCommand.cs deleted file mode 100644 index 8b572ca78c0a7..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/SetAutoAttachCommand.cs +++ /dev/null @@ -1,53 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// Controls whether to automatically attach to new targets which are considered to be related to - /// this one. When turned on, attaches to all existing related targets as well. When turned off, - /// automatically detaches from all currently attached targets. - /// - public sealed class SetAutoAttachCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Target.setAutoAttach"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Whether to auto-attach to related targets. - /// - [JsonProperty("autoAttach")] - public bool AutoAttach - { - get; - set; - } - /// - /// Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger` - /// to run paused targets. - /// - [JsonProperty("waitForDebuggerOnStart")] - public bool WaitForDebuggerOnStart - { - get; - set; - } - /// - /// Enables "flat" access to the session via specifying sessionId attribute in the commands. - /// - [JsonProperty("flatten", DefaultValueHandling = DefaultValueHandling.Ignore)] - public bool? Flatten - { - get; - set; - } - } - - public sealed class SetAutoAttachCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/SetDiscoverTargetsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/SetDiscoverTargetsCommand.cs deleted file mode 100644 index 31039819a541f..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/SetDiscoverTargetsCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// Controls whether to discover available targets and notify via - /// `targetCreated/targetInfoChanged/targetDestroyed` events. - /// - public sealed class SetDiscoverTargetsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Target.setDiscoverTargets"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// Whether to discover available targets. - /// - [JsonProperty("discover")] - public bool Discover - { - get; - set; - } - } - - public sealed class SetDiscoverTargetsCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/SetRemoteLocationsCommand.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/SetRemoteLocationsCommand.cs deleted file mode 100644 index 0d049f67dc546..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/SetRemoteLocationsCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// Enables target discovery for the specified locations, when `setDiscoverTargets` was set to - /// `true`. - /// - public sealed class SetRemoteLocationsCommandSettings : ICommand - { - private const string DevToolsRemoteInterface_CommandName = "Target.setRemoteLocations"; - - [JsonIgnore] - public string CommandName - { - get { return DevToolsRemoteInterface_CommandName; } - } - - /// - /// List of remote locations. - /// - [JsonProperty("locations")] - public RemoteLocation[] Locations - { - get; - set; - } - } - - public sealed class SetRemoteLocationsCommandResponse : ICommandResponse - { - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetAdapter.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetAdapter.cs deleted file mode 100644 index 87281e50966fc..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetAdapter.cs +++ /dev/null @@ -1,266 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Represents an adapter for the Target domain to simplify the command interface. - /// - public class TargetAdapter - { - private readonly DevToolsSession m_session; - private readonly string m_domainName = "Target"; - private Dictionary m_eventMap = new Dictionary(); - - public TargetAdapter(DevToolsSession session) - { - m_session = session ?? throw new ArgumentNullException(nameof(session)); - m_session.DevToolsEventReceived += OnDevToolsEventReceived; - m_eventMap["attachedToTarget"] = new DevToolsEventData(typeof(AttachedToTargetEventArgs), OnAttachedToTarget); - m_eventMap["detachedFromTarget"] = new DevToolsEventData(typeof(DetachedFromTargetEventArgs), OnDetachedFromTarget); - m_eventMap["receivedMessageFromTarget"] = new DevToolsEventData(typeof(ReceivedMessageFromTargetEventArgs), OnReceivedMessageFromTarget); - m_eventMap["targetCreated"] = new DevToolsEventData(typeof(TargetCreatedEventArgs), OnTargetCreated); - m_eventMap["targetDestroyed"] = new DevToolsEventData(typeof(TargetDestroyedEventArgs), OnTargetDestroyed); - m_eventMap["targetCrashed"] = new DevToolsEventData(typeof(TargetCrashedEventArgs), OnTargetCrashed); - m_eventMap["targetInfoChanged"] = new DevToolsEventData(typeof(TargetInfoChangedEventArgs), OnTargetInfoChanged); - } - - /// - /// Gets the DevToolsSession associated with the adapter. - /// - public DevToolsSession Session - { - get { return m_session; } - } - - /// - /// Issued when attached to target because of auto-attach or `attachToTarget` command. - /// - public event EventHandler AttachedToTarget; - /// - /// Issued when detached from target for any reason (including `detachFromTarget` command). Can be - /// issued multiple times per target if multiple sessions have been attached to it. - /// - public event EventHandler DetachedFromTarget; - /// - /// Notifies about a new protocol message received from the session (as reported in - /// `attachedToTarget` event). - /// - public event EventHandler ReceivedMessageFromTarget; - /// - /// Issued when a possible inspection target is created. - /// - public event EventHandler TargetCreated; - /// - /// Issued when a target is destroyed. - /// - public event EventHandler TargetDestroyed; - /// - /// Issued when a target has crashed. - /// - public event EventHandler TargetCrashed; - /// - /// Issued when some information about a target has changed. This only happens between - /// `targetCreated` and `targetDestroyed`. - /// - public event EventHandler TargetInfoChanged; - - /// - /// Activates (focuses) the target. - /// - public async Task ActivateTarget(ActivateTargetCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Attaches to the target with given id. - /// - public async Task AttachToTarget(AttachToTargetCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Attaches to the browser target, only uses flat sessionId mode. - /// - public async Task AttachToBrowserTarget(AttachToBrowserTargetCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new AttachToBrowserTargetCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Closes the target. If the target is a page that gets closed too. - /// - public async Task CloseTarget(CloseTargetCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Inject object to the target's main frame that provides a communication - /// channel with browser target. - /// - /// Injected object will be available as `window[bindingName]`. - /// - /// The object has the follwing API: - /// - `binding.send(json)` - a method to send messages over the remote debugging protocol - /// - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses. - /// - public async Task ExposeDevToolsProtocol(ExposeDevToolsProtocolCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than - /// one. - /// - public async Task CreateBrowserContext(CreateBrowserContextCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new CreateBrowserContextCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns all browser contexts created with `Target.createBrowserContext` method. - /// - public async Task GetBrowserContexts(GetBrowserContextsCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetBrowserContextsCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Creates a new page. - /// - public async Task CreateTarget(CreateTargetCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Detaches session with given id. - /// - public async Task DetachFromTarget(DetachFromTargetCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Deletes a BrowserContext. All the belonging pages will be closed without calling their - /// beforeunload hooks. - /// - public async Task DisposeBrowserContext(DisposeBrowserContextCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Returns information about a target. - /// - public async Task GetTargetInfo(GetTargetInfoCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Retrieves a list of available targets. - /// - public async Task GetTargets(GetTargetsCommandSettings command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command ?? new GetTargetsCommandSettings(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Sends protocol message over session with given id. - /// - public async Task SendMessageToTarget(SendMessageToTargetCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Controls whether to automatically attach to new targets which are considered to be related to - /// this one. When turned on, attaches to all existing related targets as well. When turned off, - /// automatically detaches from all currently attached targets. - /// - public async Task SetAutoAttach(SetAutoAttachCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Controls whether to discover available targets and notify via - /// `targetCreated/targetInfoChanged/targetDestroyed` events. - /// - public async Task SetDiscoverTargets(SetDiscoverTargetsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - /// - /// Enables target discovery for the specified locations, when `setDiscoverTargets` was set to - /// `true`. - /// - public async Task SetRemoteLocations(SetRemoteLocationsCommandSettings command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) - { - return await m_session.SendCommand(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); - } - - private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) - { - if (e.DomainName == m_domainName) - { - if (m_eventMap.ContainsKey(e.EventName)) - { - var eventData = m_eventMap[e.EventName]; - var eventArgs = e.EventData.ToObject(eventData.EventArgsType); - eventData.EventInvoker(eventArgs); - } - } - } - - private void OnAttachedToTarget(object rawEventArgs) - { - AttachedToTargetEventArgs e = rawEventArgs as AttachedToTargetEventArgs; - if (e != null && AttachedToTarget != null) - { - AttachedToTarget(this, e); - } - } - private void OnDetachedFromTarget(object rawEventArgs) - { - DetachedFromTargetEventArgs e = rawEventArgs as DetachedFromTargetEventArgs; - if (e != null && DetachedFromTarget != null) - { - DetachedFromTarget(this, e); - } - } - private void OnReceivedMessageFromTarget(object rawEventArgs) - { - ReceivedMessageFromTargetEventArgs e = rawEventArgs as ReceivedMessageFromTargetEventArgs; - if (e != null && ReceivedMessageFromTarget != null) - { - ReceivedMessageFromTarget(this, e); - } - } - private void OnTargetCreated(object rawEventArgs) - { - TargetCreatedEventArgs e = rawEventArgs as TargetCreatedEventArgs; - if (e != null && TargetCreated != null) - { - TargetCreated(this, e); - } - } - private void OnTargetDestroyed(object rawEventArgs) - { - TargetDestroyedEventArgs e = rawEventArgs as TargetDestroyedEventArgs; - if (e != null && TargetDestroyed != null) - { - TargetDestroyed(this, e); - } - } - private void OnTargetCrashed(object rawEventArgs) - { - TargetCrashedEventArgs e = rawEventArgs as TargetCrashedEventArgs; - if (e != null && TargetCrashed != null) - { - TargetCrashed(this, e); - } - } - private void OnTargetInfoChanged(object rawEventArgs) - { - TargetInfoChangedEventArgs e = rawEventArgs as TargetInfoChangedEventArgs; - if (e != null && TargetInfoChanged != null) - { - TargetInfoChanged(this, e); - } - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetCrashedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetCrashedEventArgs.cs deleted file mode 100644 index 4f906cad5feeb..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetCrashedEventArgs.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using System; - using Newtonsoft.Json; - - /// - /// Issued when a target has crashed. - /// - public sealed class TargetCrashedEventArgs : EventArgs - { - /// - /// Gets or sets the targetId - /// - [JsonProperty("targetId")] - public string TargetId - { - get; - set; - } - /// - /// Termination status type. - /// - [JsonProperty("status")] - public string Status - { - get; - set; - } - /// - /// Termination error code. - /// - [JsonProperty("errorCode")] - public long ErrorCode - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetCreatedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetCreatedEventArgs.cs deleted file mode 100644 index f620e109c5283..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetCreatedEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using System; - using Newtonsoft.Json; - - /// - /// Issued when a possible inspection target is created. - /// - public sealed class TargetCreatedEventArgs : EventArgs - { - /// - /// Gets or sets the targetInfo - /// - [JsonProperty("targetInfo")] - public TargetInfo TargetInfo - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetDestroyedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetDestroyedEventArgs.cs deleted file mode 100644 index cd9e6ff4bcb3c..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetDestroyedEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using System; - using Newtonsoft.Json; - - /// - /// Issued when a target is destroyed. - /// - public sealed class TargetDestroyedEventArgs : EventArgs - { - /// - /// Gets or sets the targetId - /// - [JsonProperty("targetId")] - public string TargetId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetInfo.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetInfo.cs deleted file mode 100644 index b42673c336f4b..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetInfo.cs +++ /dev/null @@ -1,74 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using Newtonsoft.Json; - - /// - /// TargetInfo - /// - public sealed class TargetInfo - { - /// - /// targetId - /// - [JsonProperty("targetId")] - public string TargetId - { - get; - set; - } - /// - /// type - /// - [JsonProperty("type")] - public string Type - { - get; - set; - } - /// - /// title - /// - [JsonProperty("title")] - public string Title - { - get; - set; - } - /// - /// url - /// - [JsonProperty("url")] - public string Url - { - get; - set; - } - /// - /// Whether the target has an attached client. - /// - [JsonProperty("attached")] - public bool Attached - { - get; - set; - } - /// - /// Opener target Id - /// - [JsonProperty("openerId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string OpenerId - { - get; - set; - } - /// - /// browserContextId - /// - [JsonProperty("browserContextId", DefaultValueHandling = DefaultValueHandling.Ignore)] - public string BrowserContextId - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetInfoChangedEventArgs.cs b/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetInfoChangedEventArgs.cs deleted file mode 100644 index 8806373f05172..0000000000000 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/Target/TargetInfoChangedEventArgs.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace OpenQA.Selenium.DevTools.Target -{ - using System; - using Newtonsoft.Json; - - /// - /// Issued when some information about a target has changed. This only happens between - /// `targetCreated` and `targetDestroyed`. - /// - public sealed class TargetInfoChangedEventArgs : EventArgs - { - /// - /// Gets or sets the targetInfo - /// - [JsonProperty("targetInfo")] - public TargetInfo TargetInfo - { - get; - set; - } - } -} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/BUILD.bazel b/dotnet/src/webdriver/DevTools/BUILD.bazel new file mode 100644 index 0000000000000..b3d25e76cc198 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/BUILD.bazel @@ -0,0 +1,18 @@ +load("//dotnet:generate-devtools.bzl", "generate_devtools") + +SUPPORTED_DEVTOOLS_VERSIONS = [ + "v84", + "v85", + "v86", +] + +[generate_devtools( + name = "generate-{}".format(devtools_version), + src = "{}/generator_settings.json".format(devtools_version), + out = "{}".format(devtools_version), + browser_protocol = "//common/devtools/chromium/{}:browser_protocol".format(devtools_version), + js_protocol = "//common/devtools/chromium/{}:js_protocol".format(devtools_version), + template = "//third_party/dotnet/devtools/src/generator/Templates:command.hbs", + generator = "//third_party/dotnet/devtools/src/generator:generator", + visibility = ["//visibility:public"], +) for devtools_version in SUPPORTED_DEVTOOLS_VERSIONS] diff --git a/dotnet/src/webdriver/DevTools/BindingCalledEventArgs.cs b/dotnet/src/webdriver/DevTools/BindingCalledEventArgs.cs new file mode 100644 index 0000000000000..8f35b65b11ff6 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/BindingCalledEventArgs.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenQA.Selenium.DevTools +{ + public class BindingCalledEventArgs : EventArgs + { + public long ExecutionContextId { get; internal set; } + public string Name { get; internal set; } + public string Payload { get; internal set; } + } +} diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/CommandResponseException.cs b/dotnet/src/webdriver/DevTools/CommandResponseException.cs similarity index 100% rename from dotnet/src/webdriver/DevTools/AutoGenerated/CommandResponseException.cs rename to dotnet/src/webdriver/DevTools/CommandResponseException.cs diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/CommandResponseExtensions.cs b/dotnet/src/webdriver/DevTools/CommandResponseExtensions.cs similarity index 100% rename from dotnet/src/webdriver/DevTools/AutoGenerated/CommandResponseExtensions.cs rename to dotnet/src/webdriver/DevTools/CommandResponseExtensions.cs diff --git a/dotnet/src/webdriver/DevTools/CommandResponseTypeMap.cs b/dotnet/src/webdriver/DevTools/CommandResponseTypeMap.cs new file mode 100644 index 0000000000000..ede9f5d5da619 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/CommandResponseTypeMap.cs @@ -0,0 +1,27 @@ +namespace OpenQA.Selenium.DevTools +{ + using System; + using System.Collections.Generic; + + public class CommandResponseTypeMap + { + private readonly IDictionary commandResponseTypeDictionary = new Dictionary(); + + public void AddCommandResponseType(Type commandSettingsType, Type commandResponseType) + { + if (!commandResponseTypeDictionary.ContainsKey(commandSettingsType)) + { + commandResponseTypeDictionary.Add(commandSettingsType, commandResponseType); + } + } + + /// + /// Gets the command response type corresponding to the specified command type + /// + public bool TryGetCommandResponseType(out Type commandResponseType) + where T : ICommand + { + return commandResponseTypeDictionary.TryGetValue(typeof(T), out commandResponseType); + } + } +} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/ConsoleApiArgument.cs b/dotnet/src/webdriver/DevTools/ConsoleApiArgument.cs new file mode 100644 index 0000000000000..fb1b1db930e95 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/ConsoleApiArgument.cs @@ -0,0 +1,8 @@ +namespace OpenQA.Selenium.DevTools +{ + public class ConsoleApiArgument + { + public string Type { get; set; } + public string Value { get; set; } + } +} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/ConsoleApiCalledEventArgs.cs b/dotnet/src/webdriver/DevTools/ConsoleApiCalledEventArgs.cs new file mode 100644 index 0000000000000..ef5fadb66212a --- /dev/null +++ b/dotnet/src/webdriver/DevTools/ConsoleApiCalledEventArgs.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenQA.Selenium.DevTools +{ + public class ConsoleApiCalledEventArgs : EventArgs + { + public DateTime Timestamp { get; set; } + public string Type { get; set; } + + public List Arguments { get; set; } + } +} diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsCommandData.cs b/dotnet/src/webdriver/DevTools/DevToolsCommandData.cs similarity index 95% rename from dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsCommandData.cs rename to dotnet/src/webdriver/DevTools/DevToolsCommandData.cs index cffb88dc2b549..30244dd6e8c88 100644 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsCommandData.cs +++ b/dotnet/src/webdriver/DevTools/DevToolsCommandData.cs @@ -10,7 +10,7 @@ namespace OpenQA.Selenium.DevTools public class DevToolsCommandData { /// - /// Initializes a new instance of the DevToolsCommandInfo class. + /// Initializes a new instance of the DevToolsCommandData class. /// /// The ID of the commmand execution. /// The method name of the DevTools command. @@ -21,7 +21,7 @@ public DevToolsCommandData(long commandId, string commandName, JToken commandPar } /// - /// Initializes a new instance of the DevToolsCommandInfo class. + /// Initializes a new instance of the DevToolsCommandData class. /// /// The ID of the commmand execution. /// The session ID of the current command execution. diff --git a/dotnet/src/webdriver/DevTools/DevToolsDomainFactory.cs b/dotnet/src/webdriver/DevTools/DevToolsDomainFactory.cs new file mode 100644 index 0000000000000..6326ef504c112 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/DevToolsDomainFactory.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Net.NetworkInformation; +using System.Reflection; +using System.Text; + +namespace OpenQA.Selenium.DevTools +{ + public static class DevToolsDomainFactory + { + // By default, we will look for a supported version within this + // number of versions, as that will most likely still work. + private static readonly int DefaultVersionRange = 5; + + // This is the list of known supported DevTools version implementation. + // Note carefully that it is sorted in reverse order, most recent + // version first, as that is more likely to match. When new versions + // are implemented for support, + private static readonly List SupportedDevToolsVersions = new List() + { + typeof(V86.V86Domains), + typeof(V85.V85Domains), + typeof(V84.V84Domains) + }; + + public static IDomains InitializeDomains(DevToolsVersionInfo versionInfo, DevToolsSession session) + { + return InitializeDomains(versionInfo, session, DefaultVersionRange); + } + + public static IDomains InitializeDomains(DevToolsVersionInfo versionInfo, DevToolsSession session, int versionRange) + { + if (versionRange < 0) + { + throw new ArgumentException("Version range must be positive", "versionRange"); + } + + IDomains domains = null; + int browserMajorVersion = 0; + bool versionParsed = int.TryParse(versionInfo.BrowserMajorVersion, out browserMajorVersion); + if (versionParsed) + { + Type domainType = MatchDomainsVersion(browserMajorVersion, versionRange); + ConstructorInfo constructor = domainType.GetConstructor(new Type[] { typeof(DevToolsSession) }); + if (constructor != null) + { + domains = constructor.Invoke(new object[] { session }) as IDomains; + } + } + + return domains; + } + + private static Type MatchDomainsVersion(int desiredVersion, int versionRange) + { + // Use reflection to look for a DevToolsVersion static field on every known domain implementation type + foreach (Type candidateType in SupportedDevToolsVersions) + { + FieldInfo info = candidateType.GetField("DevToolsVersion", BindingFlags.Static | BindingFlags.Public); + if (info != null) + { + object propertyValue = info.GetValue(null); + if (propertyValue != null) + { + // Match the version with the desired version within the version range + int candidateVersion = (int)propertyValue; + if (desiredVersion - candidateVersion < versionRange) + { + return candidateType; + } + } + } + } + + // TODO: Return a no-op implementation or throw exception. + return null; + } + } +} diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsEventData.cs b/dotnet/src/webdriver/DevTools/DevToolsEventData.cs similarity index 100% rename from dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsEventData.cs rename to dotnet/src/webdriver/DevTools/DevToolsEventData.cs diff --git a/dotnet/src/webdriver/DevTools/DevToolsExtensionMethods.cs b/dotnet/src/webdriver/DevTools/DevToolsExtensionMethods.cs index 105c2f7ae100e..ab2f77f4dba10 100644 --- a/dotnet/src/webdriver/DevTools/DevToolsExtensionMethods.cs +++ b/dotnet/src/webdriver/DevTools/DevToolsExtensionMethods.cs @@ -13,63 +13,63 @@ namespace OpenQA.Selenium.DevTools /// public static class DevToolsExtensionMethods { - /// - /// Translates a to the format to use with the Chrome DevTools Protocol cookie - /// manipulation methods. - /// - /// The to translate. - /// A command settings object suitable for use with the Chromium DevTools Protocol manipulation methods. - public static Network.SetCookieCommandSettings ToDevToolsSetCookieCommandSettings(this Cookie cookie) - { - Network.SetCookieCommandSettings commandSettings = new Network.SetCookieCommandSettings(); - commandSettings.Name = cookie.Name; - commandSettings.Value = cookie.Value; - commandSettings.Domain = cookie.Domain; - commandSettings.Path = cookie.Path; - commandSettings.HttpOnly = cookie.IsHttpOnly; - commandSettings.Secure = cookie.Secure; - commandSettings.Expires = cookie.ExpirySeconds; - return commandSettings; - } + ///// + ///// Translates a to the format to use with the Chrome DevTools Protocol cookie + ///// manipulation methods. + ///// + ///// The to translate. + ///// A command settings object suitable for use with the Chromium DevTools Protocol manipulation methods. + //public static Network.SetCookieCommandSettings ToDevToolsSetCookieCommandSettings(this Cookie cookie) + //{ + // Network.SetCookieCommandSettings commandSettings = new Network.SetCookieCommandSettings(); + // commandSettings.Name = cookie.Name; + // commandSettings.Value = cookie.Value; + // commandSettings.Domain = cookie.Domain; + // commandSettings.Path = cookie.Path; + // commandSettings.HttpOnly = cookie.IsHttpOnly; + // commandSettings.Secure = cookie.Secure; + // commandSettings.Expires = cookie.ExpirySeconds; + // return commandSettings; + //} - /// - /// Converts an array of Chrome DevTools Protocol cookie objects to a list of Selenium objects. - /// - /// The array of Chrome DevTools Protocol cookies to convert. - /// A ReadOnlyCollection of objects. - public static ReadOnlyCollection ToSeleniumCookies(this Network.Cookie[] cookies) - { - List seleniumCookies = new List(); - foreach(var cookie in cookies) - { - seleniumCookies.Add(cookie.ToSeleniumCookie()); - } + ///// + ///// Converts an array of Chrome DevTools Protocol cookie objects to a list of Selenium objects. + ///// + ///// The array of Chrome DevTools Protocol cookies to convert. + ///// A ReadOnlyCollection of objects. + //public static ReadOnlyCollection ToSeleniumCookies(this Network.Cookie[] cookies) + //{ + // List seleniumCookies = new List(); + // foreach(var cookie in cookies) + // { + // seleniumCookies.Add(cookie.ToSeleniumCookie()); + // } - return seleniumCookies.AsReadOnly(); - } + // return seleniumCookies.AsReadOnly(); + //} - /// - /// Converts a Chrome DevTools Protocol cookie object to a Selenium objects. - /// - /// The Chrome DevTools Protocol cookie to convert. - /// A Selenium object. - public static Cookie ToSeleniumCookie(this Network.Cookie cookie) - { - Dictionary cookieValues = new Dictionary(); - cookieValues["name"] = cookie.Name; - cookieValues["value"] = cookie.Value; - cookieValues["domain"] = cookie.Domain; - cookieValues["path"] = cookie.Path; - cookieValues["httpOnly"] = cookie.HttpOnly; - cookieValues["secure"] = cookie.Secure; - DateTime ? expires = null; - if (!cookie.Secure) - { - cookieValues["expiry"] = cookie.Expires; - } + ///// + ///// Converts a Chrome DevTools Protocol cookie object to a Selenium objects. + ///// + ///// The Chrome DevTools Protocol cookie to convert. + ///// A Selenium object. + //public static Cookie ToSeleniumCookie(this Network.Cookie cookie) + //{ + // Dictionary cookieValues = new Dictionary(); + // cookieValues["name"] = cookie.Name; + // cookieValues["value"] = cookie.Value; + // cookieValues["domain"] = cookie.Domain; + // cookieValues["path"] = cookie.Path; + // cookieValues["httpOnly"] = cookie.HttpOnly; + // cookieValues["secure"] = cookie.Secure; + // DateTime ? expires = null; + // if (!cookie.Secure) + // { + // cookieValues["expiry"] = cookie.Expires; + // } - Cookie seleniumCookie = Cookie.FromDictionary(cookieValues); - return seleniumCookie; - } + // Cookie seleniumCookie = Cookie.FromDictionary(cookieValues); + // return seleniumCookie; + //} } } diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsSession.cs b/dotnet/src/webdriver/DevTools/DevToolsSession.cs similarity index 63% rename from dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsSession.cs rename to dotnet/src/webdriver/DevTools/DevToolsSession.cs index c46adf2289956..7f0234d85f993 100644 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsSession.cs +++ b/dotnet/src/webdriver/DevTools/DevToolsSession.cs @@ -1,10 +1,10 @@ - namespace OpenQA.Selenium.DevTools { using System; using System.Collections.Concurrent; - using System.Diagnostics; + using System.Globalization; using System.IO; + using System.Net.Http; using System.Net.WebSockets; using System.Text; using System.Threading; @@ -13,34 +13,39 @@ namespace OpenQA.Selenium.DevTools using Newtonsoft.Json.Linq; /// - /// Represents a WebSocket connection to a running DevTools instance that can be used to send + /// Represents a WebSocket connection to a running DevTools instance that can be used to send /// commands and recieve events. /// - public partial class DevToolsSession : IDisposable + public class DevToolsSession : IDevToolsSession { - private readonly string m_endpointAddress; - private readonly TimeSpan m_closeConnectionWaitTimeSpan = TimeSpan.FromSeconds(2); + private readonly string debuggerEndpoint; + private string websocketAddress; + private readonly TimeSpan closeConnectionWaitTimeSpan = TimeSpan.FromSeconds(2); + + private ClientWebSocket sessionSocket; + private ConcurrentDictionary pendingCommands = new ConcurrentDictionary(); + private long currentCommandId = 0; - private ClientWebSocket m_sessionSocket; - private ConcurrentDictionary m_pendingCommands = new ConcurrentDictionary(); - private long m_currentCommandId = 0; + private IDomains domains; - private Task m_receiveTask; + private Task receiveTask; /// /// Initializes a new instance of the DevToolsSession class, using the specified WebSocket endpoint. /// /// public DevToolsSession(string endpointAddress) - : this() { if (String.IsNullOrWhiteSpace(endpointAddress)) + { throw new ArgumentNullException(nameof(endpointAddress)); + } - CommandTimeout = 5000; - m_endpointAddress = endpointAddress; + CommandTimeout = TimeSpan.FromSeconds(5); + this.debuggerEndpoint = endpointAddress; - m_sessionSocket = new ClientWebSocket(); + sessionSocket = new ClientWebSocket(); + sessionSocket.Options.KeepAliveInterval = TimeSpan.Zero; } /// @@ -51,12 +56,12 @@ public DevToolsSession(string endpointAddress) /// /// Event raised an event notification is received from the DevTools session. /// - internal event EventHandler DevToolsEventReceived; + public event EventHandler DevToolsEventReceived; /// /// Gets or sets the number of milliseconds to wait for a command to complete. Default is 5 seconds. /// - public int CommandTimeout + public TimeSpan CommandTimeout { get; set; @@ -76,31 +81,56 @@ public string ActiveSessionId /// public string EndpointAddress { - get { return m_endpointAddress; } + get { return websocketAddress; } + } + + /// + /// Gets the version-independent domain implementation for this Developer Tools connection + /// + public IDomains Domains + { + get { return this.domains; } + } + + public T GetVersionSpecificDomains() where T: DevToolsSessionDomains + { + T versionSpecificDomains = this.domains.VersionSpecificDomains as T; + if (versionSpecificDomains == null) + { + throw new InvalidOperationException("Type is invalid for conversion"); + } + + return versionSpecificDomains; } /// /// Sends the specified command and returns the associated command response. /// - /// - /// - /// - /// - /// - /// + /// A command object implementing the interface. + /// The command to be sent. + /// A CancellationToken object to allow for cancellation of the command. + /// The execution timeout of the command in milliseconds. + /// to throw an exception if a response is not received; otherwise, . + /// The command response object implementing the interface. public async Task> SendCommand(TCommand command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) where TCommand : ICommand { if (command == null) + { throw new ArgumentNullException(nameof(command)); + } var result = await SendCommand(command.CommandName, JToken.FromObject(command), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); if (result == null) + { return null; + } - if (!CommandResponseTypeMap.TryGetCommandResponseType(out Type commandResponseType)) + if (!this.domains.VersionSpecificDomains.ResponseTypeMap.TryGetCommandResponseType(out Type commandResponseType)) + { throw new InvalidOperationException($"Type {typeof(TCommand)} does not correspond to a known command response type."); + } return result.ToObject(commandResponseType) as ICommandResponse; } @@ -110,22 +140,26 @@ public string EndpointAddress /// /// /// - /// - /// - /// - /// - /// + /// A command object implementing the interface. + /// A CancellationToken object to allow for cancellation of the command. + /// The execution timeout of the command in milliseconds. + /// to throw an exception if a response is not received; otherwise, . + /// The command response object implementing the interface. public async Task SendCommand(TCommand command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) where TCommand : ICommand where TCommandResponse : ICommandResponse { if (command == null) + { throw new ArgumentNullException(nameof(command)); + } var result = await SendCommand(command.CommandName, JToken.FromObject(command), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); if (result == null) + { return default(TCommandResponse); + } return result.ToObject(); } @@ -133,29 +167,31 @@ public string EndpointAddress /// /// Returns a JToken based on a command created with the specified command name and params. /// - /// - /// - /// - /// - /// - /// + /// The name of the command to send. + /// The parameters of the command as a JToken object + /// A CancellationToken object to allow for cancellation of the command. + /// The execution timeout of the command in milliseconds. + /// to throw an exception if a response is not received; otherwise, . + /// The command response object implementing the interface. //[DebuggerStepThrough] public async Task SendCommand(string commandName, JToken @params, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) { - var message = new DevToolsCommandData(Interlocked.Increment(ref m_currentCommandId), ActiveSessionId, commandName, @params); + var message = new DevToolsCommandData(Interlocked.Increment(ref currentCommandId), ActiveSessionId, commandName, @params); if (millisecondsTimeout.HasValue == false) - millisecondsTimeout = CommandTimeout; + { + millisecondsTimeout = Convert.ToInt32(CommandTimeout.TotalMilliseconds); + } await OpenSessionConnection(cancellationToken); LogTrace("Sending {0} {1}: {2}", message.CommandId, message.CommandName, @params.ToString()); - + var contents = JsonConvert.SerializeObject(message); var contentBuffer = Encoding.UTF8.GetBytes(contents); - m_pendingCommands.TryAdd(message.CommandId, message); - await m_sessionSocket.SendAsync(new ArraySegment(contentBuffer), WebSocketMessageType.Text, true, cancellationToken); + pendingCommands.TryAdd(message.CommandId, message); + await sessionSocket.SendAsync(new ArraySegment(contentBuffer), WebSocketMessageType.Text, true, cancellationToken); var responseWasReceived = await Task.Run(() => message.SyncEvent.Wait(millisecondsTimeout.Value, cancellationToken)); @@ -164,7 +200,8 @@ public string EndpointAddress throw new InvalidOperationException($"A command response was not received: {commandName}"); } - if (m_pendingCommands.TryRemove(message.CommandId, out var modified)) + DevToolsCommandData modified; + if (pendingCommands.TryRemove(message.CommandId, out modified)) { if (modified.IsError) { @@ -172,8 +209,10 @@ public string EndpointAddress var errorData = modified.Result.Value("data"); var exceptionMessage = $"{commandName}: {errorMessage}"; - if (!String.IsNullOrWhiteSpace(errorData)) + if (!string.IsNullOrWhiteSpace(errorData)) + { exceptionMessage = $"{exceptionMessage} - {errorData}"; + } LogTrace("Recieved Error Response {0}: {1} {2}", modified.CommandId, message, errorData); throw new CommandResponseException(exceptionMessage) @@ -188,15 +227,51 @@ public string EndpointAddress return null; } + public async Task Start() + { + string debuggerUrl = string.Format(CultureInfo.InvariantCulture, "http://{0}", this.debuggerEndpoint); + string rawVersionInfo = string.Empty; + using (HttpClient client = new HttpClient()) + { + client.BaseAddress = new Uri(debuggerUrl); + rawVersionInfo = await client.GetStringAsync("/json/version"); + } + + var versionInfo = JsonConvert.DeserializeObject(rawVersionInfo); + websocketAddress = versionInfo.WebSocketDebuggerUrl; + + this.domains = DevToolsDomainFactory.InitializeDomains(versionInfo, this); + + string targetId = null; + var targets = await this.domains.Target.GetTargets(); + foreach(var target in targets) + { + if (target.Type == "page") + { + targetId = target.TargetId; + LogTrace("Found Target ID {0}.", targetId); + string sessionId = await this.domains.Target.AttachToTarget(targetId); + LogTrace("Target ID {0} attached. Active session ID: {1}", targetId, sessionId); + this.ActiveSessionId = sessionId; + break; + } + } + + await this.domains.Target.SetAutoAttach(); + LogTrace("AutoAttach is set.", targetId); + await this.domains.Log.Clear(); + LogTrace("Log cleared.", targetId); + } + private async Task OpenSessionConnection(CancellationToken cancellationToken) { - if (m_sessionSocket == null) + if (sessionSocket == null) { return; } // Try to prevent "System.InvalidOperationException: The WebSocket has already been started." - while (m_sessionSocket.State == WebSocketState.Connecting) + while (sessionSocket.State == WebSocketState.Connecting) { if (cancellationToken.IsCancellationRequested) { @@ -206,23 +281,23 @@ private async Task OpenSessionConnection(CancellationToken cancellationToken) await Task.Delay(10); } - if (m_sessionSocket.State != WebSocketState.Open) + if (sessionSocket.State != WebSocketState.Open) { - await m_sessionSocket.ConnectAsync(new Uri(m_endpointAddress), cancellationToken); + await sessionSocket.ConnectAsync(new Uri(websocketAddress), cancellationToken); - m_receiveTask = Task.Run(async () => await ReceiveMessage(cancellationToken)); + receiveTask = Task.Run(async () => await ReceiveMessage(cancellationToken)); } } private async Task ReceiveMessage(CancellationToken cancellationToken) { - while (m_sessionSocket.State == WebSocketState.Open) + while (sessionSocket.State == WebSocketState.Open) { WebSocketReceiveResult result = null; var buffer = WebSocket.CreateClientBuffer(1024, 1024); try { - result = await m_sessionSocket.ReceiveAsync(buffer, cancellationToken); + result = await sessionSocket.ReceiveAsync(buffer, cancellationToken); } catch (OperationCanceledException) { @@ -250,7 +325,7 @@ private async Task ReceiveMessage(CancellationToken cancellationToken) stream.Write(buffer.Array, 0, result.Count); while (!result.EndOfMessage) { - result = await m_sessionSocket.ReceiveAsync(buffer, cancellationToken); + result = await sessionSocket.ReceiveAsync(buffer, cancellationToken); stream.Write(buffer.Array, 0, result.Count); } @@ -274,7 +349,7 @@ private void ProcessIncomingMessage(string message) var commandId = idProperty.Value(); DevToolsCommandData commandInfo; - if (m_pendingCommands.TryGetValue(commandId, out commandInfo)) + if (pendingCommands.TryGetValue(commandId, out commandInfo)) { if (messageObject.TryGetValue("error", out var errorProperty)) { @@ -291,7 +366,7 @@ private void ProcessIncomingMessage(string message) } else { - LogError("Recieved Unknown Response {0}: {1}", commandId, message); + LogError("Recieved Unknown Response {0}: {1}", commandId, message); } return; @@ -336,19 +411,19 @@ private void LogError(string message, params object[] args) } #region IDisposable Support - private bool m_isDisposed = false; + private bool isDisposed = false; protected void Dispose(bool disposing) { - if (!m_isDisposed) + if (!isDisposed) { if (disposing) { - if (m_sessionSocket != null) + if (sessionSocket != null) { - if (m_receiveTask != null) + if (receiveTask != null) { - if (m_sessionSocket.State == WebSocketState.Open) + if (sessionSocket.State == WebSocketState.Open) { try { @@ -362,14 +437,14 @@ protected void Dispose(bool disposing) // when mulitple failure modes can be seen, which will throw an // AggregateException, consolidating several exceptions into one, // and this too must be caught. Finally, the call to CloseAsync - // will hang even though the connection is already severed. + // will hang even though the connection is already severed. // Wait for the task to complete for a short time (since we're // restricted to localhost, the default of 2 seconds should be // plenty; if not, change the initialization of the timout), // and if the task is still running, then we assume the connection // is properly closed. - Task closeTask = Task.Run(() => m_sessionSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None)); - closeTask.Wait(m_closeConnectionWaitTimeSpan); + Task closeTask = Task.Run(() => sessionSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None)); + closeTask.Wait(closeConnectionWaitTimeSpan); } catch (WebSocketException) { @@ -384,19 +459,19 @@ protected void Dispose(bool disposing) // Wait for the recieve task to be completely exited (for // whatever reason) before attempting to dispose it. - m_receiveTask.Wait(); - m_receiveTask.Dispose(); - m_receiveTask = null; + receiveTask.Wait(); + receiveTask.Dispose(); + receiveTask = null; } - m_sessionSocket.Dispose(); - m_sessionSocket = null; + sessionSocket.Dispose(); + sessionSocket = null; } - m_pendingCommands.Clear(); + pendingCommands.Clear(); } - m_isDisposed = true; + isDisposed = true; } } @@ -409,4 +484,4 @@ public void Dispose() } #endregion } -} +} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/DevToolsSessionDomains.cs b/dotnet/src/webdriver/DevTools/DevToolsSessionDomains.cs new file mode 100644 index 0000000000000..fd3b3549c5c2e --- /dev/null +++ b/dotnet/src/webdriver/DevTools/DevToolsSessionDomains.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenQA.Selenium.DevTools +{ + public abstract class DevToolsSessionDomains + { + private CommandResponseTypeMap responseTypeMap = new CommandResponseTypeMap(); + + protected DevToolsSessionDomains() + { + this.PopulateCommandResponseTypeMap(); + } + + public CommandResponseTypeMap ResponseTypeMap => this.responseTypeMap; + + protected abstract void PopulateCommandResponseTypeMap(); + } +} diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsSessionEventReceivedEventArgs.cs b/dotnet/src/webdriver/DevTools/DevToolsSessionEventReceivedEventArgs.cs similarity index 95% rename from dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsSessionEventReceivedEventArgs.cs rename to dotnet/src/webdriver/DevTools/DevToolsSessionEventReceivedEventArgs.cs index dae5fdd2668d7..235bbd665abf2 100644 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsSessionEventReceivedEventArgs.cs +++ b/dotnet/src/webdriver/DevTools/DevToolsSessionEventReceivedEventArgs.cs @@ -6,7 +6,7 @@ namespace OpenQA.Selenium.DevTools /// /// Event data used when receiving events from the DevTools session. /// - internal class DevToolsEventReceivedEventArgs : EventArgs + public class DevToolsEventReceivedEventArgs : EventArgs { /// /// Initializes a new instance of the DevToolsEventReceivedEventArgs class. diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsSessionInfo.cs b/dotnet/src/webdriver/DevTools/DevToolsSessionInfo.cs similarity index 92% rename from dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsSessionInfo.cs rename to dotnet/src/webdriver/DevTools/DevToolsSessionInfo.cs index 63310b8d011b6..bcb1e6ee7a237 100644 --- a/dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsSessionInfo.cs +++ b/dotnet/src/webdriver/DevTools/DevToolsSessionInfo.cs @@ -1,9 +1,7 @@ -using Newtonsoft.Json; +using Newtonsoft.Json; using System; using System.Collections.Generic; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace OpenQA.Selenium.DevTools { diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsSessionLogMessageEventArgs.cs b/dotnet/src/webdriver/DevTools/DevToolsSessionLogMessageEventArgs.cs similarity index 100% rename from dotnet/src/webdriver/DevTools/AutoGenerated/DevToolsSessionLogMessageEventArgs.cs rename to dotnet/src/webdriver/DevTools/DevToolsSessionLogMessageEventArgs.cs diff --git a/dotnet/src/webdriver/DevTools/DevToolsVersionInfo.cs b/dotnet/src/webdriver/DevTools/DevToolsVersionInfo.cs new file mode 100644 index 0000000000000..16d69f409054d --- /dev/null +++ b/dotnet/src/webdriver/DevTools/DevToolsVersionInfo.cs @@ -0,0 +1,95 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.RegularExpressions; + +namespace OpenQA.Selenium.DevTools +{ + public class DevToolsVersionInfo + { + [JsonProperty(PropertyName = "Browser")] + public string Browser + { + get; + set; + } + + [JsonIgnore] + public string BrowserVersion + { + get { return Regex.Match(Browser, ".*/(.*)").Groups[1].Value; } + } + + [JsonIgnore] + public string BrowserMajorVersion + { + get { return Regex.Match(Browser, ".*/(\\d+)\\..*").Groups[1].Value; } + } + + [JsonProperty(PropertyName = "Protocol-Version")] + public string ProtocolVersion + { + get; + set; + } + + [JsonProperty(PropertyName = "User-Agent")] + public string UserAgent + { + get; + set; + } + + [JsonProperty(PropertyName = "V8-Version")] + public string V8Version + { + get; + set; + } + + [JsonProperty(PropertyName = "webSocketDebuggerUrl")] + public string WebSocketDebuggerUrl + { + get; + set; + } + + [JsonIgnore] + public string V8VersionNumber + { + get + { + //Get the v8 version + var v8VersionRegex = new Regex(@"^(\d+)\.(\d+)\.(\d+)(\.\d+.*)?"); + var v8VersionMatch = v8VersionRegex.Match(V8Version); + if (v8VersionMatch.Success == false || v8VersionMatch.Groups.Count < 4) + throw new InvalidOperationException($"Unable to determine v8 version number from v8 version string ({V8Version})"); + + return $"{v8VersionMatch.Groups[1].Value}.{v8VersionMatch.Groups[2].Value}.{v8VersionMatch.Groups[3].Value}"; + } + } + + [JsonProperty(PropertyName = "WebKit-Version")] + public string WebKitVersion + { + get; + set; + } + + [JsonIgnore] + public string WebKitVersionHash + { + get + { + //Get the webkit version hash. + var webkitVersionRegex = new Regex(@"\s\(@(\b[0-9a-f]{5,40}\b)"); + var webkitVersionMatch = webkitVersionRegex.Match(WebKitVersion); + if (webkitVersionMatch.Success == false || webkitVersionMatch.Groups.Count != 2) + throw new InvalidOperationException($"Unable to determine webkit version hash from webkit version string ({WebKitVersion})"); + + return webkitVersionMatch.Groups[1].Value; + } + } + } +} diff --git a/dotnet/src/webdriver/DevTools/EntryAddedEventArgs.cs b/dotnet/src/webdriver/DevTools/EntryAddedEventArgs.cs new file mode 100644 index 0000000000000..ab985f136a32a --- /dev/null +++ b/dotnet/src/webdriver/DevTools/EntryAddedEventArgs.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenQA.Selenium.DevTools +{ + public class EntryAddedEventArgs : EventArgs + { + public LogEntry Entry { get; set; } + } +} diff --git a/dotnet/src/webdriver/DevTools/ExceptionThrownEventArgs.cs b/dotnet/src/webdriver/DevTools/ExceptionThrownEventArgs.cs new file mode 100644 index 0000000000000..fc25b8947b1b6 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/ExceptionThrownEventArgs.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenQA.Selenium.DevTools +{ + public class ExceptionThrownEventArgs : EventArgs + { + public DateTime Timestamp { get; internal set; } + public string Message { get; internal set; } + } +} diff --git a/dotnet/src/webdriver/DevTools/HttpRequestData.cs b/dotnet/src/webdriver/DevTools/HttpRequestData.cs new file mode 100644 index 0000000000000..33a01ae730599 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/HttpRequestData.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenQA.Selenium.DevTools +{ + public class HttpRequestData + { + public string Method { get; internal set; } + public string Url { get; internal set; } + public string PostData { get; internal set; } + public Dictionary Headers { get; internal set; } + public string RequestId { get; internal set; } + } +} diff --git a/dotnet/src/webdriver/DevTools/HttpResponseData.cs b/dotnet/src/webdriver/DevTools/HttpResponseData.cs new file mode 100644 index 0000000000000..dfec96090ab17 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/HttpResponseData.cs @@ -0,0 +1,14 @@ +using OpenQA.Selenium.DevTools.V86.Fetch; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenQA.Selenium.DevTools +{ + public class HttpResponseData + { + public long StatusCode { get; set; } + public string Body { get; set; } + public Dictionary Headers { get; set; } + } +} diff --git a/dotnet/src/webdriver/DevTools/AutoGenerated/ICommand.cs b/dotnet/src/webdriver/DevTools/ICommand.cs similarity index 100% rename from dotnet/src/webdriver/DevTools/AutoGenerated/ICommand.cs rename to dotnet/src/webdriver/DevTools/ICommand.cs diff --git a/dotnet/src/webdriver/DevTools/IDevTools.cs b/dotnet/src/webdriver/DevTools/IDevTools.cs index 1aeff2faaac52..aa030c689a5ed 100644 --- a/dotnet/src/webdriver/DevTools/IDevTools.cs +++ b/dotnet/src/webdriver/DevTools/IDevTools.cs @@ -27,6 +27,6 @@ public interface IDevTools /// Creates a session to communicate with a browser using a Developer Tools debugging protocol. /// /// The active session to use to communicate with the Developer Tools debugging protocol. - DevToolsSession CreateDevToolsSession(); + IDevToolsSession CreateDevToolsSession(); } } diff --git a/dotnet/src/webdriver/DevTools/IDevToolsSession.cs b/dotnet/src/webdriver/DevTools/IDevToolsSession.cs new file mode 100644 index 0000000000000..95f0e9799e2af --- /dev/null +++ b/dotnet/src/webdriver/DevTools/IDevToolsSession.cs @@ -0,0 +1,72 @@ +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools +{ + /// + /// Represents a WebSocket connection to a running DevTools instance that can be used to send + /// commands and recieve events. + /// + public interface IDevToolsSession : IDisposable + { + /// + /// Event raised when the DevToolsSession logs informational messages. + /// + event EventHandler LogMessage; + + /// + /// Event raised an event notification is received from the DevTools session. + /// + event EventHandler DevToolsEventReceived; + + /// + /// Gets the domains that are valid for the specfied version of Developer Tools connection. + /// + /// + /// A type specific to the version of Develoepr Tools with which to communicate. + /// + /// The version-specific domains for this Developer Tools connection. + T GetVersionSpecificDomains() where T : DevToolsSessionDomains; + + /// + /// Sends the specified command and returns the associated command response. + /// + /// A command object implementing the interface. + /// The command to be sent. + /// A CancellationToken object to allow for cancellation of the command. + /// The execution timeout of the command in milliseconds. + /// to throw an exception if a response is not received; otherwise, . + /// The command response object implementing the interface. + Task> SendCommand(TCommand command, CancellationToken cancellationToken, int? millisecondsTimeout, bool throwExceptionIfResponseNotReceived) + where TCommand : ICommand; + + /// + /// Sends the specified command and returns the associated command response. + /// + /// + /// + /// A command object implementing the interface. + /// A CancellationToken object to allow for cancellation of the command. + /// The execution timeout of the command in milliseconds. + /// to throw an exception if a response is not received; otherwise, . + /// The command response object implementing the interface. + Task SendCommand(TCommand command, CancellationToken cancellationToken, int? millisecondsTimeout, bool throwExceptionIfResponseNotReceived) + where TCommand : ICommand + where TCommandResponse : ICommandResponse; + + /// + /// Returns a JToken based on a command created with the specified command name and params. + /// + /// The name of the command to send. + /// The parameters of the command as a JToken object + /// A CancellationToken object to allow for cancellation of the command. + /// The execution timeout of the command in milliseconds. + /// to throw an exception if a response is not received; otherwise, . + /// The command response object implementing the interface. + Task SendCommand(string commandName, JToken @params, CancellationToken cancellationToken, int? millisecondsTimeout, bool throwExceptionIfResponseNotReceived); + } +} diff --git a/dotnet/src/webdriver/DevTools/IDomains.cs b/dotnet/src/webdriver/DevTools/IDomains.cs new file mode 100644 index 0000000000000..e092862ee42ed --- /dev/null +++ b/dotnet/src/webdriver/DevTools/IDomains.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenQA.Selenium.DevTools +{ + public interface IDomains + { + DevToolsSessionDomains VersionSpecificDomains { get; } + + INetwork Network { get; } + + IJavaScript JavaScript { get; } + + ITarget Target { get; } + + ILog Log { get; } + } +} diff --git a/dotnet/src/webdriver/DevTools/IJavaScript.cs b/dotnet/src/webdriver/DevTools/IJavaScript.cs new file mode 100644 index 0000000000000..7f4f29a867139 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/IJavaScript.cs @@ -0,0 +1,22 @@ +using System; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools +{ + public interface IJavaScript + { + Task EnableRuntime(); + Task DisableRuntime(); + + Task EnablePage(); + Task DisablePage(); + Task AddBinding(string name); + Task RemoveBinding(string name); + Task AddScriptToEvaluateOnNewDocument(string script); + Task RemoveScriptToEvaluateOnNewDocument(string scriptId); + + event EventHandler BindingCalled; + event EventHandler ConsoleApiCalled; + event EventHandler ExceptionThrown; + } +} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/ILog.cs b/dotnet/src/webdriver/DevTools/ILog.cs new file mode 100644 index 0000000000000..3f242042d3f52 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/ILog.cs @@ -0,0 +1,14 @@ +using System; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools +{ + public interface ILog + { + Task Enable(); + + Task Clear(); + + event EventHandler EntryAdded; + } +} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/INetwork.cs b/dotnet/src/webdriver/DevTools/INetwork.cs new file mode 100644 index 0000000000000..ebd42c1f0ded1 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/INetwork.cs @@ -0,0 +1,21 @@ +using System; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools +{ + public interface INetwork + { + Task EnableNetworkCaching(); + Task DisableNetworkCaching(); + Task EnableFetchForAllPatterns(); + Task DisableFetch(); + + Task ContinueWithoutModification(HttpRequestData requestData); + Task ContinueWithAuth(HttpRequestData requestData, string userName, string password); + Task CancelAuth(HttpRequestData requestData); + Task ContinueRequest(HttpRequestData requestData, HttpResponseData responseData); + + event EventHandler AuthRequired; + event EventHandler RequestPaused; + } +} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/ITarget.cs b/dotnet/src/webdriver/DevTools/ITarget.cs new file mode 100644 index 0000000000000..537d08f9dfd96 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/ITarget.cs @@ -0,0 +1,14 @@ +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools +{ + public interface ITarget + { + Task> GetTargets(); + + Task AttachToTarget(string TargetId); + + Task SetAutoAttach(); + } +} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/LogEntry.cs b/dotnet/src/webdriver/DevTools/LogEntry.cs new file mode 100644 index 0000000000000..98f64e3b6ba97 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/LogEntry.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenQA.Selenium.DevTools +{ + public class LogEntry + { + public string Kind { get; set; } + + public string Message { get; set; } + } +} diff --git a/dotnet/src/webdriver/DevTools/RequestPausedEventArgs.cs b/dotnet/src/webdriver/DevTools/RequestPausedEventArgs.cs new file mode 100644 index 0000000000000..028095422d84e --- /dev/null +++ b/dotnet/src/webdriver/DevTools/RequestPausedEventArgs.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenQA.Selenium.DevTools +{ + public class RequestPausedEventArgs : EventArgs + { + public string RequestId { get; internal set; } + public HttpRequestData RequestData { get; internal set; } + } +} diff --git a/dotnet/src/webdriver/DevTools/TargetInfo.cs b/dotnet/src/webdriver/DevTools/TargetInfo.cs new file mode 100644 index 0000000000000..b55f8c9be5822 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/TargetInfo.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenQA.Selenium.DevTools +{ + public class TargetInfo + { + public string TargetId { get; set; } + public string Type { get; set; } + public string Title { get; set; } + public string Url { get; set; } + + public bool IsAttached { get; set; } + + public string OpenerId { get; set; } + + public string BrowserContextId { get; set; } + } +} diff --git a/dotnet/src/webdriver/DevTools/v84/V84Domains.cs b/dotnet/src/webdriver/DevTools/v84/V84Domains.cs new file mode 100644 index 0000000000000..c892ae3b5622f --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v84/V84Domains.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenQA.Selenium.DevTools.V84 +{ + public class V84Domains : IDomains + { + private DevToolsSessionDomains domains; + + public V84Domains(DevToolsSession session) + { + this.domains = new DevToolsSessionDomains(session); + } + + public static int DevToolsVersion = 84; + + public DevTools.DevToolsSessionDomains VersionSpecificDomains => this.domains; + + public INetwork Network => new V84Network(domains.Network, domains.Fetch); + + public IJavaScript JavaScript => new V84JavaScript(domains.Runtime, domains.Page); + + public ITarget Target => new V84Target(domains.Target); + + public ILog Log => new V84Log(domains.Log); + } +} diff --git a/dotnet/src/webdriver/DevTools/v84/V84JavaScript.cs b/dotnet/src/webdriver/DevTools/v84/V84JavaScript.cs new file mode 100644 index 0000000000000..4129ad4a31939 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v84/V84JavaScript.cs @@ -0,0 +1,122 @@ +using OpenQA.Selenium.DevTools.V84.Page; +using OpenQA.Selenium.DevTools.V84.Runtime; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools.V84 +{ + public class V84JavaScript : IJavaScript + { + private RuntimeAdapter runtime; + private PageAdapter page; + + public V84JavaScript(RuntimeAdapter runtime, PageAdapter page) + { + this.runtime = runtime; + this.page = page; + this.runtime.BindingCalled += OnRuntimeBindingCalled; + this.runtime.ConsoleAPICalled += OnRuntimeConsoleApiCalled; + this.runtime.ExceptionThrown += OnRuntimeExceptionThrown; + } + + public event EventHandler BindingCalled; + public event EventHandler ConsoleApiCalled; + public event EventHandler ExceptionThrown; + + public async Task EnablePage() + { + await page.Enable(); + } + + public async Task DisablePage() + { + await page.Disable(); + } + + public async Task EnableRuntime() + { + await runtime.Enable(); + } + + public async Task DisableRuntime() + { + await runtime.Disable(); + } + + public async Task AddScriptToEvaluateOnNewDocument(string script) + { + var result = await page.AddScriptToEvaluateOnNewDocument(new AddScriptToEvaluateOnNewDocumentCommandSettings() { Source = script }); + return result.Identifier; + } + + public async Task RemoveScriptToEvaluateOnNewDocument(string scriptId) + { + await page.RemoveScriptToEvaluateOnNewDocument(new RemoveScriptToEvaluateOnNewDocumentCommandSettings() { Identifier = scriptId }); + } + + public async Task AddBinding(string name) + { + await runtime.AddBinding(new AddBindingCommandSettings() { Name = name }); + } + + public async Task RemoveBinding(string name) + { + await runtime.RemoveBinding(new RemoveBindingCommandSettings() { Name = name }); + } + + private void OnRuntimeBindingCalled(object sender, Runtime.BindingCalledEventArgs e) + { + if (this.BindingCalled != null) + { + BindingCalledEventArgs wrapped = new BindingCalledEventArgs() + { + ExecutionContextId = e.ExecutionContextId, + Name = e.Name, + Payload = e.Payload + }; + this.BindingCalled(this, wrapped); + } + } + + private void OnRuntimeExceptionThrown(object sender, Runtime.ExceptionThrownEventArgs e) + { + if (this.ExceptionThrown != null) + { + var wrapped = new ExceptionThrownEventArgs() + { + Timestamp = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(e.Timestamp), + Message = e.ExceptionDetails.Text + }; + + // TODO: Collect stack trace elements + this.ExceptionThrown(this, wrapped); + } + } + + private void OnRuntimeConsoleApiCalled(object sender, ConsoleAPICalledEventArgs e) + { + if (this.ConsoleApiCalled != null) + { + var wrapped = new ConsoleApiCalledEventArgs() + { + Timestamp = new DateTime(1979, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(e.Timestamp), + Type = e.Type, + Arguments = new List() + }; + + foreach (var arg in e.Args) + { + string argValue = null; + if (arg.Value != null) + { + argValue = arg.Value.ToString(); + } + wrapped.Arguments.Add(new ConsoleApiArgument() { Type = arg.Type.ToString(), Value = argValue }); + } + + this.ConsoleApiCalled(this, wrapped); + } + } + } +} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/v84/V84Log.cs b/dotnet/src/webdriver/DevTools/v84/V84Log.cs new file mode 100644 index 0000000000000..10214fcaf109c --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v84/V84Log.cs @@ -0,0 +1,44 @@ +using OpenQA.Selenium.DevTools.V84.Log; +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools.V84 +{ + public class V84Log : ILog + { + LogAdapter adapter; + + public V84Log(LogAdapter adapter) + { + this.adapter = adapter; + this.adapter.EntryAdded += OnAdapterEntryAdded; + } + + public event EventHandler EntryAdded; + + public async Task Clear() + { + await adapter.Clear(); + } + + public async Task Enable() + { + await adapter.Enable(); + } + + private void OnAdapterEntryAdded(object sender, OpenQA.Selenium.DevTools.V84.Log.EntryAddedEventArgs e) + { + if (this.EntryAdded != null) + { + EntryAddedEventArgs propagated = new EntryAddedEventArgs(); + propagated.Entry = new LogEntry(); + propagated.Entry.Kind = e.Entry.Source.ToString(); + propagated.Entry.Message = e.Entry.Text; + this.EntryAdded(this, propagated); + } + } + } +} diff --git a/dotnet/src/webdriver/DevTools/v84/V84Network.cs b/dotnet/src/webdriver/DevTools/v84/V84Network.cs new file mode 100644 index 0000000000000..f64ae7db4c456 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v84/V84Network.cs @@ -0,0 +1,142 @@ +using OpenQA.Selenium.DevTools.V84.Fetch; +using OpenQA.Selenium.DevTools.V84.Network; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools.V84 +{ + public class V84Network : INetwork + { + private FetchAdapter fetch; + private NetworkAdapter network; + + public V84Network(NetworkAdapter network, FetchAdapter fetch) + { + this.network = network; + this.fetch = fetch; + fetch.AuthRequired += OnFetchAuthRequired; + fetch.RequestPaused += OnFetchRequestPaused; + } + + public event EventHandler AuthRequired; + public event EventHandler RequestPaused; + + public async Task DisableNetworkCaching() + { + await network.SetCacheDisabled(new SetCacheDisabledCommandSettings() { CacheDisabled = true }); + } + + public async Task EnableNetworkCaching() + { + await network.SetCacheDisabled(new SetCacheDisabledCommandSettings() { CacheDisabled = false }); + } + + public async Task EnableFetchForAllPatterns() + { + await fetch.Enable(new OpenQA.Selenium.DevTools.V84.Fetch.EnableCommandSettings() + { + Patterns = new OpenQA.Selenium.DevTools.V84.Fetch.RequestPattern[] + { + new OpenQA.Selenium.DevTools.V84.Fetch.RequestPattern() { UrlPattern = "*" } + }, + HandleAuthRequests = true + }); + } + + public async Task DisableFetch() + { + await fetch.Disable(); + } + + public async Task ContinueRequest(HttpRequestData requestData, HttpResponseData responseData) + { + var commandSettings = new FulfillRequestCommandSettings() + { + RequestId = requestData.RequestId, + ResponseCode = responseData.StatusCode, + }; + + if (responseData.Headers.Count > 0) + { + List headers = new List(); + foreach(KeyValuePair headerPair in responseData.Headers) + { + headers.Add(new HeaderEntry() { Name = headerPair.Key, Value = headerPair.Value }); + } + + commandSettings.ResponseHeaders = headers.ToArray(); + } + + if (!string.IsNullOrEmpty(responseData.Body)) + { + // TODO: base64 encode? + commandSettings.Body = responseData.Body; + } + + await fetch.FulfillRequest(commandSettings); + } + + public async Task ContinueWithoutModification(HttpRequestData requestData) + { + await fetch.ContinueRequest(new ContinueRequestCommandSettings() { RequestId = requestData.RequestId }); + } + + public async Task ContinueWithAuth(HttpRequestData requestData, string userName, string password) + { + await fetch.ContinueWithAuth(new ContinueWithAuthCommandSettings() + { + AuthChallengeResponse = new OpenQA.Selenium.DevTools.V84.Fetch.AuthChallengeResponse() + { + Response = OpenQA.Selenium.DevTools.V84.Fetch.AuthChallengeResponseResponseValues.ProvideCredentials, + Username = userName, + Password = password + } + }); + } + + public async Task CancelAuth(HttpRequestData requestData) + { + await fetch.ContinueWithAuth(new ContinueWithAuthCommandSettings() + { + AuthChallengeResponse = new OpenQA.Selenium.DevTools.V84.Fetch.AuthChallengeResponse() + { + Response = OpenQA.Selenium.DevTools.V84.Fetch.AuthChallengeResponseResponseValues.CancelAuth + } + }); + } + + private void OnFetchAuthRequired(object sender, Fetch.AuthRequiredEventArgs e) + { + if (this.AuthRequired != null) + { + AuthRequiredEventArgs wrapped = new AuthRequiredEventArgs() + { + RequestId = e.RequestId, + Uri = e.AuthChallenge.Origin + }; + this.AuthRequired(this, wrapped); + } + } + + private void OnFetchRequestPaused(object sender, Fetch.RequestPausedEventArgs e) + { + if (this.RequestPaused != null) + { + RequestPausedEventArgs wrapped = new RequestPausedEventArgs(); + if (e.ResponseErrorReason == null && e.ResponseStatusCode == null) + { + wrapped.RequestData = new HttpRequestData() + { + RequestId = e.RequestId, + Method = e.Request.Method, + Url = e.Request.Url, + PostData = e.Request.PostData, + Headers = new Dictionary(e.Request.Headers) + }; + } + this.RequestPaused(this, wrapped); + } + } + } +} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/v84/V84Target.cs b/dotnet/src/webdriver/DevTools/v84/V84Target.cs new file mode 100644 index 0000000000000..69e8a38f71326 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v84/V84Target.cs @@ -0,0 +1,53 @@ +using OpenQA.Selenium.DevTools.V84.Target; +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools.V84 +{ + + public class V84Target : ITarget + { + private TargetAdapter adapter; + + public V84Target(TargetAdapter adapter) + { + this.adapter = adapter; + } + + public async Task> GetTargets() + { + List targets = new List(); + var response = await adapter.GetTargets(); + for (int i = 0; i < response.TargetInfos.Length; i++) + { + var targetInfo = response.TargetInfos[i]; + var mapped = new TargetInfo() + { + TargetId = targetInfo.TargetId, + Title = targetInfo.Title, + Type = targetInfo.Type, + Url = targetInfo.Url, + OpenerId = targetInfo.OpenerId, + BrowserContextId = targetInfo.BrowserContextId, + IsAttached = targetInfo.Attached + }; + targets.Add(mapped); + } + + return targets; + } + + public async Task AttachToTarget(string targetId) + { + var result = await adapter.AttachToTarget(new AttachToTargetCommandSettings() { TargetId = targetId, Flatten = true }); + return result.SessionId; + } + + public async Task SetAutoAttach() + { + await adapter.SetAutoAttach(new SetAutoAttachCommandSettings() { AutoAttach = true, WaitForDebuggerOnStart = false, Flatten = true }); + } + } +} diff --git a/dotnet/src/webdriver/DevTools/v84/generator_settings.json b/dotnet/src/webdriver/DevTools/v84/generator_settings.json new file mode 100644 index 0000000000000..9173d333a2a3f --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v84/generator_settings.json @@ -0,0 +1,11 @@ +{ + "include": [ + { + "templatePath": "DevToolsSessionDomains.hbs", + "outputPath": "DevToolsSessionDomains.cs" + } + ], + "rootNamespace": "OpenQA.Selenium.DevTools.V84", + "runtimeVersion": "", + "includeExperimentalDomains": true +} diff --git a/dotnet/src/webdriver/DevTools/v85/V85Domains.cs b/dotnet/src/webdriver/DevTools/v85/V85Domains.cs new file mode 100644 index 0000000000000..45b3fe5a65d21 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v85/V85Domains.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenQA.Selenium.DevTools.V85 +{ + public class V85Domains : IDomains + { + private DevToolsSessionDomains domains; + + public V85Domains(DevToolsSession session) + { + this.domains = new DevToolsSessionDomains(session); + } + + public static int DevToolsVersion = 85; + + public DevTools.DevToolsSessionDomains VersionSpecificDomains => this.domains; + + public INetwork Network => new V85Network(domains.Network, domains.Fetch); + + public IJavaScript JavaScript => new V85JavaScript(domains.Runtime, domains.Page); + + public ITarget Target => new V85Target(domains.Target); + + public ILog Log => new V85Log(domains.Log); + } +} diff --git a/dotnet/src/webdriver/DevTools/v85/V85JavaScript.cs b/dotnet/src/webdriver/DevTools/v85/V85JavaScript.cs new file mode 100644 index 0000000000000..deb4f83f6b687 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v85/V85JavaScript.cs @@ -0,0 +1,122 @@ +using OpenQA.Selenium.DevTools.V85.Page; +using OpenQA.Selenium.DevTools.V85.Runtime; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools.V85 +{ + public class V85JavaScript : IJavaScript + { + private RuntimeAdapter runtime; + private PageAdapter page; + + public V85JavaScript(RuntimeAdapter runtime, PageAdapter page) + { + this.runtime = runtime; + this.page = page; + this.runtime.BindingCalled += OnRuntimeBindingCalled; + this.runtime.ConsoleAPICalled += OnRuntimeConsoleApiCalled; + this.runtime.ExceptionThrown += OnRuntimeExceptionThrown; + } + + public event EventHandler BindingCalled; + public event EventHandler ConsoleApiCalled; + public event EventHandler ExceptionThrown; + + public async Task EnablePage() + { + await page.Enable(); + } + + public async Task DisablePage() + { + await page.Disable(); + } + + public async Task EnableRuntime() + { + await runtime.Enable(); + } + + public async Task DisableRuntime() + { + await runtime.Disable(); + } + + public async Task AddScriptToEvaluateOnNewDocument(string script) + { + var result = await page.AddScriptToEvaluateOnNewDocument(new AddScriptToEvaluateOnNewDocumentCommandSettings() { Source = script }); + return result.Identifier; + } + + public async Task RemoveScriptToEvaluateOnNewDocument(string scriptId) + { + await page.RemoveScriptToEvaluateOnNewDocument(new RemoveScriptToEvaluateOnNewDocumentCommandSettings() { Identifier = scriptId }); + } + + public async Task AddBinding(string name) + { + await runtime.AddBinding(new AddBindingCommandSettings() { Name = name }); + } + + public async Task RemoveBinding(string name) + { + await runtime.RemoveBinding(new RemoveBindingCommandSettings() { Name = name }); + } + + private void OnRuntimeBindingCalled(object sender, Runtime.BindingCalledEventArgs e) + { + if (this.BindingCalled != null) + { + BindingCalledEventArgs wrapped = new BindingCalledEventArgs() + { + ExecutionContextId = e.ExecutionContextId, + Name = e.Name, + Payload = e.Payload + }; + this.BindingCalled(this, wrapped); + } + } + + private void OnRuntimeExceptionThrown(object sender, Runtime.ExceptionThrownEventArgs e) + { + if (this.ExceptionThrown != null) + { + var wrapped = new ExceptionThrownEventArgs() + { + Timestamp = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(e.Timestamp), + Message = e.ExceptionDetails.Text + }; + + // TODO: Collect stack trace elements + this.ExceptionThrown(this, wrapped); + } + } + + private void OnRuntimeConsoleApiCalled(object sender, ConsoleAPICalledEventArgs e) + { + if (this.ConsoleApiCalled != null) + { + var wrapped = new ConsoleApiCalledEventArgs() + { + Timestamp = new DateTime(1979, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(e.Timestamp), + Type = e.Type, + Arguments = new List() + }; + + foreach (var arg in e.Args) + { + string argValue = null; + if (arg.Value != null) + { + argValue = arg.Value.ToString(); + } + wrapped.Arguments.Add(new ConsoleApiArgument() { Type = arg.Type.ToString(), Value = argValue }); + } + + this.ConsoleApiCalled(this, wrapped); + } + } + } +} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/v85/V85Log.cs b/dotnet/src/webdriver/DevTools/v85/V85Log.cs new file mode 100644 index 0000000000000..27bb6b195fa5b --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v85/V85Log.cs @@ -0,0 +1,44 @@ +using OpenQA.Selenium.DevTools.V85.Log; +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools.V85 +{ + public class V85Log : ILog + { + LogAdapter adapter; + + public V85Log(LogAdapter adapter) + { + this.adapter = adapter; + this.adapter.EntryAdded += OnAdapterEntryAdded; + } + + public event EventHandler EntryAdded; + + public async Task Clear() + { + await adapter.Clear(); + } + + public async Task Enable() + { + await adapter.Enable(); + } + + private void OnAdapterEntryAdded(object sender, OpenQA.Selenium.DevTools.V85.Log.EntryAddedEventArgs e) + { + if (this.EntryAdded != null) + { + EntryAddedEventArgs propagated = new EntryAddedEventArgs(); + propagated.Entry = new LogEntry(); + propagated.Entry.Kind = e.Entry.Source.ToString(); + propagated.Entry.Message = e.Entry.Text; + this.EntryAdded(this, propagated); + } + } + } +} diff --git a/dotnet/src/webdriver/DevTools/v85/V85Network.cs b/dotnet/src/webdriver/DevTools/v85/V85Network.cs new file mode 100644 index 0000000000000..25bf1e04f8ffe --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v85/V85Network.cs @@ -0,0 +1,142 @@ +using OpenQA.Selenium.DevTools.V85.Fetch; +using OpenQA.Selenium.DevTools.V85.Network; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools.V85 +{ + public class V85Network : INetwork + { + private FetchAdapter fetch; + private NetworkAdapter network; + + public V85Network(NetworkAdapter network, FetchAdapter fetch) + { + this.network = network; + this.fetch = fetch; + fetch.AuthRequired += OnFetchAuthRequired; + fetch.RequestPaused += OnFetchRequestPaused; + } + + public event EventHandler AuthRequired; + public event EventHandler RequestPaused; + + public async Task DisableNetworkCaching() + { + await network.SetCacheDisabled(new SetCacheDisabledCommandSettings() { CacheDisabled = true }); + } + + public async Task EnableNetworkCaching() + { + await network.SetCacheDisabled(new SetCacheDisabledCommandSettings() { CacheDisabled = false }); + } + + public async Task EnableFetchForAllPatterns() + { + await fetch.Enable(new OpenQA.Selenium.DevTools.V85.Fetch.EnableCommandSettings() + { + Patterns = new OpenQA.Selenium.DevTools.V85.Fetch.RequestPattern[] + { + new OpenQA.Selenium.DevTools.V85.Fetch.RequestPattern() { UrlPattern = "*" } + }, + HandleAuthRequests = true + }); + } + + public async Task DisableFetch() + { + await fetch.Disable(); + } + + public async Task ContinueRequest(HttpRequestData requestData, HttpResponseData responseData) + { + var commandSettings = new FulfillRequestCommandSettings() + { + RequestId = requestData.RequestId, + ResponseCode = responseData.StatusCode, + }; + + if (responseData.Headers.Count > 0) + { + List headers = new List(); + foreach(KeyValuePair headerPair in responseData.Headers) + { + headers.Add(new HeaderEntry() { Name = headerPair.Key, Value = headerPair.Value }); + } + + commandSettings.ResponseHeaders = headers.ToArray(); + } + + if (!string.IsNullOrEmpty(responseData.Body)) + { + // TODO: base64 encode? + commandSettings.Body = responseData.Body; + } + + await fetch.FulfillRequest(commandSettings); + } + + public async Task ContinueWithoutModification(HttpRequestData requestData) + { + await fetch.ContinueRequest(new ContinueRequestCommandSettings() { RequestId = requestData.RequestId }); + } + + public async Task ContinueWithAuth(HttpRequestData requestData, string userName, string password) + { + await fetch.ContinueWithAuth(new ContinueWithAuthCommandSettings() + { + AuthChallengeResponse = new OpenQA.Selenium.DevTools.V85.Fetch.AuthChallengeResponse() + { + Response = OpenQA.Selenium.DevTools.V85.Fetch.AuthChallengeResponseResponseValues.ProvideCredentials, + Username = userName, + Password = password + } + }); + } + + public async Task CancelAuth(HttpRequestData requestData) + { + await fetch.ContinueWithAuth(new ContinueWithAuthCommandSettings() + { + AuthChallengeResponse = new OpenQA.Selenium.DevTools.V85.Fetch.AuthChallengeResponse() + { + Response = OpenQA.Selenium.DevTools.V85.Fetch.AuthChallengeResponseResponseValues.CancelAuth + } + }); + } + + private void OnFetchAuthRequired(object sender, OpenQA.Selenium.DevTools.V85.Fetch.AuthRequiredEventArgs e) + { + if (this.AuthRequired != null) + { + AuthRequiredEventArgs wrapped = new AuthRequiredEventArgs() + { + RequestId = e.RequestId, + Uri = e.AuthChallenge.Origin + }; + this.AuthRequired(this, wrapped); + } + } + + private void OnFetchRequestPaused(object sender, OpenQA.Selenium.DevTools.V85.Fetch.RequestPausedEventArgs e) + { + if (this.RequestPaused != null) + { + RequestPausedEventArgs wrapped = new RequestPausedEventArgs(); + if (e.ResponseErrorReason == null && e.ResponseStatusCode == null) + { + wrapped.RequestData = new HttpRequestData() + { + RequestId = e.RequestId, + Method = e.Request.Method, + Url = e.Request.Url, + PostData = e.Request.PostData, + Headers = new Dictionary(e.Request.Headers) + }; + } + this.RequestPaused(this, wrapped); + } + } + } +} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/v85/V85Target.cs b/dotnet/src/webdriver/DevTools/v85/V85Target.cs new file mode 100644 index 0000000000000..16da913061121 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v85/V85Target.cs @@ -0,0 +1,53 @@ +using OpenQA.Selenium.DevTools.V85.Target; +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools.V85 +{ + + public class V85Target : ITarget + { + private TargetAdapter adapter; + + public V85Target(TargetAdapter adapter) + { + this.adapter = adapter; + } + + public async Task> GetTargets() + { + List targets = new List(); + var response = await adapter.GetTargets(); + for (int i = 0; i < response.TargetInfos.Length; i++) + { + var targetInfo = response.TargetInfos[i]; + var mapped = new TargetInfo() + { + TargetId = targetInfo.TargetId, + Title = targetInfo.Title, + Type = targetInfo.Type, + Url = targetInfo.Url, + OpenerId = targetInfo.OpenerId, + BrowserContextId = targetInfo.BrowserContextId, + IsAttached = targetInfo.Attached + }; + targets.Add(mapped); + } + + return targets; + } + + public async Task AttachToTarget(string targetId) + { + var result = await adapter.AttachToTarget(new AttachToTargetCommandSettings() { TargetId = targetId, Flatten = true }); + return result.SessionId; + } + + public async Task SetAutoAttach() + { + await adapter.SetAutoAttach(new SetAutoAttachCommandSettings() { AutoAttach = true, WaitForDebuggerOnStart = false, Flatten = true }); + } + } +} diff --git a/dotnet/src/webdriver/DevTools/v85/generator_settings.json b/dotnet/src/webdriver/DevTools/v85/generator_settings.json new file mode 100644 index 0000000000000..d8eaf517b0b3d --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v85/generator_settings.json @@ -0,0 +1,11 @@ +{ + "include": [ + { + "templatePath": "DevToolsSessionDomains.hbs", + "outputPath": "DevToolsSessionDomains.cs" + } + ], + "rootNamespace": "OpenQA.Selenium.DevTools.V85", + "runtimeVersion": "", + "includeExperimentalDomains": true +} diff --git a/dotnet/src/webdriver/DevTools/v86/V86Domains.cs b/dotnet/src/webdriver/DevTools/v86/V86Domains.cs new file mode 100644 index 0000000000000..61822d490b09d --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v86/V86Domains.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenQA.Selenium.DevTools.V86 +{ + public class V86Domains : IDomains + { + private DevToolsSessionDomains domains; + + public V86Domains(DevToolsSession session) + { + this.domains = new DevToolsSessionDomains(session); + } + + public static int DevToolsVersion = 86; + + public DevTools.DevToolsSessionDomains VersionSpecificDomains => this.domains; + + public INetwork Network => new V86Network(domains.Network, domains.Fetch); + + public IJavaScript JavaScript => new V86JavaScript(domains.Runtime, domains.Page); + + public ITarget Target => new V86Target(domains.Target); + + public ILog Log => new V86Log(domains.Log); + } +} diff --git a/dotnet/src/webdriver/DevTools/v86/V86JavaScript.cs b/dotnet/src/webdriver/DevTools/v86/V86JavaScript.cs new file mode 100644 index 0000000000000..524912d80c8d1 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v86/V86JavaScript.cs @@ -0,0 +1,122 @@ +using OpenQA.Selenium.DevTools.V86.Page; +using OpenQA.Selenium.DevTools.V86.Runtime; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools.V86 +{ + public class V86JavaScript : IJavaScript + { + private RuntimeAdapter runtime; + private PageAdapter page; + + public V86JavaScript(RuntimeAdapter runtime, PageAdapter page) + { + this.runtime = runtime; + this.page = page; + this.runtime.BindingCalled += OnRuntimeBindingCalled; + this.runtime.ConsoleAPICalled += OnRuntimeConsoleApiCalled; + this.runtime.ExceptionThrown += OnRuntimeExceptionThrown; + } + + public event EventHandler BindingCalled; + public event EventHandler ConsoleApiCalled; + public event EventHandler ExceptionThrown; + + public async Task EnablePage() + { + await page.Enable(); + } + + public async Task DisablePage() + { + await page.Disable(); + } + + public async Task EnableRuntime() + { + await runtime.Enable(); + } + + public async Task DisableRuntime() + { + await runtime.Disable(); + } + + public async Task AddScriptToEvaluateOnNewDocument(string script) + { + var result = await page.AddScriptToEvaluateOnNewDocument(new AddScriptToEvaluateOnNewDocumentCommandSettings() { Source = script }); + return result.Identifier; + } + + public async Task RemoveScriptToEvaluateOnNewDocument(string scriptId) + { + await page.RemoveScriptToEvaluateOnNewDocument(new RemoveScriptToEvaluateOnNewDocumentCommandSettings() { Identifier = scriptId }); + } + + public async Task AddBinding(string name) + { + await runtime.AddBinding(new AddBindingCommandSettings() { Name = name }); + } + + public async Task RemoveBinding(string name) + { + await runtime.RemoveBinding(new RemoveBindingCommandSettings() { Name = name }); + } + + private void OnRuntimeBindingCalled(object sender, Runtime.BindingCalledEventArgs e) + { + if (this.BindingCalled != null) + { + BindingCalledEventArgs wrapped = new BindingCalledEventArgs() + { + ExecutionContextId = e.ExecutionContextId, + Name = e.Name, + Payload = e.Payload + }; + this.BindingCalled(this, wrapped); + } + } + + private void OnRuntimeExceptionThrown(object sender, Runtime.ExceptionThrownEventArgs e) + { + if (this.ExceptionThrown != null) + { + var wrapped = new ExceptionThrownEventArgs() + { + Timestamp = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(e.Timestamp), + Message = e.ExceptionDetails.Text + }; + + // TODO: Collect stack trace elements + this.ExceptionThrown(this, wrapped); + } + } + + private void OnRuntimeConsoleApiCalled(object sender, ConsoleAPICalledEventArgs e) + { + if (this.ConsoleApiCalled != null) + { + var wrapped = new ConsoleApiCalledEventArgs() + { + Timestamp = new DateTime(1979, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(e.Timestamp), + Type = e.Type, + Arguments = new List() + }; + + foreach (var arg in e.Args) + { + string argValue = null; + if (arg.Value != null) + { + argValue = arg.Value.ToString(); + } + wrapped.Arguments.Add(new ConsoleApiArgument() { Type = arg.Type.ToString(), Value = argValue }); + } + + this.ConsoleApiCalled(this, wrapped); + } + } + } +} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/v86/V86Log.cs b/dotnet/src/webdriver/DevTools/v86/V86Log.cs new file mode 100644 index 0000000000000..1d076a51aee60 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v86/V86Log.cs @@ -0,0 +1,44 @@ +using OpenQA.Selenium.DevTools.V86.Log; +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools.V86 +{ + public class V86Log : ILog + { + private LogAdapter adapter; + + public V86Log(LogAdapter adapter) + { + this.adapter = adapter; + this.adapter.EntryAdded += OnAdapterEntryAdded; + } + + public event EventHandler EntryAdded; + + public async Task Clear() + { + await adapter.Clear(); + } + + public async Task Enable() + { + await adapter.Enable(); + } + + private void OnAdapterEntryAdded(object sender, Log.EntryAddedEventArgs e) + { + if (this.EntryAdded != null) + { + EntryAddedEventArgs propagated = new EntryAddedEventArgs(); + propagated.Entry = new LogEntry(); + propagated.Entry.Kind = e.Entry.Source.ToString(); + propagated.Entry.Message = e.Entry.Text; + this.EntryAdded(this, propagated); + } + } + } +} diff --git a/dotnet/src/webdriver/DevTools/v86/V86Network.cs b/dotnet/src/webdriver/DevTools/v86/V86Network.cs new file mode 100644 index 0000000000000..3febe099eae06 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v86/V86Network.cs @@ -0,0 +1,142 @@ +using OpenQA.Selenium.DevTools.V86.Fetch; +using OpenQA.Selenium.DevTools.V86.Network; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools.V86 +{ + public class V86Network : INetwork + { + private FetchAdapter fetch; + private NetworkAdapter network; + + public V86Network(NetworkAdapter network, FetchAdapter fetch) + { + this.network = network; + this.fetch = fetch; + fetch.AuthRequired += OnFetchAuthRequired; + fetch.RequestPaused += OnFetchRequestPaused; + } + + public event EventHandler AuthRequired; + public event EventHandler RequestPaused; + + public async Task DisableNetworkCaching() + { + await network.SetCacheDisabled(new SetCacheDisabledCommandSettings() { CacheDisabled = true }); + } + + public async Task EnableNetworkCaching() + { + await network.SetCacheDisabled(new SetCacheDisabledCommandSettings() { CacheDisabled = false }); + } + + public async Task EnableFetchForAllPatterns() + { + await fetch.Enable(new OpenQA.Selenium.DevTools.V86.Fetch.EnableCommandSettings() + { + Patterns = new OpenQA.Selenium.DevTools.V86.Fetch.RequestPattern[] + { + new OpenQA.Selenium.DevTools.V86.Fetch.RequestPattern() { UrlPattern = "*" } + }, + HandleAuthRequests = true + }); + } + + public async Task DisableFetch() + { + await fetch.Disable(); + } + + public async Task ContinueRequest(HttpRequestData requestData, HttpResponseData responseData) + { + var commandSettings = new FulfillRequestCommandSettings() + { + RequestId = requestData.RequestId, + ResponseCode = responseData.StatusCode, + }; + + if (responseData.Headers.Count > 0) + { + List headers = new List(); + foreach(KeyValuePair headerPair in responseData.Headers) + { + headers.Add(new HeaderEntry() { Name = headerPair.Key, Value = headerPair.Value }); + } + + commandSettings.ResponseHeaders = headers.ToArray(); + } + + if (!string.IsNullOrEmpty(responseData.Body)) + { + // TODO: base64 encode? + commandSettings.Body = responseData.Body; + } + + await fetch.FulfillRequest(commandSettings); + } + + public async Task ContinueWithoutModification(HttpRequestData requestData) + { + await fetch.ContinueRequest(new ContinueRequestCommandSettings() { RequestId = requestData.RequestId }); + } + + public async Task ContinueWithAuth(HttpRequestData requestData, string userName, string password) + { + await fetch.ContinueWithAuth(new ContinueWithAuthCommandSettings() + { + AuthChallengeResponse = new V86.Fetch.AuthChallengeResponse() + { + Response = V86.Fetch.AuthChallengeResponseResponseValues.ProvideCredentials, + Username = userName, + Password = password + } + }); + } + + public async Task CancelAuth(HttpRequestData requestData) + { + await fetch.ContinueWithAuth(new ContinueWithAuthCommandSettings() + { + AuthChallengeResponse = new OpenQA.Selenium.DevTools.V86.Fetch.AuthChallengeResponse() + { + Response = V86.Fetch.AuthChallengeResponseResponseValues.CancelAuth + } + }); + } + + private void OnFetchAuthRequired(object sender, Fetch.AuthRequiredEventArgs e) + { + if (this.AuthRequired != null) + { + AuthRequiredEventArgs wrapped = new AuthRequiredEventArgs() + { + RequestId = e.RequestId, + Uri = e.AuthChallenge.Origin + }; + this.AuthRequired(this, wrapped); + } + } + + private void OnFetchRequestPaused(object sender, Fetch.RequestPausedEventArgs e) + { + if (this.RequestPaused != null) + { + RequestPausedEventArgs wrapped = new RequestPausedEventArgs(); + if (e.ResponseErrorReason == null && e.ResponseStatusCode == null) + { + wrapped.RequestData = new HttpRequestData() + { + RequestId = e.RequestId, + Method = e.Request.Method, + Url = e.Request.Url, + PostData = e.Request.PostData, + Headers = new Dictionary(e.Request.Headers) + }; + } + this.RequestPaused(this, wrapped); + } + } + } +} \ No newline at end of file diff --git a/dotnet/src/webdriver/DevTools/v86/V86Target.cs b/dotnet/src/webdriver/DevTools/v86/V86Target.cs new file mode 100644 index 0000000000000..fe0adbbd49874 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v86/V86Target.cs @@ -0,0 +1,53 @@ +using OpenQA.Selenium.DevTools.V86.Target; +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; + +namespace OpenQA.Selenium.DevTools.V86 +{ + + public class V86Target : ITarget + { + private TargetAdapter adapter; + + public V86Target(TargetAdapter adapter) + { + this.adapter = adapter; + } + + public async Task> GetTargets() + { + List targets = new List(); + var response = await adapter.GetTargets(); + for (int i = 0; i < response.TargetInfos.Length; i++) + { + var targetInfo = response.TargetInfos[i]; + var mapped = new TargetInfo() + { + TargetId = targetInfo.TargetId, + Title = targetInfo.Title, + Type = targetInfo.Type, + Url = targetInfo.Url, + OpenerId = targetInfo.OpenerId, + BrowserContextId = targetInfo.BrowserContextId, + IsAttached = targetInfo.Attached + }; + targets.Add(mapped); + } + + return targets; + } + + public async Task AttachToTarget(string targetId) + { + var result = await adapter.AttachToTarget(new AttachToTargetCommandSettings() { TargetId = targetId, Flatten = true }); + return result.SessionId; + } + + public async Task SetAutoAttach() + { + await adapter.SetAutoAttach(new SetAutoAttachCommandSettings() { AutoAttach = true, WaitForDebuggerOnStart = false, Flatten = true }); + } + } +} diff --git a/dotnet/src/webdriver/DevTools/v86/generator_settings.json b/dotnet/src/webdriver/DevTools/v86/generator_settings.json new file mode 100644 index 0000000000000..2a8fba73dc206 --- /dev/null +++ b/dotnet/src/webdriver/DevTools/v86/generator_settings.json @@ -0,0 +1,11 @@ +{ + "include": [ + { + "templatePath": "DevToolsSessionDomains.hbs", + "outputPath": "DevToolsSessionDomains.cs" + } + ], + "rootNamespace": "OpenQA.Selenium.DevTools.V86", + "runtimeVersion": "", + "includeExperimentalDomains": true +} diff --git a/dotnet/src/webdriver/WebDriver.csproj b/dotnet/src/webdriver/WebDriver.csproj index 21cc4775aa1d5..35500a1367df8 100644 --- a/dotnet/src/webdriver/WebDriver.csproj +++ b/dotnet/src/webdriver/WebDriver.csproj @@ -91,6 +91,12 @@ + + + + + + diff --git a/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd b/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd index 2d0e8937e0dd0..4010af3470959 100644 --- a/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd +++ b/dotnet/src/webdriver/WebDriver.csproj.prebuild.cmd @@ -19,3 +19,24 @@ if not exist "%1..\..\..\bazel-bin\javascript\atoms\fragments\find-elements.js" bazel build //javascript/atoms/fragments:find-elements.js popd ) + +if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\generated\v84\DevToolsSessionDomains.cs" ( + echo Generating CDP code for version 84 + pushd "%1..\..\.." + bazel build //dotnet/src/webdriver/DevTools:generate-v84 + popd +) + +if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\generated\v85\DevToolsSessionDomains.cs" ( + echo Generating CDP code for version 85 + pushd "%1..\..\.." + bazel build //dotnet/src/webdriver/DevTools:generate-v85 + popd +) + +if not exist "%1..\..\..\bazel-bin\dotnet\src\webdriver\generated\v86\DevToolsSessionDomains.cs" ( + echo Generating CDP code for version 86 + pushd "%1..\..\.." + bazel build //dotnet/src/webdriver/DevTools:generate-v86 + popd +) diff --git a/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh b/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh index 6b83185b934e5..b0beddf9edf3c 100755 --- a/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh +++ b/dotnet/src/webdriver/WebDriver.csproj.prebuild.sh @@ -16,3 +16,21 @@ then echo "Building findElements atom" bazel build //javascript/atoms/fragments:find-elements.js fi + +if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/generated/v84/DevToolsSessionDomains.cs" ]] +then + echo "Generating CDP code for version 84" + bazel build //dotnet/src/webdriver/DevTools:generate-v84 +fi + +if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/generated/v85/DevToolsSessionDomains.cs" ]] +then + echo "Generating CDP code for version 85" + bazel build //dotnet/src/webdriver/DevTools:generate-v85 +fi + +if [[ ! -f "$1../../../bazel-bin/dotnet/src/webdriver/generated/v86/DevToolsSessionDomains.cs" ]] +then + echo "Generating CDP code for version 86" + bazel build //dotnet/src/webdriver/DevTools:generate-v86 +fi diff --git a/dotnet/test/common/DevTools/DevToolsConsoleTest.cs b/dotnet/test/common/DevTools/DevToolsConsoleTest.cs index fba7e2440a2a4..09f6bb0d66c23 100644 --- a/dotnet/test/common/DevTools/DevToolsConsoleTest.cs +++ b/dotnet/test/common/DevTools/DevToolsConsoleTest.cs @@ -19,25 +19,26 @@ public class DevToolsConsoleTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyMessageAdded() { + var domains = session.GetVersionSpecificDomains(); string consoleMessage = "Hello Selenium"; ManualResetEventSlim sync = new ManualResetEventSlim(false); - EventHandler messageAddedHandler = (sender, e) => + EventHandler messageAddedHandler = (sender, e) => { Assert.That(e.Message.Text, Is.EqualTo(consoleMessage)); sync.Set(); }; - session.Console.MessageAdded += messageAddedHandler; + domains.Console.MessageAdded += messageAddedHandler; - await session.Console.Enable(); + await domains.Console.Enable(); driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("devToolsConsoleTest.html"); ((IJavaScriptExecutor)driver).ExecuteScript("console.log('" + consoleMessage + "');"); sync.Wait(TimeSpan.FromSeconds(5)); - session.Console.MessageAdded -= messageAddedHandler; + domains.Console.MessageAdded -= messageAddedHandler; - await session.Console.Disable(); + await domains.Console.Disable(); } } } diff --git a/dotnet/test/common/DevTools/DevToolsLogTest.cs b/dotnet/test/common/DevTools/DevToolsLogTest.cs index 3b40f7d5b2eea..431c626aba56d 100644 --- a/dotnet/test/common/DevTools/DevToolsLogTest.cs +++ b/dotnet/test/common/DevTools/DevToolsLogTest.cs @@ -19,24 +19,25 @@ public class DevToolsLogTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyEntryAddedAndClearLog() { + var domains = session.GetVersionSpecificDomains(); ManualResetEventSlim sync = new ManualResetEventSlim(false); - EventHandler entryAddedHandler = (sender, e) => + EventHandler entryAddedHandler = (sender, e) => { Assert.That(e.Entry.Text.Contains("404")); - Assert.That(e.Entry.Level == "error"); + Assert.That(e.Entry.Level == V86.Log.LogEntryLevelValues.Error); sync.Set(); }; - await session.Log.Enable(); - session.Log.EntryAdded += entryAddedHandler; + await domains.Log.Enable(); + domains.Log.EntryAdded += entryAddedHandler; driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIsSecure("notValidPath"); sync.Wait(TimeSpan.FromSeconds(5)); - session.Log.EntryAdded -= entryAddedHandler; + domains.Log.EntryAdded -= entryAddedHandler; - await session.Log.Clear(); - await session.Log.Disable(); + await domains.Log.Clear(); + await domains.Log.Disable(); } } } diff --git a/dotnet/test/common/DevTools/DevToolsNetworkTest.cs b/dotnet/test/common/DevTools/DevToolsNetworkTest.cs index c1804f0ca7184..571254e89b452 100644 --- a/dotnet/test/common/DevTools/DevToolsNetworkTest.cs +++ b/dotnet/test/common/DevTools/DevToolsNetworkTest.cs @@ -19,46 +19,47 @@ public class DevToolsNetworkTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.IE, "IE does not support Chrome DevTools Protocol")] [IgnoreBrowser(Selenium.Browser.Firefox, "Firefox does not support Chrome DevTools Protocol")] [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] - public async Task GetSetDeleteAndClearAllCookies() + public void GetSetDeleteAndClearAllCookies() { - await session.Network.Enable(new Network.EnableCommandSettings()); + //var domains = session.GetVersionSpecificDomains(); + //await domains.Network.Enable(new V86.Network.EnableCommandSettings()); - var allCookieResponse = await session.Network.GetAllCookies(); - ReadOnlyCollection seleniumCookies = allCookieResponse.Cookies.ToSeleniumCookies(); - Assert.That(seleniumCookies.Count == 0); + //var allCookieResponse = await domains.Network.GetAllCookies(); + //ReadOnlyCollection seleniumCookies = allCookieResponse.Cookies.ToSeleniumCookies(); + //Assert.That(seleniumCookies.Count == 0); - Cookie cookie = new ReturnedCookie("name", "value", EnvironmentManager.Instance.UrlBuilder.HostName, "/devtools/test", null, false, true); - var setCookieResponse = await session.Network.SetCookie(cookie.ToDevToolsSetCookieCommandSettings()); + //Cookie cookie = new ReturnedCookie("name", "value", EnvironmentManager.Instance.UrlBuilder.HostName, "/devtools/test", null, false, true); + //var setCookieResponse = await domains.Network.SetCookie(cookie.ToDevToolsSetCookieCommandSettings()); - Assert.That(setCookieResponse.Success); + //Assert.That(setCookieResponse.Success); - allCookieResponse = await session.Network.GetAllCookies(); - seleniumCookies = allCookieResponse.Cookies.ToSeleniumCookies(); - Assert.That(seleniumCookies.Count == 1); + //allCookieResponse = await domains.Network.GetAllCookies(); + //seleniumCookies = allCookieResponse.Cookies.ToSeleniumCookies(); + //Assert.That(seleniumCookies.Count == 1); - var cookieResponse = await session.Network.GetCookies(new Network.GetCookiesCommandSettings()); - seleniumCookies = cookieResponse.Cookies.ToSeleniumCookies(); - Assert.That(seleniumCookies.Count == 0); + //var cookieResponse = await domains.Network.GetCookies(new V86.Network.GetCookiesCommandSettings()); + //seleniumCookies = cookieResponse.Cookies.ToSeleniumCookies(); + //Assert.That(seleniumCookies.Count == 0); - await session.Network.DeleteCookies(new Network.DeleteCookiesCommandSettings() - { - Name = "name", - Domain = EnvironmentManager.Instance.UrlBuilder.HostName, - Path = "/devtools/test" - }); + //await domains.Network.DeleteCookies(new V86.Network.DeleteCookiesCommandSettings() + //{ + // Name = "name", + // Domain = EnvironmentManager.Instance.UrlBuilder.HostName, + // Path = "/devtools/test" + //}); - await session.Network.ClearBrowserCookies(); + //await domains.Network.ClearBrowserCookies(); - allCookieResponse = await session.Network.GetAllCookies(); - seleniumCookies = allCookieResponse.Cookies.ToSeleniumCookies(); - Assert.That(seleniumCookies.Count == 0); + //allCookieResponse = await domains.Network.GetAllCookies(); + //seleniumCookies = allCookieResponse.Cookies.ToSeleniumCookies(); + //Assert.That(seleniumCookies.Count == 0); - setCookieResponse = await session.Network.SetCookie(cookie.ToDevToolsSetCookieCommandSettings()); - Assert.That(setCookieResponse.Success); + //setCookieResponse = await domains.Network.SetCookie(cookie.ToDevToolsSetCookieCommandSettings()); + //Assert.That(setCookieResponse.Success); - allCookieResponse = await session.Network.GetAllCookies(); - seleniumCookies = allCookieResponse.Cookies.ToSeleniumCookies(); - Assert.That(seleniumCookies.Count == 1); + //allCookieResponse = await domains.Network.GetAllCookies(); + //seleniumCookies = allCookieResponse.Cookies.ToSeleniumCookies(); + //Assert.That(seleniumCookies.Count == 1); } [Test] @@ -68,47 +69,48 @@ await session.Network.DeleteCookies(new Network.DeleteCookiesCommandSettings() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SendRequestWithUrlFiltersAndExtraHeadersAndVerifyRequests() { - await session.Network.Enable(new Network.EnableCommandSettings()); - await session.Network.SetBlockedURLs(new Network.SetBlockedURLsCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V86.Network.EnableCommandSettings()); + await domains.Network.SetBlockedURLs(new V86.Network.SetBlockedURLsCommandSettings() { Urls = new string[] { "*://*/*.css" } }); - var additionalHeaders = new Network.Headers(); + var additionalHeaders = new V86.Network.Headers(); additionalHeaders.Add("headerName", "headerValue"); - await session.Network.SetExtraHTTPHeaders(new Network.SetExtraHTTPHeadersCommandSettings() + await domains.Network.SetExtraHTTPHeaders(new V86.Network.SetExtraHTTPHeadersCommandSettings() { Headers = additionalHeaders }); ManualResetEventSlim loadingFailedSync = new ManualResetEventSlim(false); - EventHandler loadingFailedHandler = (sender, e) => + EventHandler loadingFailedHandler = (sender, e) => { - if (e.Type == Network.ResourceType.Stylesheet) + if (e.Type == V86.Network.ResourceType.Stylesheet) { - Assert.That(e.BlockedReason == Network.BlockedReason.Inspector); + Assert.That(e.BlockedReason == V86.Network.BlockedReason.Inspector); } loadingFailedSync.Set(); }; - session.Network.LoadingFailed += loadingFailedHandler; + domains.Network.LoadingFailed += loadingFailedHandler; ManualResetEventSlim requestSentSync = new ManualResetEventSlim(false); - EventHandler requestWillBeSentHandler = (sender, e) => + EventHandler requestWillBeSentHandler = (sender, e) => { Assert.That(e.Request.Headers.ContainsKey("headerName")); Assert.That(e.Request.Headers["headerName"] == "headerValue"); requestSentSync.Set(); }; - session.Network.RequestWillBeSent += requestWillBeSentHandler; + domains.Network.RequestWillBeSent += requestWillBeSentHandler; ManualResetEventSlim dataSync = new ManualResetEventSlim(false); - EventHandler dataReceivedHandler = (sender, e) => + EventHandler dataReceivedHandler = (sender, e) => { Assert.That(e.RequestId, Is.Not.Null); dataSync.Set(); }; - session.Network.DataReceived += dataReceivedHandler; + domains.Network.DataReceived += dataReceivedHandler; driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("js/skins/lightgray/content.min.css"); loadingFailedSync.Wait(TimeSpan.FromSeconds(5)); @@ -123,27 +125,28 @@ await session.Network.SetExtraHTTPHeaders(new Network.SetExtraHTTPHeadersCommand [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task EmulateNetworkConditionOffline() { - await session.Network.Enable(new Network.EnableCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V86.Network.EnableCommandSettings() { MaxTotalBufferSize = 100000000 }); - await session.Network.EmulateNetworkConditions(new Network.EmulateNetworkConditionsCommandSettings() + await domains.Network.EmulateNetworkConditions(new V86.Network.EmulateNetworkConditionsCommandSettings() { Offline = true, Latency = 100, DownloadThroughput = 1000, UploadThroughput = 2000, - ConnectionType = Network.ConnectionType.Cellular3g + ConnectionType = V86.Network.ConnectionType.Cellular3g }); ManualResetEventSlim loadingFailedSync = new ManualResetEventSlim(false); - EventHandler loadingFailedHandler = (sender, e) => + EventHandler loadingFailedHandler = (sender, e) => { Assert.That(e.ErrorText, Is.EqualTo("net::ERR_INTERNET_DISCONNECTED")); loadingFailedSync.Set(); }; - session.Network.LoadingFailed += loadingFailedHandler; + domains.Network.LoadingFailed += loadingFailedHandler; driver.Url = simpleTestPage; loadingFailedSync.Wait(TimeSpan.FromSeconds(5)); @@ -156,36 +159,37 @@ await session.Network.EmulateNetworkConditions(new Network.EmulateNetworkConditi [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyRequestReceivedFromCacheAndResponseBody() { + var domains = session.GetVersionSpecificDomains(); string[] requestIdFromCache = new string[1]; - await session.Network.Enable(new Network.EnableCommandSettings() + await domains.Network.Enable(new V86.Network.EnableCommandSettings() { MaxResourceBufferSize = 100000000 }); ManualResetEventSlim servedFromCacheSync = new ManualResetEventSlim(false); - EventHandler requestServedFromCacheHandler = (sender, e) => + EventHandler requestServedFromCacheHandler = (sender, e) => { Assert.That(e.RequestId, Is.Not.Null); requestIdFromCache[0] = e.RequestId; servedFromCacheSync.Set(); }; - session.Network.RequestServedFromCache += requestServedFromCacheHandler; + domains.Network.RequestServedFromCache += requestServedFromCacheHandler; ManualResetEventSlim loadingFinishedSync = new ManualResetEventSlim(false); - EventHandler loadingFinishedHandler = (sender, e) => + EventHandler loadingFinishedHandler = (sender, e) => { Assert.That(e.RequestId, Is.Not.Null); loadingFinishedSync.Set(); }; - session.Network.LoadingFinished += loadingFinishedHandler; + domains.Network.LoadingFinished += loadingFinishedHandler; driver.Url = simpleTestPage; driver.Url = simpleTestPage; loadingFinishedSync.Wait(TimeSpan.FromSeconds(5)); servedFromCacheSync.Wait(TimeSpan.FromSeconds(5)); - var responseBody = await session.Network.GetResponseBody(new Network.GetResponseBodyCommandSettings() + var responseBody = await domains.Network.GetResponseBody(new V86.Network.GetResponseBodyCommandSettings() { RequestId = requestIdFromCache[0] }); @@ -200,26 +204,27 @@ await session.Network.Enable(new Network.EnableCommandSettings() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifySearchInResponseBody() { + var domains = session.GetVersionSpecificDomains(); string[] requestIds = new string[1]; - await session.Network.Enable(new Network.EnableCommandSettings() + await domains.Network.Enable(new V86.Network.EnableCommandSettings() { MaxResourceBufferSize = 100000000 }); ManualResetEventSlim responseSync = new ManualResetEventSlim(false); - EventHandler responseReceivedHandler = (sender, e) => + EventHandler responseReceivedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); requestIds[0] = e.RequestId; responseSync.Set(); }; - session.Network.ResponseReceived += responseReceivedHandler; + domains.Network.ResponseReceived += responseReceivedHandler; driver.Url = simpleTestPage; responseSync.Wait(TimeSpan.FromSeconds(5)); - var searchResponse = await session.Network.SearchInResponseBody(new Network.SearchInResponseBodyCommandSettings() + var searchResponse = await domains.Network.SearchInResponseBody(new V86.Network.SearchInResponseBodyCommandSettings() { RequestId = requestIds[0], Query = "/", @@ -235,30 +240,30 @@ await session.Network.Enable(new Network.EnableCommandSettings() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyCacheDisabledAndClearCache() { - - await session.Network.Enable(new Network.EnableCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V86.Network.EnableCommandSettings() { MaxPostDataSize = 100000000 }); ManualResetEventSlim responseSync = new ManualResetEventSlim(false); - EventHandler responseReceivedHandler = (sender, e) => + EventHandler responseReceivedHandler = (sender, e) => { Assert.That(e.Response.FromDiskCache, Is.False); responseSync.Set(); }; - session.Network.ResponseReceived += responseReceivedHandler; + domains.Network.ResponseReceived += responseReceivedHandler; driver.Url = simpleTestPage; responseSync.Wait(TimeSpan.FromSeconds(5)); - await session.Network.SetCacheDisabled(new Network.SetCacheDisabledCommandSettings() + await domains.Network.SetCacheDisabled(new V86.Network.SetCacheDisabledCommandSettings() { CacheDisabled = true }); driver.Url = simpleTestPage; - await session.Network.ClearBrowserCache(); + await domains.Network.ClearBrowserCache(); } [Test] @@ -268,26 +273,27 @@ await session.Network.SetCacheDisabled(new Network.SetCacheDisabledCommandSettin [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyCertificatesAndOverrideUserAgent() { - await session.Network.Enable(new Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V86.Network.EnableCommandSettings()); - await session.Network.SetUserAgentOverride(new Network.SetUserAgentOverrideCommandSettings() + await domains.Network.SetUserAgentOverride(new V86.Network.SetUserAgentOverrideCommandSettings() { UserAgent = "userAgent" }); ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler requestWillBeSentHandler = (sender, e) => + EventHandler requestWillBeSentHandler = (sender, e) => { Assert.That(e.Request.Headers["User-Agent"], Is.EqualTo("userAgent")); requestSync.Set(); }; - session.Network.RequestWillBeSent += requestWillBeSentHandler; + domains.Network.RequestWillBeSent += requestWillBeSentHandler; string origin = EnvironmentManager.Instance.UrlBuilder.WhereIsSecure("simpleTest.html"); driver.Url = origin; requestSync.Wait(TimeSpan.FromSeconds(5)); - var result = await session.Network.GetCertificate(new Network.GetCertificateCommandSettings() + var result = await domains.Network.GetCertificate(new V86.Network.GetCertificateCommandSettings() { Origin = origin }); @@ -302,18 +308,19 @@ await session.Network.SetUserAgentOverride(new Network.SetUserAgentOverrideComma [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyResponseReceivedEventAndNetworkDisable() { - await session.Network.Enable(new Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V86.Network.EnableCommandSettings()); ManualResetEventSlim responseSync = new ManualResetEventSlim(false); - EventHandler responseReceivedHandler = (sender, e) => + EventHandler responseReceivedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); responseSync.Set(); }; - session.Network.ResponseReceived += responseReceivedHandler; + domains.Network.ResponseReceived += responseReceivedHandler; driver.Url = simpleTestPage; responseSync.Wait(TimeSpan.FromSeconds(5)); - await session.Network.Disable(); + await domains.Network.Disable(); } [Test] @@ -323,37 +330,38 @@ public async Task VerifyResponseReceivedEventAndNetworkDisable() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyWebSocketOperations() { - await session.Network.Enable(new Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V86.Network.EnableCommandSettings()); - EventHandler webSocketCreatedHandler = (sender, e) => + EventHandler webSocketCreatedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); }; - session.Network.WebSocketCreated += webSocketCreatedHandler; + domains.Network.WebSocketCreated += webSocketCreatedHandler; - EventHandler webSocketFrameReceivedHandler = (sender, e) => + EventHandler webSocketFrameReceivedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); }; - session.Network.WebSocketFrameReceived += webSocketFrameReceivedHandler; + domains.Network.WebSocketFrameReceived += webSocketFrameReceivedHandler; - EventHandlerwebSocketFrameErrorHandler = (sender, e) => + EventHandlerwebSocketFrameErrorHandler = (sender, e) => { Assert.That(e, Is.Not.Null); }; - session.Network.WebSocketFrameError += webSocketFrameErrorHandler; + domains.Network.WebSocketFrameError += webSocketFrameErrorHandler; - EventHandler webSocketFrameSentHandler = (sender, e) => + EventHandler webSocketFrameSentHandler = (sender, e) => { Assert.That(e, Is.Not.Null); }; - session.Network.WebSocketFrameSent += webSocketFrameSentHandler; + domains.Network.WebSocketFrameSent += webSocketFrameSentHandler; - EventHandler webSocketClosedHandler = (sender, e) => + EventHandler webSocketClosedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); }; - session.Network.WebSocketClosed += webSocketClosedHandler; + domains.Network.WebSocketClosed += webSocketClosedHandler; driver.Url = simpleTestPage; } @@ -365,12 +373,13 @@ public async Task VerifyWebSocketOperations() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyRequestPostData() { - await session.Network.Enable(new Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V86.Network.EnableCommandSettings()); string[] requestIds = new string[1]; ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler requestWillBeSentHandler = (sender, e) => + EventHandler requestWillBeSentHandler = (sender, e) => { Assert.That(e, Is.Not.Null); if (string.Compare(e.Request.Method, "post", StringComparison.OrdinalIgnoreCase) == 0) @@ -379,13 +388,13 @@ public async Task VerifyRequestPostData() } requestSync.Set(); }; - session.Network.RequestWillBeSent += requestWillBeSentHandler; + domains.Network.RequestWillBeSent += requestWillBeSentHandler; driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("postForm.html"); driver.FindElement(By.XPath("//form/input")).Click(); requestSync.Wait(TimeSpan.FromSeconds(5)); - var response = await session.Network.GetRequestPostData(new Network.GetRequestPostDataCommandSettings() + var response = await domains.Network.GetRequestPostData(new V86.Network.GetRequestPostDataCommandSettings() { RequestId = requestIds[0] }); @@ -400,8 +409,9 @@ public async Task VerifyRequestPostData() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task ByPassServiceWorker() { - await session.Network.Enable(new Network.EnableCommandSettings()); - await session.Network.SetBypassServiceWorker(new Network.SetBypassServiceWorkerCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V86.Network.EnableCommandSettings()); + await domains.Network.SetBypassServiceWorker(new V86.Network.SetBypassServiceWorkerCommandSettings() { Bypass = true }); @@ -414,9 +424,10 @@ await session.Network.SetBypassServiceWorker(new Network.SetBypassServiceWorkerC [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task DataSizeLimitsForTest() { - await session.Network.Enable(new Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V86.Network.EnableCommandSettings()); - await session.Network.SetDataSizeLimitsForTest(new Network.SetDataSizeLimitsForTestCommandSettings() + await domains.Network.SetDataSizeLimitsForTest(new V86.Network.SetDataSizeLimitsForTestCommandSettings() { MaxResourceSize = 10000, MaxTotalSize = 100000 @@ -430,15 +441,16 @@ await session.Network.SetDataSizeLimitsForTest(new Network.SetDataSizeLimitsForT [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyEventSourceMessage() { - await session.Network.Enable(new Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V86.Network.EnableCommandSettings()); ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler eventSourceMessageReceivedHandler = (sender, e) => + EventHandler eventSourceMessageReceivedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); requestSync.Set(); }; - session.Network.EventSourceMessageReceived += eventSourceMessageReceivedHandler; + domains.Network.EventSourceMessageReceived += eventSourceMessageReceivedHandler; driver.Url = simpleTestPage; requestSync.Wait(TimeSpan.FromSeconds(5)); @@ -451,15 +463,16 @@ public async Task VerifyEventSourceMessage() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifySignedExchangeReceived() { - await session.Network.Enable(new Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V86.Network.EnableCommandSettings()); ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler signedExchangeReceivedHandler = (sender, e) => + EventHandler signedExchangeReceivedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); requestSync.Set(); }; - session.Network.SignedExchangeReceived += signedExchangeReceivedHandler; + domains.Network.SignedExchangeReceived += signedExchangeReceivedHandler; driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIsSecure("simpleTest.html"); requestSync.Wait(TimeSpan.FromSeconds(5)); @@ -472,15 +485,16 @@ public async Task VerifySignedExchangeReceived() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task VerifyResourceChangedPriority() { - await session.Network.Enable(new Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V86.Network.EnableCommandSettings()); ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler resourceChangedPriorityHandler = (sender, e) => + EventHandler resourceChangedPriorityHandler = (sender, e) => { Assert.That(e, Is.Not.Null); requestSync.Set(); }; - session.Network.ResourceChangedPriority += resourceChangedPriorityHandler; + domains.Network.ResourceChangedPriority += resourceChangedPriorityHandler; driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIsSecure("simpleTest.html"); requestSync.Wait(TimeSpan.FromSeconds(5)); @@ -493,29 +507,30 @@ public async Task VerifyResourceChangedPriority() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task InterceptRequestAndContinue() { - await session.Network.Enable(new Network.EnableCommandSettings()); + var domains = session.GetVersionSpecificDomains(); + await domains.Network.Enable(new V86.Network.EnableCommandSettings()); ManualResetEventSlim requestSync = new ManualResetEventSlim(false); - EventHandler requestInterceptedHandler = (async (sender, e) => + EventHandler requestInterceptedHandler = (async (sender, e) => { - await session.Network.ContinueInterceptedRequest(new Network.ContinueInterceptedRequestCommandSettings() + await domains.Network.ContinueInterceptedRequest(new V86.Network.ContinueInterceptedRequestCommandSettings() { InterceptionId = e.InterceptionId }); requestSync.Set(); }); - session.Network.RequestIntercepted += requestInterceptedHandler; + domains.Network.RequestIntercepted += requestInterceptedHandler; - Network.RequestPattern pattern = new Network.RequestPattern() + var pattern = new V86.Network.RequestPattern() { UrlPattern = "*.css", - ResourceType = Network.ResourceType.Stylesheet, - InterceptionStage = Network.InterceptionStage.HeadersReceived + ResourceType = V86.Network.ResourceType.Stylesheet, + InterceptionStage = V86.Network.InterceptionStage.HeadersReceived }; - await session.Network.SetRequestInterception(new Network.SetRequestInterceptionCommandSettings() + await domains.Network.SetRequestInterception(new V86.Network.SetRequestInterceptionCommandSettings() { - Patterns = new Network.RequestPattern[] { pattern } + Patterns = new V86.Network.RequestPattern[] { pattern } }); driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("js/skins/lightgray/content.min.css"); diff --git a/dotnet/test/common/DevTools/DevToolsPerformanceTest.cs b/dotnet/test/common/DevTools/DevToolsPerformanceTest.cs index e0bf5dd1ff0de..3b0e6eaff9834 100644 --- a/dotnet/test/common/DevTools/DevToolsPerformanceTest.cs +++ b/dotnet/test/common/DevTools/DevToolsPerformanceTest.cs @@ -18,9 +18,10 @@ public class DevToolsPerformanceTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task EnableAndDisablePerformance() { - await session.Performance.Enable(); + var domains = session.GetVersionSpecificDomains(); + await domains.Performance.Enable(new V86.Performance.EnableCommandSettings()); driver.Url = simpleTestPage; - await session.Performance.Disable(); + await domains.Performance.Disable(); } [Test] @@ -30,9 +31,10 @@ public async Task EnableAndDisablePerformance() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task DisablePerformance() { - await session.Performance.Disable(); + var domains = session.GetVersionSpecificDomains(); + await domains.Performance.Disable(); driver.Url = simpleTestPage; - await session.Performance.Disable(); + await domains.Performance.Disable(); } [Test] @@ -42,14 +44,15 @@ public async Task DisablePerformance() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SetTimeDomainTimeTickPerformance() { - await session.Performance.Disable(); - await session.Performance.SetTimeDomain(new Performance.SetTimeDomainCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Performance.Disable(); + await domains.Performance.SetTimeDomain(new V86.Performance.SetTimeDomainCommandSettings() { TimeDomain = "timeTicks" }); - await session.Performance.Enable(); + await domains.Performance.Enable(new V86.Performance.EnableCommandSettings()); driver.Url = simpleTestPage; - await session.Performance.Disable(); + await domains.Performance.Disable(); } [Test] @@ -59,14 +62,15 @@ await session.Performance.SetTimeDomain(new Performance.SetTimeDomainCommandSett [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SetTimeDomainsThreadTicksPerformance() { - await session.Performance.Disable(); - await session.Performance.SetTimeDomain(new Performance.SetTimeDomainCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Performance.Disable(); + await domains.Performance.SetTimeDomain(new V86.Performance.SetTimeDomainCommandSettings() { TimeDomain = "threadTicks" }); - await session.Performance.Enable(); + await domains.Performance.Enable(new V86.Performance.EnableCommandSettings()); driver.Url = simpleTestPage; - await session.Performance.Disable(); + await domains.Performance.Disable(); } [Test] @@ -76,17 +80,18 @@ await session.Performance.SetTimeDomain(new Performance.SetTimeDomainCommandSett [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task GetMetricsByTimeTicks() { - await session.Performance.SetTimeDomain(new Performance.SetTimeDomainCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Performance.SetTimeDomain(new V86.Performance.SetTimeDomainCommandSettings() { TimeDomain = "timeTicks" }); - await session.Performance.Enable(); + await domains.Performance.Enable(new V86.Performance.EnableCommandSettings()); driver.Url = simpleTestPage; - var response = await session.Performance.GetMetrics(); - Performance.Metric[] metrics = response.Metrics; + var response = await domains.Performance.GetMetrics(); + var metrics = response.Metrics; Assert.That(metrics, Is.Not.Null); Assert.That(metrics.Length, Is.GreaterThan(0)); - await session.Performance.Disable(); + await domains.Performance.Disable(); } [Test] @@ -96,17 +101,18 @@ await session.Performance.SetTimeDomain(new Performance.SetTimeDomainCommandSett [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task GetMetricsByThreadTicks() { - await session.Performance.SetTimeDomain(new Performance.SetTimeDomainCommandSettings() + var domains = session.GetVersionSpecificDomains(); + await domains.Performance.SetTimeDomain(new V86.Performance.SetTimeDomainCommandSettings() { TimeDomain = "threadTicks" }); - await session.Performance.Enable(); + await domains.Performance.Enable(new V86.Performance.EnableCommandSettings()); driver.Url = simpleTestPage; - var response = await session.Performance.GetMetrics(); - Performance.Metric[] metrics = response.Metrics; + var response = await domains.Performance.GetMetrics(); + var metrics = response.Metrics; Assert.That(metrics, Is.Not.Null); Assert.That(metrics.Length, Is.GreaterThan(0)); - await session.Performance.Disable(); + await domains.Performance.Disable(); } } } diff --git a/dotnet/test/common/DevTools/DevToolsProfilerTest.cs b/dotnet/test/common/DevTools/DevToolsProfilerTest.cs index 669802b3809d8..5acae695c5721 100644 --- a/dotnet/test/common/DevTools/DevToolsProfilerTest.cs +++ b/dotnet/test/common/DevTools/DevToolsProfilerTest.cs @@ -18,12 +18,13 @@ public class DevToolsProfilerTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SimpleStartStopAndGetProfilerTest() { - await session.Profiler.Enable(); - await session.Profiler.Start(); - var response = await session.Profiler.Stop(); - Profiler.Profile profiler = response.Profile; + var domains = session.GetVersionSpecificDomains(); + await domains.Profiler.Enable(); + await domains.Profiler.Start(); + var response = await domains.Profiler.Stop(); + var profiler = response.Profile; ValidateProfile(profiler); - await session.Profiler.Disable(); + await domains.Profiler.Disable(); } [Test] @@ -33,18 +34,19 @@ public async Task SimpleStartStopAndGetProfilerTest() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SampleGetBestEffortProfilerTest() { - await session.Profiler.Enable(); + var domains = session.GetVersionSpecificDomains(); + await domains.Profiler.Enable(); driver.Url = simpleTestPage; - await session.Profiler.SetSamplingInterval(new Profiler.SetSamplingIntervalCommandSettings() + await domains.Profiler.SetSamplingInterval(new V86.Profiler.SetSamplingIntervalCommandSettings() { Interval = 30 }); - var response = await session.Profiler.GetBestEffortCoverage(); + var response = await domains.Profiler.GetBestEffortCoverage(); var bestEffort = response.Result; Assert.That(bestEffort, Is.Not.Null); Assert.That(bestEffort.Length, Is.GreaterThan(0)); - await session.Profiler.Disable(); + await domains.Profiler.Disable(); } [Test] @@ -54,21 +56,22 @@ await session.Profiler.SetSamplingInterval(new Profiler.SetSamplingIntervalComma [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SampleSetStartPreciseCoverageTest() { - await session.Profiler.Enable(); + var domains = session.GetVersionSpecificDomains(); + await domains.Profiler.Enable(); driver.Url = simpleTestPage; - await session.Profiler.StartPreciseCoverage(new Profiler.StartPreciseCoverageCommandSettings() + await domains.Profiler.StartPreciseCoverage(new V86.Profiler.StartPreciseCoverageCommandSettings() { CallCount = true, Detailed = true }); - await session.Profiler.Start(); - var coverageResponse = await session.Profiler.TakePreciseCoverage(); + await domains.Profiler.Start(); + var coverageResponse = await domains.Profiler.TakePreciseCoverage(); var pc = coverageResponse.Result; Assert.That(pc, Is.Not.Null); - var response = await session.Profiler.Stop(); - Profiler.Profile profiler = response.Profile; + var response = await domains.Profiler.Stop(); + var profiler = response.Profile; ValidateProfile(profiler); - await session.Profiler.Disable(); + await domains.Profiler.Disable(); } @@ -79,39 +82,40 @@ await session.Profiler.StartPreciseCoverage(new Profiler.StartPreciseCoverageCom [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task SampleProfileEvents() { - await session.Profiler.Enable(); + var domains = session.GetVersionSpecificDomains(); + await domains.Profiler.Enable(); driver.Url = simpleTestPage; ManualResetEventSlim startSync = new ManualResetEventSlim(false); - EventHandler consoleProfileStartedHandler = (sender, e) => + EventHandler consoleProfileStartedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); startSync.Set(); }; - session.Profiler.ConsoleProfileStarted += consoleProfileStartedHandler; + domains.Profiler.ConsoleProfileStarted += consoleProfileStartedHandler; - await session.Profiler.StartTypeProfile(); - await session.Profiler.Start(); + await domains.Profiler.StartTypeProfile(); + await domains.Profiler.Start(); startSync.Wait(TimeSpan.FromSeconds(5)); driver.Navigate().Refresh(); ManualResetEventSlim finishSync = new ManualResetEventSlim(false); - EventHandler consoleProfileFinishedHandler = (sender, e) => + EventHandler consoleProfileFinishedHandler = (sender, e) => { Assert.That(e, Is.Not.Null); finishSync.Set(); }; - session.Profiler.ConsoleProfileFinished += consoleProfileFinishedHandler; + domains.Profiler.ConsoleProfileFinished += consoleProfileFinishedHandler; - await session.Profiler.StopTypeProfile(); - var response = await session.Profiler.Stop(); + await domains.Profiler.StopTypeProfile(); + var response = await domains.Profiler.Stop(); finishSync.Wait(TimeSpan.FromSeconds(5)); - Profiler.Profile profiler = response.Profile; + var profiler = response.Profile; ValidateProfile(profiler); - await session.Profiler.Disable(); + await domains.Profiler.Disable(); } - private void ValidateProfile(Profiler.Profile profiler) + private void ValidateProfile(V86.Profiler.Profile profiler) { Assert.That(profiler, Is.Not.Null); Assert.That(profiler.Nodes, Is.Not.Null); diff --git a/dotnet/test/common/DevTools/DevToolsSecurityTest.cs b/dotnet/test/common/DevTools/DevToolsSecurityTest.cs index eb801b5c57147..79209e6002475 100644 --- a/dotnet/test/common/DevTools/DevToolsSecurityTest.cs +++ b/dotnet/test/common/DevTools/DevToolsSecurityTest.cs @@ -19,26 +19,27 @@ public class DevToolsSecurityTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task LoadInsecureWebsite() { - await session.Security.Enable(); + var domains = session.GetVersionSpecificDomains(); + await domains.Security.Enable(); - await session.Security.SetIgnoreCertificateErrors(new Security.SetIgnoreCertificateErrorsCommandSettings() + await domains.Security.SetIgnoreCertificateErrors(new V86.Security.SetIgnoreCertificateErrorsCommandSettings() { Ignore = false }); string summary = null; ManualResetEventSlim sync = new ManualResetEventSlim(false); - EventHandler securityStateChangedHandler = (sender, e) => + EventHandler securityStateChangedHandler = (sender, e) => { summary = e.Summary; sync.Set(); }; - session.Security.SecurityStateChanged += securityStateChangedHandler; + domains.Security.SecurityStateChanged += securityStateChangedHandler; driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("devToolsSecurityTest"); sync.Wait(TimeSpan.FromSeconds(5)); - await session.Security.Disable(); + await domains.Security.Disable(); Assert.That(driver.PageSource, Contains.Substring("Security Test")); Assert.That(summary, Contains.Substring("This page has a non-HTTPS secure origin")); @@ -51,9 +52,10 @@ await session.Security.SetIgnoreCertificateErrors(new Security.SetIgnoreCertific [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task LoadSecureWebsite() { - await session.Security.Enable(); + var domains = session.GetVersionSpecificDomains(); + await domains.Security.Enable(); - await session.Security.SetIgnoreCertificateErrors(new Security.SetIgnoreCertificateErrorsCommandSettings() + await domains.Security.SetIgnoreCertificateErrors(new V86.Security.SetIgnoreCertificateErrorsCommandSettings() { Ignore = true }); diff --git a/dotnet/test/common/DevTools/DevToolsTargetTest.cs b/dotnet/test/common/DevTools/DevToolsTargetTest.cs index a1ce4f8404d30..3d31732797720 100644 --- a/dotnet/test/common/DevTools/DevToolsTargetTest.cs +++ b/dotnet/test/common/DevTools/DevToolsTargetTest.cs @@ -21,23 +21,24 @@ public class DevToolsTargetTest : DevToolsTestFixture [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task GetTargetActivateAndAttach() { + var domains = session.GetVersionSpecificDomains(); driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("devToolsConsoleTest.html"); - var response = await session.Target.GetTargets(); - Target.TargetInfo[] allTargets = response.TargetInfos; - foreach (Target.TargetInfo targetInfo in allTargets) + var response = await domains.Target.GetTargets(); + V86.Target.TargetInfo[] allTargets = response.TargetInfos; + foreach (V86.Target.TargetInfo targetInfo in allTargets) { ValidateTarget(targetInfo); - await session.Target.ActivateTarget(new Target.ActivateTargetCommandSettings() + await domains.Target.ActivateTarget(new V86.Target.ActivateTargetCommandSettings() { TargetId = targetInfo.TargetId }); - var attachResponse = await session.Target.AttachToTarget(new Target.AttachToTargetCommandSettings() + var attachResponse = await domains.Target.AttachToTarget(new V86.Target.AttachToTargetCommandSettings() { TargetId = targetInfo.TargetId, Flatten = true }); ValidateSession(attachResponse.SessionId); - var getInfoResponse = await session.Target.GetTargetInfo(new Target.GetTargetInfoCommandSettings() + var getInfoResponse = await domains.Target.GetTargetInfo(new V86.Target.GetTargetInfoCommandSettings() { TargetId = targetInfo.TargetId }); @@ -52,34 +53,35 @@ await session.Target.ActivateTarget(new Target.ActivateTargetCommandSettings() [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task GetTargetAndSendMessageToTarget() { - Target.TargetInfo[] allTargets = null; + var domains = session.GetVersionSpecificDomains(); + V86.Target.TargetInfo[] allTargets = null; string sessionId = null; - Target.TargetInfo targetInfo = null; + V86.Target.TargetInfo targetInfo = null; driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("devToolsConsoleTest.html"); ManualResetEventSlim sync = new ManualResetEventSlim(false); - session.Target.ReceivedMessageFromTarget += (sender, e) => + domains.Target.ReceivedMessageFromTarget += (sender, e) => { ValidateMessage(e); sync.Set(); }; - var targetsResponse = await session.Target.GetTargets(); + var targetsResponse = await domains.Target.GetTargets(); allTargets = targetsResponse.TargetInfos; ValidateTargetsInfos(allTargets); ValidateTarget(allTargets[0]); targetInfo = allTargets[0]; - await session.Target.ActivateTarget(new Target.ActivateTargetCommandSettings() + await domains.Target.ActivateTarget(new V86.Target.ActivateTargetCommandSettings() { TargetId = targetInfo.TargetId }); - var attachResponse = await session.Target.AttachToTarget(new Target.AttachToTargetCommandSettings() + var attachResponse = await domains.Target.AttachToTarget(new V86.Target.AttachToTargetCommandSettings() { TargetId = targetInfo.TargetId, Flatten = false }); sessionId = attachResponse.SessionId; ValidateSession(sessionId); - await session.Target.SendMessageToTarget(new Target.SendMessageToTargetCommandSettings() + await domains.Target.SendMessageToTarget(new V86.Target.SendMessageToTargetCommandSettings() { Message = "{\"id\":" + id + ",\"method\":\"Page.bringToFront\"}", SessionId = sessionId, @@ -95,31 +97,32 @@ await session.Target.SendMessageToTarget(new Target.SendMessageToTargetCommandSe [IgnoreBrowser(Selenium.Browser.Safari, "Safari does not support Chrome DevTools Protocol")] public async Task CreateAndContentLifeCycle() { - EventHandler targetCreatedHandler = (sender, e) => + var domains = session.GetVersionSpecificDomains(); + EventHandler targetCreatedHandler = (sender, e) => { ValidateTargetInfo(e.TargetInfo); }; - session.Target.TargetCreated += targetCreatedHandler; + domains.Target.TargetCreated += targetCreatedHandler; - EventHandler targetCrashedHandler = (sender, e) => + EventHandler targetCrashedHandler = (sender, e) => { ValidateTargetCrashed(e); }; - session.Target.TargetCrashed += targetCrashedHandler; + domains.Target.TargetCrashed += targetCrashedHandler; - EventHandler targetDestroyedHandler = (sender, e) => + EventHandler targetDestroyedHandler = (sender, e) => { ValidateTargetId(e.TargetId); }; - session.Target.TargetDestroyed += targetDestroyedHandler; + domains.Target.TargetDestroyed += targetDestroyedHandler; - EventHandler targetInfoChangedHandler = (sender, e) => + EventHandler targetInfoChangedHandler = (sender, e) => { ValidateTargetInfo(e.TargetInfo); }; - session.Target.TargetInfoChanged += targetInfoChangedHandler; + domains.Target.TargetInfoChanged += targetInfoChangedHandler; - var response = await session.Target.CreateTarget(new Target.CreateTargetCommandSettings() + var response = await domains.Target.CreateTarget(new V86.Target.CreateTargetCommandSettings() { Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("devToolsConsoleTest.html"), NewWindow = true, @@ -127,12 +130,12 @@ public async Task CreateAndContentLifeCycle() }); ValidateTargetId(response.TargetId); - await session.Target.SetDiscoverTargets(new Target.SetDiscoverTargetsCommandSettings() + await domains.Target.SetDiscoverTargets(new V86.Target.SetDiscoverTargetsCommandSettings() { Discover = true }); - var closeResponse = await session.Target.CloseTarget(new Target.CloseTargetCommandSettings() + var closeResponse = await domains.Target.CloseTarget(new V86.Target.CloseTargetCommandSettings() { TargetId = response.TargetId }); @@ -141,7 +144,7 @@ await session.Target.SetDiscoverTargets(new Target.SetDiscoverTargetsCommandSett Assert.That(closeResponse.Success, Is.True); } - private void ValidateTargetCrashed(Target.TargetCrashedEventArgs targetCrashed) + private void ValidateTargetCrashed(V86.Target.TargetCrashedEventArgs targetCrashed) { Assert.That(targetCrashed, Is.Not.Null); Assert.That(targetCrashed.ErrorCode, Is.Not.Null); @@ -154,7 +157,7 @@ private void ValidateTargetId(string targetId) Assert.That(targetId, Is.Not.Null); } - private void ValidateMessage(Target.ReceivedMessageFromTargetEventArgs messageFromTarget) + private void ValidateMessage(V86.Target.ReceivedMessageFromTargetEventArgs messageFromTarget) { Assert.That(messageFromTarget, Is.Not.Null); Assert.That(messageFromTarget.Message, Is.Not.Null); @@ -162,7 +165,7 @@ private void ValidateMessage(Target.ReceivedMessageFromTargetEventArgs messageFr Assert.That(messageFromTarget.Message, Is.EqualTo("{\"id\":" + id + ",\"result\":{}}")); } - private void ValidateTargetInfo(Target.TargetInfo targetInfo) + private void ValidateTargetInfo(V86.Target.TargetInfo targetInfo) { Assert.That(targetInfo, Is.Not.Null); Assert.That(targetInfo.TargetId, Is.Not.Null); @@ -171,13 +174,13 @@ private void ValidateTargetInfo(Target.TargetInfo targetInfo) Assert.That(targetInfo.Url, Is.Not.Null); } - private void ValidateTargetsInfos(Target.TargetInfo[] targets) + private void ValidateTargetsInfos(V86.Target.TargetInfo[] targets) { Assert.That(targets, Is.Not.Null); Assert.That(targets.Length, Is.GreaterThan(0)); } - private void ValidateTarget(Target.TargetInfo targetInfo) + private void ValidateTarget(V86.Target.TargetInfo targetInfo) { Assert.That(targetInfo, Is.Not.Null); Assert.That(targetInfo.TargetId, Is.Not.Null); diff --git a/dotnet/test/common/DevTools/DevToolsTestFixture.cs b/dotnet/test/common/DevTools/DevToolsTestFixture.cs index 174b5c2f8b04a..59e0114d76bc1 100644 --- a/dotnet/test/common/DevTools/DevToolsTestFixture.cs +++ b/dotnet/test/common/DevTools/DevToolsTestFixture.cs @@ -11,7 +11,7 @@ namespace OpenQA.Selenium.DevTools public class DevToolsTestFixture : DriverTestFixture { protected IDevTools devTools; - protected DevToolsSession session; + protected IDevToolsSession session; public bool IsDevToolsSupported { diff --git a/third_party/dotnet/devtools/BUILD.bazel b/third_party/dotnet/devtools/BUILD.bazel new file mode 100644 index 0000000000000..67dab5306102a --- /dev/null +++ b/third_party/dotnet/devtools/BUILD.bazel @@ -0,0 +1,5 @@ +exports_files([ + "settings.v84.json", + "settings.v85.json", + "settings.v86.json" +]) diff --git a/third_party/dotnet/devtools/DevToolsProtocolGenerator.sln b/third_party/dotnet/devtools/DevToolsProtocolGenerator.sln new file mode 100644 index 0000000000000..2c7acdc34243f --- /dev/null +++ b/third_party/dotnet/devtools/DevToolsProtocolGenerator.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30611.23 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevToolsGenerator", "src\generator\DevToolsGenerator.csproj", "{E5D54A93-645D-4D0F-956F-C467208AD14F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E5D54A93-645D-4D0F-956F-C467208AD14F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5D54A93-645D-4D0F-956F-C467208AD14F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5D54A93-645D-4D0F-956F-C467208AD14F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5D54A93-645D-4D0F-956F-C467208AD14F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D5EC947F-DEE4-4E69-A71D-1B1117C489DD} + EndGlobalSection +EndGlobal diff --git a/third_party/dotnet/devtools/NuGet.Config b/third_party/dotnet/devtools/NuGet.Config new file mode 100644 index 0000000000000..e9e456aaadbda --- /dev/null +++ b/third_party/dotnet/devtools/NuGet.Config @@ -0,0 +1,6 @@ + + + + + + diff --git a/third_party/dotnet/devtools/settings.v84.json b/third_party/dotnet/devtools/settings.v84.json new file mode 100644 index 0000000000000..3c6983dc07eed --- /dev/null +++ b/third_party/dotnet/devtools/settings.v84.json @@ -0,0 +1,12 @@ +{ + "include": [ + { + "templatePath": "DevToolsSessionDomains.hbs", + "outputPath": "DevToolsSessionDomains.cs" + } + ], + "rootNamespace": "OpenQA.Selenium.DevTools.V84", + "runtimeVersion": "", + "includeExperimentalDomains": true, + "templatesPath": "GeneratorCommandLine/Templates" +} diff --git a/third_party/dotnet/devtools/settings.v85.json b/third_party/dotnet/devtools/settings.v85.json new file mode 100644 index 0000000000000..d1478be725d26 --- /dev/null +++ b/third_party/dotnet/devtools/settings.v85.json @@ -0,0 +1,12 @@ +{ + "include": [ + { + "templatePath": "DevToolsSessionDomains.hbs", + "outputPath": "DevToolsSessionDomains.cs" + } + ], + "rootNamespace": "OpenQA.Selenium.DevTools.V85", + "runtimeVersion": "", + "includeExperimentalDomains": true, + "templatesPath": "GeneratorCommandLine/Templates" +} diff --git a/third_party/dotnet/devtools/settings.v86.json b/third_party/dotnet/devtools/settings.v86.json new file mode 100644 index 0000000000000..c9fd34b3f3e59 --- /dev/null +++ b/third_party/dotnet/devtools/settings.v86.json @@ -0,0 +1,12 @@ +{ + "include": [ + { + "templatePath": "DevToolsSessionDomains.hbs", + "outputPath": "DevToolsSessionDomains.cs" + } + ], + "rootNamespace": "OpenQA.Selenium.DevTools.V86", + "runtimeVersion": "", + "includeExperimentalDomains": true, + "templatesPath": "GeneratorCommandLine/Templates" +} diff --git a/third_party/dotnet/devtools/src/generator/BUILD.bazel b/third_party/dotnet/devtools/src/generator/BUILD.bazel new file mode 100644 index 0000000000000..3cefaa7349483 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/BUILD.bazel @@ -0,0 +1,51 @@ +load("//dotnet:executable-assembly.bzl", "csharp_executable") +load("//dotnet:assembly-info.bzl", "generated_assembly_info") +load( + "//dotnet:selenium-dotnet-version.bzl", + "ASSEMBLY_COMPANY", + "ASSEMBLY_COPYRIGHT", + "ASSEMBLY_INFORMATIONAL_VERSION", + "ASSEMBLY_PRODUCT", + "ASSEMBLY_VERSION", + "SE_VERSION", + "SUPPORTED_NET_FRAMEWORKS", + "SUPPORTED_NET_STANDARD_VERSIONS", +) + +generated_assembly_info( + name = "assembly-info", + company = ASSEMBLY_COMPANY, + copyright = ASSEMBLY_COPYRIGHT, + description = "Selenium DevTools Protocol Code Generator", + informational_version = ASSEMBLY_INFORMATIONAL_VERSION, + product = ASSEMBLY_PRODUCT, + title = "Selenium DevTools Protocol Code Generator", + version = ASSEMBLY_VERSION, +) + +csharp_executable( + name = "generator", + srcs = glob([ + "*.cs", + "CodeGen/**/*.cs", + "Converters/**/*.cs", + "ProtocolDefinition/**/*.cs" + ]) + [":assembly-info"], + out = "DevToolsGenerator", + target_frameworks = [ + "netcoreapp3.1", + ], + visibility = ["//visibility:public"], + deps = [ + "@json.net//:Newtonsoft.Json", + "@handlebars//:Handlebars", + "@humanizer//:Humanizer", + "@dependencyinjection//:Microsoft.Extensions.DependencyInjection", + "@dependencyinjectionabstractions//:Microsoft.Extensions.DependencyInjection.Abstractions", + "@commandlineparser//:CommandLine", + ], + is_windows = select({ + "@bazel_tools//src/conditions:host_windows": True, + "//conditions:default": False, + }), +) diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/CodeGenerationDefinitionTemplateSettings.cs b/third_party/dotnet/devtools/src/generator/CodeGen/CodeGenerationDefinitionTemplateSettings.cs new file mode 100644 index 0000000000000..14cb73eb95f43 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/CodeGenerationDefinitionTemplateSettings.cs @@ -0,0 +1,92 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + using Newtonsoft.Json; + + /// + /// Represents settings around Definition templates. + /// + public class CodeGenerationDefinitionTemplateSettings + { + public CodeGenerationDefinitionTemplateSettings() + { + //Set Defaults; + DomainTemplate = new CodeGenerationTemplateSettings + { + TemplatePath = "domain.hbs", + OutputPath = "{{domainName}}\\{{className}}Adapter.cs", + }; + + CommandTemplate = new CodeGenerationTemplateSettings { + TemplatePath = "command.hbs", + OutputPath = "{{domainName}}\\{{className}}Command.cs", + }; + + EventTemplate = new CodeGenerationTemplateSettings + { + TemplatePath = "event.hbs", + OutputPath = "{{domainName}}\\{{className}}EventArgs.cs", + }; + + TypeObjectTemplate = new CodeGenerationTemplateSettings + { + TemplatePath = "type-object.hbs", + OutputPath = "{{domainName}}\\{{className}}.cs", + }; + + TypeHashTemplate = new CodeGenerationTemplateSettings + { + TemplatePath = "type-hash.hbs", + OutputPath = "{{domainName}}\\{{className}}.cs", + }; + + TypeEnumTemplate = new CodeGenerationTemplateSettings + { + TemplatePath = "type-enum.hbs", + OutputPath = "{{domainName}}\\{{className}}.cs", + }; + } + + [JsonProperty("domainTemplate")] + public CodeGenerationTemplateSettings DomainTemplate + { + get; + set; + } + + [JsonProperty("commandTemplate")] + public CodeGenerationTemplateSettings CommandTemplate + { + get; + set; + } + + [JsonProperty("eventTemplate")] + public CodeGenerationTemplateSettings EventTemplate + { + get; + set; + } + + [JsonProperty("typeObjectTemplate")] + public CodeGenerationTemplateSettings TypeObjectTemplate + { + get; + set; + } + + [JsonProperty("typeHashTemplate")] + public CodeGenerationTemplateSettings TypeHashTemplate + { + get; + set; + } + + [JsonProperty("typeEnumTemplate")] + public CodeGenerationTemplateSettings TypeEnumTemplate + { + get; + set; + } + + } +} diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/CodeGenerationSettings.cs b/third_party/dotnet/devtools/src/generator/CodeGen/CodeGenerationSettings.cs new file mode 100644 index 0000000000000..c8ccff1655312 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/CodeGenerationSettings.cs @@ -0,0 +1,100 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + using Newtonsoft.Json; + using System.Collections.Generic; + + /// + /// Settings to be passed to a ICodeGenerator + /// + public sealed class CodeGenerationSettings + { + public CodeGenerationSettings() + { + //Set defaults + Include = new List(); + IncludeDeprecatedDomains = true; + IncludeExperimentalDomains = true; + RootNamespace = "BaristaLabs.ChromeDevTools"; + DefinitionTemplates = new CodeGenerationDefinitionTemplateSettings(); + TemplatesPath = "Templates"; + UsingStatements = new List() + { + "System" + }; + } + + /// + /// Collection of templates that will be parsed and output in the target folder. + /// + [JsonProperty("include")] + public ICollection Include + { + get; + set; + } + + /// + /// Indicates whether or not domains marked as depreciated will be generated. (Default: true) + /// + [JsonProperty("includeDeprecatedDomains")] + public bool IncludeDeprecatedDomains + { + get; + set; + } + + /// + /// Indicates whether or not domains marked as depreciated will be generated. (Default: true) + /// + [JsonProperty("includeExperimentalDomains")] + public bool IncludeExperimentalDomains + { + get; + set; + } + + /// + /// Gets or sets the root namespace of generated classes. + /// + [JsonProperty("rootNamespace")] + public string RootNamespace + { + get; + set; + } + + /// + /// Gets the version number of the runtime. + /// + [JsonProperty("runtimeVersion")] + public string RuntimeVersion + { + get; + set; + } + + [JsonProperty("definitionTemplates")] + public CodeGenerationDefinitionTemplateSettings DefinitionTemplates + { + get; + set; + } + + [JsonProperty("templatesPath")] + public string TemplatesPath + { + get; + set; + } + + /// + /// The using statements that will be included on each generated file. + /// + [JsonProperty("usingStatements")] + public ICollection UsingStatements + { + get; + set; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/CodeGenerationTemplateSettings.cs b/third_party/dotnet/devtools/src/generator/CodeGen/CodeGenerationTemplateSettings.cs new file mode 100644 index 0000000000000..2c020351d2dd0 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/CodeGenerationTemplateSettings.cs @@ -0,0 +1,24 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + using Newtonsoft.Json; + + /// + /// Defines settings around templates + /// + public class CodeGenerationTemplateSettings + { + [JsonProperty("templatePath")] + public string TemplatePath + { + get; + set; + } + + [JsonProperty("outputPath")] + public string OutputPath + { + get; + set; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/CodeGeneratorBase.cs b/third_party/dotnet/devtools/src/generator/CodeGen/CodeGeneratorBase.cs new file mode 100644 index 0000000000000..c69d3020b0ac0 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/CodeGeneratorBase.cs @@ -0,0 +1,52 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + using Microsoft.Extensions.DependencyInjection; + using OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition; + using System; + using System.Collections.Generic; + + /// + /// Represents a base implementation of a code generator. + /// + /// + public abstract class CodeGeneratorBase : ICodeGenerator + where T : IDefinition + { + private readonly IServiceProvider m_serviceProvider; + private readonly Lazy m_settings; + private readonly Lazy m_templatesManager; + + /// + /// Gets the service provider associated with the generator. + /// + public IServiceProvider ServiceProvider + { + get { return m_serviceProvider; } + } + + /// + /// Gets the code generation settings associated with the generator. + /// + public CodeGenerationSettings Settings + { + get { return m_settings.Value; } + } + + /// + /// Gets a template manager associated with the generator. + /// + public TemplatesManager TemplatesManager + { + get { return m_templatesManager.Value; } + } + + protected CodeGeneratorBase(IServiceProvider serviceProvider) + { + m_serviceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider)); + m_settings = new Lazy(() => m_serviceProvider.GetRequiredService()); + m_templatesManager = new Lazy(() => m_serviceProvider.GetRequiredService()); + } + + public abstract IDictionary GenerateCode(T item, CodeGeneratorContext context); + } +} diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/CodeGeneratorContext.cs b/third_party/dotnet/devtools/src/generator/CodeGen/CodeGeneratorContext.cs new file mode 100644 index 0000000000000..7a7d713d4de08 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/CodeGeneratorContext.cs @@ -0,0 +1,23 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + using OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition; + using System.Collections.Generic; + + /// + /// Represents the current context of the code generator. + /// + public sealed class CodeGeneratorContext + { + public DomainDefinition Domain + { + get; + set; + } + + public Dictionary KnownTypes + { + get; + set; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/CommandGenerator.cs b/third_party/dotnet/devtools/src/generator/CodeGen/CommandGenerator.cs new file mode 100644 index 0000000000000..8e7334d5e091f --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/CommandGenerator.cs @@ -0,0 +1,42 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + using Humanizer; + using OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition; + using System; + using System.Collections.Generic; + + /// + /// Generates code for Command Definitions + /// + public sealed class CommandGenerator : CodeGeneratorBase + { + public CommandGenerator(IServiceProvider serviceProvider) + : base(serviceProvider) + { + } + + public override IDictionary GenerateCode(CommandDefinition commandDefinition, CodeGeneratorContext context) + { + var result = new Dictionary(StringComparer.OrdinalIgnoreCase); + + if (String.IsNullOrWhiteSpace(Settings.DefinitionTemplates.CommandTemplate.TemplatePath)) + return result; + + var commandGenerator = TemplatesManager.GetGeneratorForTemplate(Settings.DefinitionTemplates.CommandTemplate); + + var className = commandDefinition.Name.Dehumanize(); + string codeResult = commandGenerator(new + { + command = commandDefinition, + className = className, + domain = context.Domain, + rootNamespace = Settings.RootNamespace, + context = context + }); + + var outputPath = Utility.ReplaceTokensInPath(Settings.DefinitionTemplates.CommandTemplate.OutputPath, className, context, Settings); + result.Add(outputPath, codeResult); + return result; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/CommandInfo.cs b/third_party/dotnet/devtools/src/generator/CodeGen/CommandInfo.cs new file mode 100644 index 0000000000000..aaaaa90d30f7b --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/CommandInfo.cs @@ -0,0 +1,25 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + /// + /// Represents information about a Chrome Debugger Protocol command. + /// + public sealed class CommandInfo + { + public string CommandName + { + get; + set; + } + + public string FullTypeName + { + get; + set; + } + public string FullResponseTypeName + { + get; + set; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/DomainGenerator.cs b/third_party/dotnet/devtools/src/generator/CodeGen/DomainGenerator.cs new file mode 100644 index 0000000000000..5d22752532ece --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/DomainGenerator.cs @@ -0,0 +1,69 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + using Humanizer; + using Microsoft.Extensions.DependencyInjection; + using OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition; + using System; + using System.Collections.Generic; + using System.Linq; + + /// + /// Generates code for Domain Definitions + /// + public sealed class DomainGenerator : CodeGeneratorBase + { + public DomainGenerator(IServiceProvider serviceProvider) + : base(serviceProvider) + { + } + + public override IDictionary GenerateCode(DomainDefinition domainDefinition, CodeGeneratorContext context) + { + var result = new Dictionary(StringComparer.OrdinalIgnoreCase); + + var typeGenerator = ServiceProvider.GetRequiredService>(); + foreach (var type in domainDefinition.Types) + { + typeGenerator.GenerateCode(type, context) + .ToList() + .ForEach(x => result.Add(x.Key, x.Value)); + } + + var eventGenerator = ServiceProvider.GetRequiredService>(); + foreach (var @event in domainDefinition.Events) + { + eventGenerator.GenerateCode(@event, context) + .ToList() + .ForEach(x => result.Add(x.Key, x.Value)); + } + + var commandGenerator = ServiceProvider.GetRequiredService>(); + foreach (var command in domainDefinition.Commands) + { + commandGenerator.GenerateCode(command, context) + .ToList() + .ForEach(x => result.Add(x.Key, x.Value)); + } + + if (String.IsNullOrWhiteSpace(Settings.DefinitionTemplates.DomainTemplate.TemplatePath)) + return result; + + var domainGenerator = TemplatesManager.GetGeneratorForTemplate(Settings.DefinitionTemplates.DomainTemplate); + + var className = domainDefinition.Name.Dehumanize(); + + string codeResult = domainGenerator(new + { + domain = domainDefinition, + className = className, + rootNamespace = Settings.RootNamespace, + context = context + }); + + var outputPath = Utility.ReplaceTokensInPath(Settings.DefinitionTemplates.DomainTemplate.OutputPath, className, context, Settings); + result.Add(outputPath, codeResult); + + return result; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/EventGenerator.cs b/third_party/dotnet/devtools/src/generator/CodeGen/EventGenerator.cs new file mode 100644 index 0000000000000..3958ccf135d43 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/EventGenerator.cs @@ -0,0 +1,44 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + using Humanizer; + using OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition; + using System; + using System.Collections.Generic; + + /// + /// Generates code for Event Definitions + /// + public sealed class EventGenerator : CodeGeneratorBase + { + public EventGenerator(IServiceProvider serviceProvider) + : base(serviceProvider) + { + } + + public override IDictionary GenerateCode(EventDefinition eventDefinition, CodeGeneratorContext context) + { + var result = new Dictionary(StringComparer.OrdinalIgnoreCase); + + if (String.IsNullOrWhiteSpace(Settings.DefinitionTemplates.EventTemplate.TemplatePath)) + return result; + + var eventGenerator = TemplatesManager.GetGeneratorForTemplate(Settings.DefinitionTemplates.EventTemplate); + + var className = eventDefinition.Name.Dehumanize(); + + string codeResult = eventGenerator(new + { + @event = eventDefinition, + className = className, + domain = context.Domain, + rootNamespace = Settings.RootNamespace, + context = context + }); + + var outputPath = Utility.ReplaceTokensInPath(Settings.DefinitionTemplates.EventTemplate.OutputPath, className, context, Settings); + result.Add(outputPath, codeResult); + + return result; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/EventInfo.cs b/third_party/dotnet/devtools/src/generator/CodeGen/EventInfo.cs new file mode 100644 index 0000000000000..bdd95381d69dd --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/EventInfo.cs @@ -0,0 +1,20 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + /// + /// Represents information about a Chrome Debugger Protocol event. + /// + public sealed class EventInfo + { + public string EventName + { + get; + set; + } + + public string FullTypeName + { + get; + set; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/ICodeGenerator.cs b/third_party/dotnet/devtools/src/generator/CodeGen/ICodeGenerator.cs new file mode 100644 index 0000000000000..256598a528f6c --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/ICodeGenerator.cs @@ -0,0 +1,21 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + using OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition; + using System.Collections.Generic; + + /// + /// Represents a code generator that generates code files for a specific IDefinition type. + /// + /// + public interface ICodeGenerator + where T : IDefinition + { + /// + /// Generates one or more code files for the specified IDefinition item + /// + /// + /// + /// + IDictionary GenerateCode(T item, CodeGeneratorContext context); + } +} diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/IServiceProviderExtensions.cs b/third_party/dotnet/devtools/src/generator/CodeGen/IServiceProviderExtensions.cs new file mode 100644 index 0000000000000..37d824be071bb --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/IServiceProviderExtensions.cs @@ -0,0 +1,34 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + using Microsoft.Extensions.DependencyInjection; + using OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition; + using System; + using System.Runtime.InteropServices.ComTypes; + + /// + /// Contains extensions for IServiceProvider. + /// + public static class IServiceProviderExtensions + { + /// + /// Adds a pre-defined set of code generator services to provide Chrome Remote Interface generation. + /// + /// + /// + /// + public static IServiceCollection AddCodeGenerationServices(this IServiceCollection serviceCollection, CodeGenerationSettings settings) + { + if (settings == null) + throw new ArgumentNullException(nameof(settings)); + + return serviceCollection + .AddSingleton(settings) + .AddSingleton() + .AddSingleton>((sp) => new ProtocolGenerator(sp)) + .AddSingleton>((sp) => new DomainGenerator(sp)) + .AddSingleton>((sp) => new TypeGenerator(sp)) + .AddSingleton>((sp) => new CommandGenerator(sp)) + .AddSingleton>((sp) => new EventGenerator(sp)); + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/ProtocolGenerator.cs b/third_party/dotnet/devtools/src/generator/CodeGen/ProtocolGenerator.cs new file mode 100644 index 0000000000000..3cee35944b777 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/ProtocolGenerator.cs @@ -0,0 +1,254 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + using Humanizer; + using Microsoft.Extensions.DependencyInjection; + using OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition; + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + + /// + /// Represents an object that generates a protocol definition. + /// + public sealed class ProtocolGenerator : CodeGeneratorBase + { + public ProtocolGenerator(IServiceProvider serviceProvider) + : base(serviceProvider) + { + } + + public override IDictionary GenerateCode(ProtocolDefinition protocolDefinition, CodeGeneratorContext context) + { + if (String.IsNullOrWhiteSpace(Settings.TemplatesPath)) + { + Settings.TemplatesPath = Path.GetDirectoryName(Settings.TemplatesPath); + } + + ICollection domains = protocolDefinition.Domains; + if (!Settings.IncludeDeprecatedDomains) + { + domains = domains.Where(d => d.Deprecated == false).ToList(); + } + + if (!Settings.IncludeExperimentalDomains) + { + domains = domains.Where(d => d.Experimental == false).ToList(); + } + + //Get commandinfos as an array. + ICollection commands = new List(); + + foreach (var domain in domains) + { + foreach (var command in domain.Commands) + { + commands.Add(new CommandInfo + { + CommandName = $"{domain.Name}.{command.Name}", + FullTypeName = $"{domain.Name.Dehumanize()}.{command.Name.Dehumanize()}CommandSettings", + FullResponseTypeName = $"{domain.Name.Dehumanize()}.{command.Name.Dehumanize()}CommandResponse" + }); + } + } + + //Get eventinfos as an array + ICollection events = new List(); + + foreach(var domain in domains) + { + foreach(var @event in domain.Events) + { + events.Add(new EventInfo + { + EventName = $"{domain.Name}.{@event.Name}", + FullTypeName = $"{domain.Name.Dehumanize()}.{@event.Name.Dehumanize()}EventArgs" + }); + } + } + + //Get typeinfos as a dictionary. + var types = GetTypesInDomain(domains); + + //Create an object that contains information that include templates can use. + var includeData = new { + chromeVersion = protocolDefinition.BrowserVersion, + runtimeVersion = Settings.RuntimeVersion, + rootNamespace = Settings.RootNamespace, + domains = domains, + commands = commands, + events = events, + types = types.Select(kvp => kvp.Value).ToList() + }; + + var result = new Dictionary(StringComparer.OrdinalIgnoreCase); + + //Generate include files from templates. + foreach (var include in Settings.Include) + { + var includeCodeGenerator = TemplatesManager.GetGeneratorForTemplate(include); + var includeCodeResult = includeCodeGenerator(includeData); + result.Add(include.OutputPath, includeCodeResult); + } + + //Generate code for each domain, type, command, event from their respective templates. + GenerateCode(domains, types) + .ToList() + .ForEach(x => result.Add(x.Key, x.Value)); + + return result; + } + + private Dictionary GetTypesInDomain(ICollection domains) + { + var knownTypes = new Dictionary(StringComparer.OrdinalIgnoreCase); + + //First pass - get all top-level types. + foreach (var domain in domains) + { + List embeddedTypes = new List(); + foreach (var type in domain.Types) + { + foreach (var propertyType in type.Properties) + { + if (propertyType.Type == "string" && type.Enum != null && propertyType.Enum.Count > 0) + { + TypeDefinition propertyTypeDefinition = new TypeDefinition() + { + Id = type.Id.Dehumanize() + propertyType.Name.Dehumanize() + "Values", + Type = propertyType.Type, + Description = $"Enumerated values for {domain.Name}.{type.Id}.{propertyType.Name}" + }; + foreach (string value in propertyType.Enum) + { + propertyTypeDefinition.Enum.Add(value); + } + embeddedTypes.Add(propertyTypeDefinition); + propertyType.Type = null; + propertyType.Enum.Clear(); + propertyType.TypeReference = propertyTypeDefinition.Id; + } + } + TypeInfo typeInfo; + switch (type.Type) + { + case "object": + typeInfo = new TypeInfo + { + IsPrimitive = false, + TypeName = type.Id.Dehumanize(), + }; + break; + case "string": + if (type.Enum != null && type.Enum.Count() > 0) + typeInfo = new TypeInfo + { + ByRef = true, + IsPrimitive = false, + TypeName = type.Id.Dehumanize(), + }; + else + typeInfo = new TypeInfo + { + IsPrimitive = true, + TypeName = "string" + }; + break; + case "array": + if ((type.Items == null || String.IsNullOrWhiteSpace(type.Items.Type)) && type.Items.TypeReference != "StringIndex") + { + throw new NotImplementedException("Did not expect a top-level domain array type to specify a TypeReference"); + } + + string itemType; + switch (type.Items.Type) + { + case "string": + itemType = "string"; + break; + case "number": + itemType = "double"; + break; + case null: + if (String.IsNullOrWhiteSpace(type.Items.TypeReference)) + throw new NotImplementedException($"Did not expect a top-level domain array type to have a null type and a null or whitespace type reference."); + + switch (type.Items.TypeReference) + { + case "StringIndex": + itemType = "string"; + break; + default: + throw new NotImplementedException($"Did not expect a top-level domain array type to specify a type reference of {type.Items.TypeReference}"); + } + break; + default: + throw new NotImplementedException($"Did not expect a top-level domain array type to specify items of type {type.Items.Type}"); + } + typeInfo = new TypeInfo + { + IsPrimitive = true, + TypeName = $"{itemType}[]" + }; + break; + case "number": + typeInfo = new TypeInfo + { + ByRef = true, + IsPrimitive = true, + TypeName = "double" + }; + break; + case "integer": + typeInfo = new TypeInfo + { + ByRef = true, + IsPrimitive = true, + TypeName = "long" + }; + break; + default: + throw new InvalidOperationException($"Unknown Type Definition Type: {type.Id}"); + } + + typeInfo.Namespace = domain.Name.Dehumanize(); + typeInfo.SourcePath = $"{domain.Name}.{type.Id}"; + knownTypes.Add($"{domain.Name}.{type.Id}", typeInfo); + } + + foreach (var embeddedEnumType in embeddedTypes) + { + TypeInfo propertyTypeInfo = new TypeInfo + { + TypeName = embeddedEnumType.Id, + ByRef = true, + IsPrimitive = false, + Namespace = domain.Name.Dehumanize(), + SourcePath = $"{domain.Name}.{embeddedEnumType.Id}" + }; + knownTypes.Add($"{domain.Name}.{embeddedEnumType.Id}", propertyTypeInfo); + domain.Types.Add(embeddedEnumType); + } + } + + return knownTypes; + } + + private IDictionary GenerateCode(ICollection domains, Dictionary knownTypes) + { + var result = new Dictionary(StringComparer.OrdinalIgnoreCase); + + var domainGenerator = ServiceProvider.GetRequiredService>(); + + //Generate types/events/commands for all domains. + foreach (var domain in domains) + { + domainGenerator.GenerateCode(domain, new CodeGeneratorContext { Domain = domain, KnownTypes = knownTypes }) + .ToList() + .ForEach(x => result.Add(x.Key, x.Value)); + } + + return result; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/TemplatesManager.cs b/third_party/dotnet/devtools/src/generator/CodeGen/TemplatesManager.cs new file mode 100644 index 0000000000000..aeb36f03c4451 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/TemplatesManager.cs @@ -0,0 +1,134 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + using HandlebarsDotNet; + using System; + using System.Collections.Generic; + using System.IO; + using Humanizer; + using System.Linq; + using System.Text; + using OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition; + + /// + /// Represents a class that manages templates and their associated generators. + /// + public sealed class TemplatesManager + { + private readonly IDictionary> m_templateGenerators = new Dictionary>(StringComparer.OrdinalIgnoreCase); + private readonly CodeGenerationSettings m_settings; + + /// + /// Gets the code generation settings associated with the protocol generator + /// + public CodeGenerationSettings Settings + { + get { return m_settings; } + } + + public TemplatesManager(CodeGenerationSettings settings) + { + m_settings = settings ?? throw new ArgumentNullException(nameof(settings)); + } + + /// + /// Returns a generator singleton for the specified template path. + /// + /// + /// + public Func GetGeneratorForTemplate(CodeGenerationTemplateSettings templateSettings) + { + var templatePath = templateSettings.TemplatePath; + if (m_templateGenerators.ContainsKey(templatePath)) + return m_templateGenerators[templatePath]; + + var targetTemplate = templatePath; + if (!Path.IsPathRooted(targetTemplate)) + targetTemplate = Path.Combine(Settings.TemplatesPath, targetTemplate); + + if (!File.Exists(targetTemplate)) + throw new FileNotFoundException($"Unable to locate a template at {targetTemplate} - please ensure that a template file exists at this location."); + + var templateContents = File.ReadAllText(targetTemplate); + + Handlebars.RegisterHelper("dehumanize", (writer, context, arguments) => + { + if (arguments.Length != 1) + { + throw new HandlebarsException("{{humanize}} helper must have exactly one argument"); + } + + var str = arguments[0].ToString(); + + //Some overrides for values that start with '-' -- this fixes two instances in Runtime.UnserializableValue + if (str.StartsWith("-")) + { + str = $"Negative{str.Dehumanize()}"; + } + else + { + str = str.Dehumanize(); + } + + writer.WriteSafeString(str.Dehumanize()); + }); + + Handlebars.RegisterHelper("xml-code-comment", (writer, context, arguments) => + { + if (arguments.Length < 1) + { + throw new HandlebarsException("{{code-comment}} helper must have at least one argument"); + } + + var str = arguments[0] == null ? "" : arguments[0].ToString(); + + if (String.IsNullOrWhiteSpace(str)) + { + switch (context) + { + case ProtocolDefinitionItem pdi: + str = $"{pdi.Name}"; + break; + default: + str = context.className; + break; + } + } + + var frontPaddingObj = arguments.ElementAtOrDefault(1); + var frontPadding = 1; + if (frontPaddingObj != null) + { + int.TryParse(frontPaddingObj.ToString(), out frontPadding); + } + + str = Utility.ReplaceLineEndings(str, Environment.NewLine + new StringBuilder(4 * frontPadding).Insert(0, " ", frontPadding) + "/// "); + + writer.WriteSafeString(str); + }); + + Handlebars.RegisterHelper("typemap", (writer, context, arguments) => + { + var typeDefinition = context as TypeDefinition; + if (typeDefinition == null) + { + throw new HandlebarsException("{{typemap}} helper expects to be in the context of a TypeDefinition."); + } + + if (arguments.Length != 1) + { + throw new HandlebarsException("{{typemap}} helper expects exactly one argument - the CodeGeneratorContext."); + } + + var codeGenContext = arguments[0] as CodeGeneratorContext; + if (codeGenContext == null) + throw new InvalidOperationException("Expected context argument to be non-null."); + + var mappedType = Utility.GetTypeMappingForType(typeDefinition, codeGenContext.Domain, codeGenContext.KnownTypes); + writer.WriteSafeString(mappedType); + }); + + Handlebars.Configuration.TextEncoder = null; + return Handlebars.Compile(templateContents); + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/TypeGenerator.cs b/third_party/dotnet/devtools/src/generator/CodeGen/TypeGenerator.cs new file mode 100644 index 0000000000000..d57a4ec7b925a --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/TypeGenerator.cs @@ -0,0 +1,74 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + using Humanizer; + using OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition; + using System; + using System.Collections.Generic; + + /// + /// Generates code for Type Definitions + /// + public sealed class TypeGenerator : CodeGeneratorBase + { + public TypeGenerator(IServiceProvider serviceProvider) + : base(serviceProvider) + { + } + + public override IDictionary GenerateCode(TypeDefinition typeDefinition, CodeGeneratorContext context) + { + var result = new Dictionary(StringComparer.OrdinalIgnoreCase); + + if (context.KnownTypes == null) + throw new InvalidOperationException("Expected knowntypes to be specified in context"); + + if (context.Domain == null) + throw new InvalidOperationException("Expected domain to be specified in context"); + + var typeInfo = context.KnownTypes[$"{context.Domain.Name}.{typeDefinition.Id}"]; + if (typeInfo.IsPrimitive) + return result; + + //Base the code generation template on the specified type definition type. + CodeGenerationTemplateSettings templateSettings; + switch (typeDefinition.Type) + { + case "object": + templateSettings = Settings.DefinitionTemplates.TypeObjectTemplate; + break; + case "string": + templateSettings = Settings.DefinitionTemplates.TypeEnumTemplate; + break; + default: + throw new InvalidOperationException($"Unsupported Type Definition Type: {typeDefinition.Type}"); + } + + // Special override for the headers object to be an open object. + // TODO: make this kind of override configurable. + if (context.Domain.Name == "Network" && typeDefinition.Id == "Headers") + { + templateSettings = Settings.DefinitionTemplates.TypeHashTemplate; + } + + if (String.IsNullOrWhiteSpace(templateSettings.TemplatePath)) + return result; + + var typeGenerator = TemplatesManager.GetGeneratorForTemplate(templateSettings); + + var className = typeDefinition.Id.Dehumanize(); + var codeResult = typeGenerator(new + { + type = typeDefinition, + className = className, + domain = context.Domain, + rootNamespace = Settings.RootNamespace, + context = context + }); + + var outputPath = Utility.ReplaceTokensInPath(templateSettings.OutputPath, className, context, Settings); + result.Add(outputPath, codeResult); + + return result; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/TypeInfo.cs b/third_party/dotnet/devtools/src/generator/CodeGen/TypeInfo.cs new file mode 100644 index 0000000000000..9407d6e607ef6 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/TypeInfo.cs @@ -0,0 +1,38 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + /// + /// Represents information about a Chrome Debugger Protocol type. + /// + public sealed class TypeInfo + { + public bool ByRef + { + get; + set; + } + + public string Namespace + { + get; + set; + } + + public bool IsPrimitive + { + get; + set; + } + + public string TypeName + { + get; + set; + } + + public string SourcePath + { + get; + set; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/CodeGen/Utility.cs b/third_party/dotnet/devtools/src/generator/CodeGen/Utility.cs new file mode 100644 index 0000000000000..e5d4ef63740f0 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CodeGen/Utility.cs @@ -0,0 +1,131 @@ +namespace OpenQA.Selenium.DevToolsGenerator.CodeGen +{ + using OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition; + using System; + using System.Collections.Generic; + using System.Text.RegularExpressions; + + /// + /// Contains various utility methods. + /// + public static class Utility + { + /// + /// Replaces tokens in the target path. + /// + /// + /// + /// + /// + /// + public static string ReplaceTokensInPath(string path, string className, CodeGeneratorContext context, CodeGenerationSettings settings) + { + path = path.Replace("{{className}}", className); + path = path.Replace("{{rootNamespace}}", settings.RootNamespace); + path = path.Replace("{{templatePath}}", settings.TemplatesPath); + path = path.Replace("{{domainName}}", context.Domain.Name); + return path; + } + + /// + /// For the given type, gets the associated type mapping given the domain and known types. + /// + /// + /// + /// + /// + /// + public static string GetTypeMappingForType(TypeDefinition typeDefinition, DomainDefinition domainDefinition, IDictionary knownTypes, bool isArray = false) + { + var type = typeDefinition.Type; + + if (String.IsNullOrWhiteSpace(type)) + type = typeDefinition.TypeReference; + + string mappedType = null; + if (type.Contains(".") && knownTypes.ContainsKey(type)) + { + var typeInfo = knownTypes[type]; + if (typeInfo.IsPrimitive) + { + var primitiveType = typeInfo.TypeName; + + if (typeDefinition.Optional && typeInfo.ByRef) + primitiveType += "?"; + + if (isArray) + primitiveType += "[]"; + + return primitiveType; + } + mappedType = $"{typeInfo.Namespace}.{typeInfo.TypeName}"; + if (typeDefinition.Optional && typeInfo.ByRef) + mappedType += "?"; + } + + if (mappedType == null) + { + var fullyQualifiedTypeName = $"{domainDefinition.Name}.{type}"; + + if (knownTypes.ContainsKey(fullyQualifiedTypeName)) + { + var typeInfo = knownTypes[fullyQualifiedTypeName]; + + mappedType = typeInfo.TypeName; + if (typeInfo.ByRef && typeDefinition.Optional) + mappedType += "?"; + } + } + + + if (mappedType == null) + { + switch (type) + { + case "number": + mappedType = typeDefinition.Optional ? "double?" : "double"; + break; + case "integer": + mappedType = typeDefinition.Optional ? "long?" : "long"; + break; + case "boolean": + mappedType = typeDefinition.Optional ? "bool?" : "bool"; + break; + case "string": + mappedType = "string"; + break; + case "object": + case "any": + mappedType = "object"; + break; + case "binary": + mappedType = "byte[]"; + break; + case "array": + mappedType = GetTypeMappingForType(typeDefinition.Items, domainDefinition, knownTypes, true); + break; + default: + throw new InvalidOperationException($"Unmapped data type: {type}"); + } + } + + if (isArray) + mappedType += "[]"; + + return mappedType; + } + + public static string ReplaceLineEndings(string value, string replacement = null) + { + if (String.IsNullOrEmpty(value)) + { + return value; + } + + if (replacement == null) + replacement = string.Empty; + + return Regex.Replace(value, @"\r\n?|\n|\u2028|\u2029", replacement, RegexOptions.Compiled); + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/CommandLineOptions.cs b/third_party/dotnet/devtools/src/generator/CommandLineOptions.cs new file mode 100644 index 0000000000000..c3ef2dbc33c4a --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/CommandLineOptions.cs @@ -0,0 +1,62 @@ +using CommandLine; +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenQA.Selenium.DevToolsGenerator +{ + public class CommandLineOptions + { + public CommandLineOptions() + { + } + + [Option( + 'f', + "force-download", + Default = false, + HelpText = "Forces the Chrome Protocol Definition to be downloaded from source even if it already exists.")] + public bool ForceDownload { get; set; } + + [Option( + "force", + Default = false, + HelpText = "Forces the output directory to be overwritten")] + public bool ForceOverwrite { get; set; } + + [Option( + 'o', + "output-path", + Default = "./OutputProtocol", + HelpText ="Indicates the folder that will contain the generated class library [Default: ./OutputProtocol]")] + public string OutputPath { get; set; } + + [Option( + 'b', + "browser-protocol-path", + Default = "./browser_protocol.json", + HelpText = "Indicates the path to the Chromium Debugging Browser Protocol JSON file to use. [Default: browser_protocol.json]")] + public string BrowserProtocolPath { get; set; } + + [Option( + 'j', + "js-protocol-path", + Default = "./js_protocol.json", + HelpText = "Indicates the path to the Chromium Debugging JavaScript Protocol JSON file to use. [Default: js_protocol.json]")] + public string JavaScriptProtocolPath { get; set; } + + [Option( + 't', + "templates-path", + Default = "", + HelpText = "Indicates the path to the code generation templates file.")] + public string TemplatesPath { get; set; } + + [Option( + 's', + "settings", + Default = "./Templates/settings.json", + HelpText = "Indicates the path to the code generation settings file. [Default: ./Templates/settings.json]")] + public string Settings { get; set; } + } +} diff --git a/third_party/dotnet/devtools/src/generator/Converters/BooleanJsonConverter.cs b/third_party/dotnet/devtools/src/generator/Converters/BooleanJsonConverter.cs new file mode 100644 index 0000000000000..424438eecdcc8 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/Converters/BooleanJsonConverter.cs @@ -0,0 +1,67 @@ +namespace OpenQA.Selenium.DevToolsGenerator.Converters +{ + using Newtonsoft.Json; + using System; + + /// + /// Handles converting JSON string values into a C# boolean data type. + /// + public class BooleanJsonConverter : JsonConverter + { + /// + /// Determines whether this instance can convert the specified object type. + /// + /// Type of the object. + /// + /// true if this instance can convert the specified object type; otherwise, false. + /// + public override bool CanConvert(Type objectType) + { + // Handle only boolean types. + return objectType == typeof(bool); + } + + /// + /// Reads the JSON representation of the object. + /// + /// The to read from. + /// Type of the object. + /// The existing value of object being read. + /// The calling serializer. + /// + /// The object value. + /// + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + switch (reader.Value.ToString().ToLower().Trim()) + { + case "true": + case "yes": + case "y": + case "1": + return true; + case "false": + case "no": + case "n": + case "0": + return false; + } + + // If we reach here, we're pretty much going to throw an error so let's let Json.NET throw it's pretty-fied error message. + return new JsonSerializer().Deserialize(reader, objectType); + } + + /// + /// Specifies that this converter will not participate in writing results. + /// + public override bool CanWrite { get { return false; } } + + /// + /// Writes the JSON representation of the object. + /// + /// The to write to.The value.The calling serializer. + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/DevToolsGenerator.csproj b/third_party/dotnet/devtools/src/generator/DevToolsGenerator.csproj new file mode 100644 index 0000000000000..312abc24f4cfa --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/DevToolsGenerator.csproj @@ -0,0 +1,25 @@ + + + + Exe + netcoreapp3.1 + OpenQA.Selenium.DevToolsGenerator + + + + ..\..\..\..\..\build\cli\Debug\ + + + + ..\..\..\..\..\build\cli\Release\ + + + + + + + + + + + diff --git a/third_party/dotnet/devtools/src/generator/Program.cs b/third_party/dotnet/devtools/src/generator/Program.cs new file mode 100644 index 0000000000000..e2513e5a29d20 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/Program.cs @@ -0,0 +1,155 @@ +using System; +using System.IO; +using System.Text; +using CommandLine; +using Microsoft.Extensions.DependencyInjection; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using OpenQA.Selenium.DevToolsGenerator.CodeGen; +using OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition; + +namespace OpenQA.Selenium.DevToolsGenerator +{ + class Program + { + static int Main(string[] args) + { + CommandLineOptions cliArguments = new CommandLineOptions(); + Parser.Default.ParseArguments(args).WithParsed(o => { cliArguments = o; }); + + //Load Settings. + if (!File.Exists(cliArguments.Settings)) + { + throw new FileNotFoundException($"The specified settings file ({cliArguments.Settings}) could not be found. Please check that the settings file exists."); + } + + var settingsJson = File.ReadAllText(cliArguments.Settings); + var settings = JsonConvert.DeserializeObject(settingsJson); + if (!string.IsNullOrEmpty(cliArguments.TemplatesPath)) + { + settings.TemplatesPath = cliArguments.TemplatesPath; + if (File.Exists(cliArguments.TemplatesPath)) + { + FileInfo info = new FileInfo(cliArguments.TemplatesPath); + settings.TemplatesPath = info.DirectoryName; + } + } + + // setup our DI + var serviceProvider = new ServiceCollection() + .AddCodeGenerationServices(settings) + .BuildServiceProvider(); + + //Get the protocol Data. + Console.WriteLine("Loading protocol definition..."); + var protocolDefinitionData = GetProtocolDefinitionData(cliArguments); + + var protocolDefinition = protocolDefinitionData.ToObject(new JsonSerializer() { MetadataPropertyHandling = MetadataPropertyHandling.Ignore }); + + //Begin the code generation process. + Console.WriteLine("Generating protocol definition code files..."); + var protocolGenerator = serviceProvider.GetRequiredService>(); + var codeFiles = protocolGenerator.GenerateCode(protocolDefinition, null); + + //Delete the output folder if force is specified and it exists... + Console.WriteLine("Writing generated code files to {0}...", cliArguments.OutputPath); + if (Directory.Exists(cliArguments.OutputPath) && cliArguments.ForceOverwrite) + { + Console.WriteLine("Generating protocol definition project..."); + Directory.Delete(cliArguments.OutputPath, true); + } + + //Create the output path if it doesn't exist, and write generated files to disk. + var directoryInfo = Directory.CreateDirectory(cliArguments.OutputPath); + + var sha1 = System.Security.Cryptography.SHA1.Create(); + foreach (var codeFile in codeFiles) + { + var targetFilePath = Path.GetFullPath(Path.Combine(cliArguments.OutputPath, codeFile.Key)); + Directory.CreateDirectory(Path.GetDirectoryName(targetFilePath)); + //Only update the file if the SHA1 hashes don't match + if (File.Exists(targetFilePath)) + { + var targetFileHash = sha1.ComputeHash(File.ReadAllBytes(targetFilePath)); + var codeFileHash = sha1.ComputeHash(Encoding.UTF8.GetBytes(codeFile.Value)); + if (String.Compare(Convert.ToBase64String(targetFileHash), Convert.ToBase64String(codeFileHash)) != 0) + { + File.WriteAllText(targetFilePath, codeFile.Value); + } + } + else + { + File.WriteAllText(targetFilePath, codeFile.Value); + } + } + + //Completed. + Console.WriteLine("All done!"); + return 0; + } + + /// + /// Returns a merged ProtocolDefinition JObject + /// + /// + /// + public static JObject GetProtocolDefinitionData(CommandLineOptions args) + { + JObject protocolData; + string browserProtocolPath = args.BrowserProtocolPath; + if (!File.Exists(browserProtocolPath)) + { + browserProtocolPath = Path.Combine(browserProtocolPath, "browser_protocol.json"); + if (!File.Exists(browserProtocolPath)) + { + } + } + + string jsProtocolPath = args.JavaScriptProtocolPath; + if (!File.Exists(args.JavaScriptProtocolPath)) + { + jsProtocolPath = Path.Combine(jsProtocolPath, "js_protocol.json"); + if (!File.Exists(jsProtocolPath)) + { + } + } + + JObject browserProtocol = JObject.Parse(File.ReadAllText(browserProtocolPath)); + JObject jsProtocol = JObject.Parse(File.ReadAllText(jsProtocolPath)); + + ProtocolVersionDefinition currentVersion = new ProtocolVersionDefinition(); + currentVersion.ProtocolVersion = "1.3"; + currentVersion.Browser = "Chrome/86.0"; + + protocolData = MergeJavaScriptProtocolDefinitions(browserProtocol, jsProtocol); + protocolData["browserVersion"] = JToken.FromObject(currentVersion); + + return protocolData; + } + + /// + /// Merges a browserProtocol and jsProtocol into a single protocol definition. + /// + /// + /// + /// + public static JObject MergeJavaScriptProtocolDefinitions(JObject browserProtocol, JObject jsProtocol) + { + //Merge the 2 protocols together. + if (jsProtocol["version"]["majorVersion"] != browserProtocol["version"]["majorVersion"] || + jsProtocol["version"]["minorVersion"] != browserProtocol["version"]["minorVersion"]) + { + throw new InvalidOperationException("Protocol mismatch -- The WebKit and V8 protocol versions should match."); + } + + var result = browserProtocol.DeepClone() as JObject; + foreach (var domain in jsProtocol["domains"]) + { + JArray jDomains = (JArray)result["domains"]; + jDomains.Add(domain); + } + + return result; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/ProtocolDefinition/CommandDefinition.cs b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/CommandDefinition.cs new file mode 100644 index 0000000000000..4198d006976e7 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/CommandDefinition.cs @@ -0,0 +1,48 @@ +namespace OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition +{ + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Collections.ObjectModel; + + public sealed class CommandDefinition : ProtocolDefinitionItem + { + public CommandDefinition() + { + Handlers = new HashSet(); + + Parameters = new Collection(); + Returns = new Collection(); + } + + [JsonProperty(PropertyName = "handlers")] + public ICollection Handlers + { + get; + set; + } + + [JsonProperty(PropertyName = "parameters")] + public ICollection Parameters + { + get; + set; + } + + [JsonProperty(PropertyName = "returns")] + public ICollection Returns + { + get; + set; + } + + [JsonProperty(PropertyName = "redirect")] + public string Redirect + { + get; + set; + } + + [JsonIgnore] + public bool NoParameters => Parameters == null || Parameters.Count == 0; + } +} diff --git a/third_party/dotnet/devtools/src/generator/ProtocolDefinition/DomainDefinition.cs b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/DomainDefinition.cs new file mode 100644 index 0000000000000..d4cd5b7eefb81 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/DomainDefinition.cs @@ -0,0 +1,53 @@ +namespace OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition +{ + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Collections.ObjectModel; + + public sealed class DomainDefinition : ProtocolDefinitionItem + { + public DomainDefinition() + { + Dependencies = new HashSet(); + + Types = new Collection(); + Events = new Collection(); + Commands = new Collection(); + } + + [JsonProperty(PropertyName = "domain")] + public override string Name + { + get; + set; + } + + [JsonProperty(PropertyName = "types")] + public ICollection Types + { + get; + set; + } + + [JsonProperty(PropertyName = "commands")] + public ICollection Commands + { + get; + set; + } + + [JsonProperty(PropertyName = "events")] + public ICollection Events + { + get; + set; + } + + [JsonProperty(PropertyName = "dependencies")] + public ICollection Dependencies + { + get; + set; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/ProtocolDefinition/EventDefinition.cs b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/EventDefinition.cs new file mode 100644 index 0000000000000..161b356dd7908 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/EventDefinition.cs @@ -0,0 +1,21 @@ +namespace OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition +{ + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Collections.ObjectModel; + + public sealed class EventDefinition : ProtocolDefinitionItem + { + public EventDefinition() + { + Parameters = new Collection(); + } + + [JsonProperty(PropertyName = "parameters")] + public ICollection Parameters + { + get; + set; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/ProtocolDefinition/IDefinition.cs b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/IDefinition.cs new file mode 100644 index 0000000000000..17c3e6605bd3c --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/IDefinition.cs @@ -0,0 +1,9 @@ +namespace OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition +{ + /// + /// Interface that identifies definition classes. + /// + public interface IDefinition + { + } +} diff --git a/third_party/dotnet/devtools/src/generator/ProtocolDefinition/ProtocolDefinition.cs b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/ProtocolDefinition.cs new file mode 100644 index 0000000000000..c00520f7d8878 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/ProtocolDefinition.cs @@ -0,0 +1,35 @@ +namespace OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition +{ + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Collections.ObjectModel; + + public sealed class ProtocolDefinition : IDefinition + { + public ProtocolDefinition() + { + Domains = new Collection(); + } + + [JsonProperty(PropertyName = "browserVersion", Required = Required.Always)] + public ProtocolVersionDefinition BrowserVersion + { + get; + set; + } + + [JsonProperty(PropertyName = "version", Required = Required.Always)] + public Version Version + { + get; + set; + } + + [JsonProperty(PropertyName = "domains", Required = Required.Always)] + public ICollection Domains + { + get; + set; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/ProtocolDefinition/ProtocolDefinitionItem.cs b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/ProtocolDefinitionItem.cs new file mode 100644 index 0000000000000..fd22e53e79e22 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/ProtocolDefinitionItem.cs @@ -0,0 +1,43 @@ +namespace OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition +{ + using Newtonsoft.Json; + using OpenQA.Selenium.DevToolsGenerator.Converters; + + public abstract class ProtocolDefinitionItem : IDefinition + { + + [JsonProperty(PropertyName = "deprecated")] + public bool Deprecated + { + get; + set; + } + + [JsonProperty(PropertyName = "description")] + public string Description + { + get; + set; + } + + [JsonProperty(PropertyName = "experimental")] + [JsonConverter(typeof(BooleanJsonConverter))] + public bool Experimental + { + get; + set; + } + + [JsonProperty(PropertyName = "name")] + public virtual string Name + { + get; + set; + } + + public override string ToString() + { + return Name; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/ProtocolDefinition/ProtocolVersionDefinition.cs b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/ProtocolVersionDefinition.cs new file mode 100644 index 0000000000000..2e3e706ca3284 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/ProtocolVersionDefinition.cs @@ -0,0 +1,91 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.RegularExpressions; + +namespace OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition +{ + /// + /// Represents the browser version information retrieved from a Chromium-based browser. + /// + public class ProtocolVersionDefinition + { + [JsonProperty(PropertyName = "Browser")] + public string Browser + { + get; + set; + } + + [JsonIgnore] + public string BrowserVersion + { + get { return Regex.Match(Browser, ".*/(.*)").Groups[1].Value; } + } + + [JsonIgnore] + public string BrowserMajorVersion + { + get { return Regex.Match(Browser, ".*/(\\d+)\\..*").Groups[1].Value; } + } + + [JsonProperty(PropertyName = "Protocol-Version")] + public string ProtocolVersion + { + get; + set; + } + + [JsonProperty(PropertyName = "User-Agent")] + public string UserAgent + { + get; + set; + } + + [JsonProperty(PropertyName = "V8-Version")] + public string V8Version + { + get; + set; + } + + [JsonIgnore] + public string V8VersionNumber + { + get + { + //Get the v8 version + var v8VersionRegex = new Regex(@"^(\d+)\.(\d+)\.(\d+)(\.\d+.*)?"); + var v8VersionMatch = v8VersionRegex.Match(V8Version); + if (v8VersionMatch.Success == false || v8VersionMatch.Groups.Count < 4) + throw new InvalidOperationException($"Unable to determine v8 version number from v8 version string ({V8Version})"); + + return $"{v8VersionMatch.Groups[1].Value}.{v8VersionMatch.Groups[2].Value}.{v8VersionMatch.Groups[3].Value}"; + } + } + + [JsonProperty(PropertyName = "WebKit-Version")] + public string WebKitVersion + { + get; + set; + } + + [JsonIgnore] + public string WebKitVersionHash + { + get + { + //Get the webkit version hash. + var webkitVersionRegex = new Regex(@"\s\(@(\b[0-9a-f]{5,40}\b)"); + var webkitVersionMatch = webkitVersionRegex.Match(WebKitVersion); + if (webkitVersionMatch.Success == false || webkitVersionMatch.Groups.Count != 2) + throw new InvalidOperationException($"Unable to determine webkit version hash from webkit version string ({WebKitVersion})"); + + return webkitVersionMatch.Groups[1].Value; + } + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/ProtocolDefinition/TypeDefinition.cs b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/TypeDefinition.cs new file mode 100644 index 0000000000000..5bb39aded4496 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/TypeDefinition.cs @@ -0,0 +1,92 @@ +namespace OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition +{ + using Newtonsoft.Json; + using OpenQA.Selenium.DevToolsGenerator.Converters; + using System; + using System.Collections.Generic; + using System.Collections.ObjectModel; + + public sealed class TypeDefinition : ProtocolDefinitionItem + { + public TypeDefinition() + { + Enum = new HashSet(); + Properties = new Collection(); + } + + [JsonProperty(PropertyName = "id")] + public string Id + { + get; + set; + } + + [JsonProperty(PropertyName = "type")] + public string Type + { + get; + set; + } + + [JsonProperty(PropertyName = "enum")] + public ICollection Enum + { + get; + set; + } + + [JsonProperty(PropertyName = "properties")] + public ICollection Properties + { + get; + set; + } + + [JsonProperty(PropertyName = "items")] + public TypeDefinition Items + { + get; + set; + } + + [JsonProperty(PropertyName = "minItems")] + public int MinItems + { + get; + set; + } + + [JsonProperty(PropertyName = "maxItems")] + public int MaxItems + { + get; + set; + } + + [JsonProperty(PropertyName = "$ref")] + public string TypeReference + { + get; + set; + } + + [JsonProperty(PropertyName = "optional")] + [JsonConverter(typeof(BooleanJsonConverter))] + public bool Optional + { + get; + set; + } + + public override string ToString() + { + if (!String.IsNullOrWhiteSpace(Id)) + return Id; + + if (!String.IsNullOrWhiteSpace(Name)) + return Name; + + return $"Ref: {TypeReference}"; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/ProtocolDefinition/Version.cs b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/Version.cs new file mode 100644 index 0000000000000..82f92dc636426 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/ProtocolDefinition/Version.cs @@ -0,0 +1,55 @@ +namespace OpenQA.Selenium.DevToolsGenerator.ProtocolDefinition +{ + using Newtonsoft.Json; + using System; + + /// + /// Indicates the version of the Protocol Definition. + /// + public sealed class Version : IComparable + { + [JsonProperty(PropertyName = "major")] + public string Major + { + get; + set; + } + + [JsonProperty(PropertyName = "minor")] + public string Minor + { + get; + set; + } + + public int CompareTo(Version other) + { + if (other == null) + return -1; + + return ToString().CompareTo(other.ToString()); + } + + public override bool Equals(object obj) + { + var other = obj as Version; + + if (other == null) + { + return false; + } + + return ToString().Equals(other.ToString()); + } + + public override int GetHashCode() + { + return ToString().GetHashCode(); + } + + public override string ToString() + { + return $"{Major}.{Minor}"; + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/Templates/BUILD.bazel b/third_party/dotnet/devtools/src/generator/Templates/BUILD.bazel new file mode 100644 index 0000000000000..acee02b8f2fd7 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/Templates/BUILD.bazel @@ -0,0 +1,10 @@ +exports_files([ + "command.hbs", + "DevToolsSessionDomains.hbs", + "domain.hbs", + "event.hbs", + "project.hbs", + "type-enum.hbs", + "type-hash.hbs", + "type-object.hbs", +]) diff --git a/third_party/dotnet/devtools/src/generator/Templates/DevToolsSessionDomains.hbs b/third_party/dotnet/devtools/src/generator/Templates/DevToolsSessionDomains.hbs new file mode 100644 index 0000000000000..9d2dbeaf4a092 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/Templates/DevToolsSessionDomains.hbs @@ -0,0 +1,35 @@ +namespace {{rootNamespace}} +{ + using System; + + public class DevToolsSessionDomains : OpenQA.Selenium.DevTools.DevToolsSessionDomains + { +{{#each domains}} + private Lazy<{{dehumanize Name}}.{{dehumanize Name}}Adapter> m_{{dehumanize Name}}; +{{/each}} + + public DevToolsSessionDomains(IDevToolsSession session) : base() + { +{{#each domains}} + m_{{dehumanize Name}} = new Lazy<{{dehumanize Name}}.{{dehumanize Name}}Adapter>(() => new {{dehumanize Name}}.{{dehumanize Name}}Adapter(session)); +{{/each}} + } + +{{#each domains}} + /// + /// Gets the adapter for the {{Name}} domain. + /// + public {{dehumanize Name}}.{{dehumanize Name}}Adapter {{dehumanize Name}} + { + get { return m_{{dehumanize Name}}.Value; } + } + +{{/each}} + protected override void PopulateCommandResponseTypeMap() + { +{{#each commands}} + ResponseTypeMap.AddCommandResponseType(typeof({{FullTypeName}}), typeof({{FullResponseTypeName}})); +{{/each}} + } + } +} diff --git a/third_party/dotnet/devtools/src/generator/Templates/command.hbs b/third_party/dotnet/devtools/src/generator/Templates/command.hbs new file mode 100644 index 0000000000000..dfe3a6331a46c --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/Templates/command.hbs @@ -0,0 +1,57 @@ +namespace {{rootNamespace}}.{{domain.Name}} +{ + using Newtonsoft.Json; + + /// + /// {{xml-code-comment command.Description 1}} + /// + public sealed class {{className}}CommandSettings : ICommand + { + private const string DevToolsRemoteInterface_CommandName = "{{domain.Name}}.{{command.Name}}"; + + [JsonIgnore] + public string CommandName + { + get { return DevToolsRemoteInterface_CommandName; } + } + + {{#each command.Parameters}} + {{#if Description}} + /// + /// {{xml-code-comment Description 2}} + /// + {{else}} + /// + /// Gets or sets the {{Name}} + /// + {{/if}} + [JsonProperty("{{Name}}"{{#if Optional}}, DefaultValueHandling = DefaultValueHandling.Ignore{{/if}})] + public {{typemap ../context}} {{dehumanize Name}} + { + get; + set; + } + {{/each}} + } + + public sealed class {{className}}CommandResponse : ICommandResponse<{{className}}CommandSettings> + { + {{#each command.Returns}} + {{#if Description}} + /// + /// {{xml-code-comment Description 2}} + /// + {{else}} + /// + /// Gets or sets the {{Name}} + /// + {{/if}} + [JsonProperty("{{Name}}"{{#if Optional}}, DefaultValueHandling = DefaultValueHandling.Ignore{{/if}})] + public {{typemap ../context}} {{dehumanize Name}} + { + get; + set; + } + {{/each}} + } +} \ No newline at end of file diff --git a/third_party/dotnet/devtools/src/generator/Templates/domain.hbs b/third_party/dotnet/devtools/src/generator/Templates/domain.hbs new file mode 100644 index 0000000000000..3dd6eb1b4b04c --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/Templates/domain.hbs @@ -0,0 +1,75 @@ +namespace {{rootNamespace}}.{{domain.Name}} +{ + using System; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Represents an adapter for the {{domain.Name}} domain to simplify the command interface. + /// + public class {{dehumanize domain.Name}}Adapter + { + private readonly IDevToolsSession m_session; + private readonly string m_domainName = "{{dehumanize domain.Name}}"; + private Dictionary m_eventMap = new Dictionary(); + + public {{dehumanize domain.Name}}Adapter(IDevToolsSession session) + { + m_session = session ?? throw new ArgumentNullException(nameof(session)); + m_session.DevToolsEventReceived += OnDevToolsEventReceived; + {{#each domain.Events}} + m_eventMap["{{Name}}"] = new DevToolsEventData(typeof({{dehumanize Name}}EventArgs), On{{dehumanize Name}}); + {{/each}} + } + + /// + /// Gets the DevToolsSession associated with the adapter. + /// + public IDevToolsSession Session + { + get { return m_session; } + } + + {{#each domain.Events}} + /// + /// {{xml-code-comment Description 2}} + /// + public event EventHandler<{{dehumanize Name}}EventArgs> {{dehumanize Name}}; + {{/each}} + + {{#each domain.Commands}} + /// + /// {{xml-code-comment Description 2}} + /// + public async Task<{{dehumanize Name}}CommandResponse> {{dehumanize Name}}({{dehumanize Name}}CommandSettings command{{#if NoParameters}} = null{{/if}}, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) + { + return await m_session.SendCommand<{{dehumanize Name}}CommandSettings, {{dehumanize Name}}CommandResponse>(command{{#if NoParameters}} ?? new {{dehumanize Name}}CommandSettings(){{/if}}, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived); + } + {{/each}} + + private void OnDevToolsEventReceived(object sender, DevToolsEventReceivedEventArgs e) + { + if (e.DomainName == m_domainName) + { + if (m_eventMap.ContainsKey(e.EventName)) + { + var eventData = m_eventMap[e.EventName]; + var eventArgs = e.EventData.ToObject(eventData.EventArgsType); + eventData.EventInvoker(eventArgs); + } + } + } + + {{#each domain.Events}} + private void On{{dehumanize Name}}(object rawEventArgs) + { + {{dehumanize Name}}EventArgs e = rawEventArgs as {{dehumanize Name}}EventArgs; + if (e != null && {{dehumanize Name}} != null) + { + {{dehumanize Name}}(this, e); + } + } + {{/each}} + } +} \ No newline at end of file diff --git a/third_party/dotnet/devtools/src/generator/Templates/event.hbs b/third_party/dotnet/devtools/src/generator/Templates/event.hbs new file mode 100644 index 0000000000000..d9298e694c325 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/Templates/event.hbs @@ -0,0 +1,29 @@ +namespace {{rootNamespace}}.{{domain.Name}} +{ + using System; + using Newtonsoft.Json; + + /// + /// {{xml-code-comment event.Description 1}} + /// + public sealed class {{className}}EventArgs : EventArgs + { + {{#each event.Parameters}} + {{#if Description}} + /// + /// {{xml-code-comment Description 2}} + /// + {{else}} + /// + /// Gets or sets the {{Name}} + /// + {{/if}} + [JsonProperty("{{Name}}"{{#if Optional}}, DefaultValueHandling = DefaultValueHandling.Ignore{{/if}})] + public {{typemap ../context}} {{dehumanize Name}} + { + get; + set; + } + {{/each}} + } +} \ No newline at end of file diff --git a/third_party/dotnet/devtools/src/generator/Templates/project.hbs b/third_party/dotnet/devtools/src/generator/Templates/project.hbs new file mode 100644 index 0000000000000..604484cee6f5c --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/Templates/project.hbs @@ -0,0 +1,21 @@ + + + net45;net46;net47;netstandard2.0 + true + {{chromeVersion.BrowserVersion}}{{#if runtimeVersion}}-{{runtimeVersion}}{{/if}} + Sean McLellan + BaristaLabs, LLC + https://github.com/BaristaLabs/chrome-dev-tools-runtime.git + Git + ChromeDevTools, .Net Core + https://raw.githubusercontent.com/BaristaLabs/chrome-dev-tools-runtime/master/LICENSE + Copyright (c) 2017 BaristaLabs, LLC + https://github.com/BaristaLabs/chrome-dev-tools-runtime + .Net Core based runtime to interact with an running instance of Chrome via the ChromeDevTools protocol. + Chrome Version: {{chromeVersion.BrowserVersion}}; Protocol Version: {{chromeVersion.ProtocolVersion}};{{#if runtimeVersion}} Runtime Version: {{runtimeVersion}};{{/if}} + + + + + + diff --git a/third_party/dotnet/devtools/src/generator/Templates/settings.json b/third_party/dotnet/devtools/src/generator/Templates/settings.json new file mode 100644 index 0000000000000..a5f562c4c7b4c --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/Templates/settings.json @@ -0,0 +1,10 @@ +{ + "include": [ + { + "templatePath": "DevToolsSessionDomains.hbs", + "outputPath": "DevToolsSessionDomains.cs" + } + ], + "rootNamespace": "OpenQA.Selenium.DevTools", + "runtimeVersion": "" +} diff --git a/third_party/dotnet/devtools/src/generator/Templates/type-enum.hbs b/third_party/dotnet/devtools/src/generator/Templates/type-enum.hbs new file mode 100644 index 0000000000000..62189d624383d --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/Templates/type-enum.hbs @@ -0,0 +1,18 @@ +namespace {{rootNamespace}}.{{domain.Name}} +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime.Serialization; + + /// + /// {{xml-code-comment type.Description 1}} + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum {{className}} + { + {{#each type.Enum}} + [EnumMember(Value = "{{this}}")] + {{dehumanize this}}, + {{/each}} + } +} \ No newline at end of file diff --git a/third_party/dotnet/devtools/src/generator/Templates/type-hash.hbs b/third_party/dotnet/devtools/src/generator/Templates/type-hash.hbs new file mode 100644 index 0000000000000..08440e9edbc67 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/Templates/type-hash.hbs @@ -0,0 +1,22 @@ +namespace {{rootNamespace}}.{{domain.Name}} +{ + using System.Collections.Generic; + + /// + /// {{xml-code-comment type.Description 1}} + /// + public sealed class {{className}} : Dictionary + { + {{#each type.Properties}} + /// + /// {{xml-code-comment Description 2}} + /// + [JsonProperty("{{Name}}"{{#if Optional}}, DefaultValueHandling = DefaultValueHandling.Ignore{{/if}})] + public {{typemap ../context}} {{dehumanize Name}} + { + get; + set; + } + {{/each}} + } +} \ No newline at end of file diff --git a/third_party/dotnet/devtools/src/generator/Templates/type-object.hbs b/third_party/dotnet/devtools/src/generator/Templates/type-object.hbs new file mode 100644 index 0000000000000..c0d4e25759e27 --- /dev/null +++ b/third_party/dotnet/devtools/src/generator/Templates/type-object.hbs @@ -0,0 +1,22 @@ +namespace {{rootNamespace}}.{{domain.Name}} +{ + using Newtonsoft.Json; + + /// + /// {{xml-code-comment type.Description 1}} + /// + public sealed class {{className}} + { + {{#each type.Properties}} + /// + /// {{xml-code-comment Description 2}} + /// + [JsonProperty("{{Name}}"{{#if Optional}}, DefaultValueHandling = DefaultValueHandling.Ignore{{/if}})] + public {{typemap ../context}} {{dehumanize Name}} + { + get; + set; + } + {{/each}} + } +} \ No newline at end of file diff --git a/third_party/dotnet/devtools_generation/README.md b/third_party/dotnet/devtools_generation/README.md deleted file mode 100644 index d4c4e39b1579d..0000000000000 --- a/third_party/dotnet/devtools_generation/README.md +++ /dev/null @@ -1,51 +0,0 @@ -#Generating the .NET Chrome DevTools Protocol code - -The object model for the .NET implementation for the Chrome DevTools Protocol (CDP) -is auto-generated by another project, and the resulting source code copied into -the .NET bindings source code. The initial generated code was based on the code -generated by the [BaristaLabs chrome-dev-tools-generator project](https://github.com/BaristaLabs/chrome-dev-tools-generator). -However, the code generated by that project made some interesting design choices -in its API that the Selenium .NET bindings maintainers were not fond of (use of -`Action` event handlers instead of proper .NET events, unnecessary use -of a complex data structures like `ActionBlock`, undesirable use of dependencies -on third-party libraries like `WebSocket4Net`, etc.), so a fork was created. -The instructions for updating the generated code are listed below. Please note -that the generation of the CDP API requires an active network connectiion at -present. - -##Prerequisites: -* Git -* Visual Studio 2019 -* .NET Core 2.1 -* Google Chrome (Stable channel preferred) -* Clone of the Selenium project source code (directory referred to as -`$SeleniumProjectDirectory` below; substitute the actual directory in -your environment) - -##Instructions: -1. In a Visual Studio Developer Command Prompt, clone the project from -https://github.com/jimevans/chrome-dev-tools-generator. By default, this will -be cloned into a directory named `chrome-dev-tools-generator`, but this can -be customized (see Git documentation for how). Since this may be different -for each user, in the sample commands below, that directory hereafter will -be referred to as `$GeneratorToolDirectory`, and you should use the actual -directory name you cloned the project into. - - git clone https://github.com/jimevans/chrome-dev-tools-generator - -2. At a command prompt, change into the `src\ChromeDevToolsGeneratorCLI` -directory. - - cd $GeneratorToolDirectory\src\ChromeDevToolsGeneratorCLI - -3. Generate the source code by using the `dotnet run` command with the -appropriate command-line arguments. This will build and run the generation -tool, using the settings file (`-s`) found in the Selenium project's -third_party directory, forcing the tool to download the protocol definition -(`-f`) for the installed version of Chrome, and writing the generated files -to the specified directory (`-o`). Note below, there is a double-dash (`--`) -command-line argument. This is not a typo, and is important. - - dotnet run -- -o $SeleniumProjectDirectory\dotnet\src\webdriver\DevTools\AutoGenerated -f -s $SeleniumProjectDirectory\third_party\dotnet\devtools_generation\settings.json - -4. Submit the resulting diff for approval as a PR in Git. diff --git a/third_party/dotnet/devtools_generation/settings.json b/third_party/dotnet/devtools_generation/settings.json deleted file mode 100644 index b4392dcf7ed84..0000000000000 --- a/third_party/dotnet/devtools_generation/settings.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "include": [ - { - "templatePath": "CommandResponseException.hbs", - "outputPath": "CommandResponseException.cs" - }, - { - "templatePath": "CommandResponseExtensions.hbs", - "outputPath": "CommandResponseExtensions.cs" - }, - { - "templatePath": "CommandResponseTypeMap.hbs", - "outputPath": "CommandResponseTypeMap.cs" - }, - { - "templatePath": "DevToolsCommandData.hbs", - "outputPath": "DevToolsCommandData.cs" - }, - { - "templatePath": "DevToolsEventData.hbs", - "outputPath": "DevToolsEventData.cs" - }, - { - "templatePath": "DevToolsSession.hbs", - "outputPath": "DevToolsSession.cs" - }, - { - "templatePath": "DevToolsSession_Domains.hbs", - "outputPath": "DevToolsSession_Domains.cs" - }, - { - "templatePath": "DevToolsSessionEventReceivedEventArgs.hbs", - "outputPath": "DevToolsSessionEventReceivedEventArgs.cs" - }, - { - "templatePath": "DevToolsSessionLogMessageEventArgs.hbs", - "outputPath": "DevToolsSessionLogMessageEventArgs.cs" - }, - { - "templatePath": "ICommand.hbs", - "outputPath": "ICommand.cs" - } - ], - "rootNamespace": "OpenQA.Selenium.DevTools", - "runtimeVersion": "", - "includeExperimentalDomains": false -}