Baru-baru ini Chrome diperbarui ke versi 79. Saya telah memperbarui chromedriver ke versi masing-masing dengan cara yang sama seperti yang selalu saya lakukan - di dalam proyek Java saya. Tapi saat saya deploy Zalenium, di container, di dalam home/seluser/ masih ada chromedriver-78. Saya sudah mencoba menghapus chromedriver lama itu dengan 'kubectl rm chromedriver' - file terhapus tetapi saya tidak dapat menjalankan tes apa pun. Saya sudah mencoba memindahkan Zalenium dan tidak berhasil. Semuanya diberi stempel waktu dengan tanggal terbaru kecuali file chromedriver. Tentu saja, masalah ini belum pernah terjadi sebelumnya. Bagaimana cara memperbarui chromedriver agar diperbarui di semua penampung? Bagaimana Zalenium mengontrol/menangani pembaruan browser Chrome?
Inilah chromedriver di dalam wadah setiap kali saya menggunakan 'Berinteraksi melalui VNC':
Berikut cuplikan kode cara saya menangani akses chromedriver:
public static MutableCapabilities getChromeCapability() {
String chromePath = prop_conf_browsers.getProperty("chromePath");
String chromeDriverPath = prop_conf_browsers.getProperty("chromeDriverPath");
System.out.println(chromeDriverPath);
String chromeProfileDir = prop_conf_browsers.getProperty("chromeProfileDir");
if (chromePath != null && !chromePath.equalsIgnoreCase("default") && !chromePath.equalsIgnoreCase("")) {
System.setProperty("webdriver.chrome.bin", chromePath);
}
if (chromeDriverPath != null && !chromeDriverPath.equalsIgnoreCase("default")
&& !chromeDriverPath.equalsIgnoreCase("")) {
System.setProperty("webdriver.chrome.driver", chromeDriverPath);
}
Informasi lingkungan:
capabilities: Capabilities {acceptSslCerts: true, browserName: chrome, maxInstances: 1, platform: LINUX, platformName: LINUX, resolution: 1920x1080, screen-resolution: 1920x1080, screenResolution: 1920x1080, seleniumProtocol: WebDriver, server:CONFIG_UUID: 456a4fcc-xxxx-xxxx-xxxx-xxx..., tz: America/Chicago, version: 79.0.3945.79}