Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dotnet/test/common/DevTools/DevToolsConsoleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

namespace OpenQA.Selenium.DevTools;

using CurrentCdpVersion = V142;
using CurrentCdpVersion = V141;

[TestFixture]
public class DevToolsConsoleTest : DevToolsTestFixture
Expand Down
2 changes: 1 addition & 1 deletion dotnet/test/common/DevTools/DevToolsLogTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

namespace OpenQA.Selenium.DevTools;

using CurrentCdpVersion = V142;
using CurrentCdpVersion = V141;

[TestFixture]
public class DevToolsLogTest : DevToolsTestFixture
Expand Down
2 changes: 1 addition & 1 deletion dotnet/test/common/DevTools/DevToolsNetworkTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

namespace OpenQA.Selenium.DevTools;

using CurrentCdpVersion = V142;
using CurrentCdpVersion = V141;

[TestFixture]
public class DevToolsNetworkTest : DevToolsTestFixture
Expand Down
2 changes: 1 addition & 1 deletion dotnet/test/common/DevTools/DevToolsPerformanceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

namespace OpenQA.Selenium.DevTools;

using CurrentCdpVersion = V142;
using CurrentCdpVersion = V141;

[TestFixture]
public class DevToolsPerformanceTest : DevToolsTestFixture
Expand Down
2 changes: 1 addition & 1 deletion dotnet/test/common/DevTools/DevToolsProfilerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

namespace OpenQA.Selenium.DevTools;

using CurrentCdpVersion = V142;
using CurrentCdpVersion = V141;

[TestFixture]
public class DevToolsProfilerTest : DevToolsTestFixture
Expand Down
2 changes: 1 addition & 1 deletion dotnet/test/common/DevTools/DevToolsSecurityTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

namespace OpenQA.Selenium.DevTools;

using CurrentCdpVersion = V142;
using CurrentCdpVersion = V141;

[TestFixture]
public class DevToolsSecurityTest : DevToolsTestFixture
Expand Down
2 changes: 1 addition & 1 deletion dotnet/test/common/DevTools/DevToolsTabsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

namespace OpenQA.Selenium.DevTools;

using CurrentCdpVersion = V142;
using CurrentCdpVersion = V141;

[TestFixture]
public class DevToolsTabsTest : DevToolsTestFixture
Expand Down
4 changes: 2 additions & 2 deletions dotnet/test/common/DevTools/DevToolsTargetTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@

namespace OpenQA.Selenium.DevTools;

using CurrentCdpVersion = V142;
using CurrentCdpVersion = V141;

[TestFixture]
public class DevToolsTargetTest : DevToolsTestFixture
{
private int id = 142;
private int id = 141;

[Test]
[IgnoreBrowser(Selenium.Browser.IE, "IE does not support Chrome DevTools Protocol")]
Expand Down
33 changes: 14 additions & 19 deletions scripts/update_cdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@
http = urllib3.PoolManager()
root_dir = Path(os.path.realpath(__file__)).parent.parent

"""This is the same method from pinned_browser. Use --chrome_channel=Beta if
using early stable release."""
parser = argparse.ArgumentParser()
parser.add_argument(
"--chrome_channel", default="Stable", help="Set the Chrome channel"
)
args = parser.parse_args()
channel = args.chrome_channel

def get_chrome_milestone():
"""This is the same method from pinned_browser. Use --chrome_channel=Beta if
using early stable release."""
parser = argparse.ArgumentParser()
parser.add_argument(
"--chrome_channel", default="Stable", help="Set the Chrome channel"
)
args = parser.parse_args()
channel = args.chrome_channel

r = http.request(
"GET",
f"https://chromiumdash.appspot.com/fetch_releases?channel={channel}&num=1&platform=Mac,Linux",
Expand Down Expand Up @@ -195,16 +194,12 @@ def update_dotnet(chrome_milestone):
file, old_chrome(chrome_milestone), new_chrome(chrome_milestone)
)

files = [
root_dir / "dotnet/test/common/CustomDriverConfigs/StableChannelChromeDriver.cs"
]
dir_path = root_dir / "dotnet/test/common/DevTools"
files.extend(str(file) for file in dir_path.glob("*") if file.is_file())
for file in files:
replace_in_file(
file, previous_chrome(chrome_milestone), new_chrome(chrome_milestone)
)

if channel == "Stable":
dir_path = root_dir / "dotnet/test/common/DevTools"
for file in dir_path.glob("*") if file.is_file()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that valid syntax?

I'd write that as:

for file in dir_path.glob("*"):
    if file.is_file():

replace_in_file(
file, previous_chrome(chrome_milestone), new_chrome(chrome_milestone)
)

def update_ruby(chrome_milestone):
file = root_dir / "rb/lib/selenium/devtools/BUILD.bazel"
Expand Down
Loading