Below is my Javascript code and I'm using it for my discord bot. This is my first time trying web scrapping, so I might need extra explanation of functions.
const webdriver = require('selenium-webdriver');
const {Builder,By,Key,until} = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');
const url = 'https://www.naver.com/'
const print = console.log;
exports.main = function(args){
var driver = new webdriver.Builder()
.withCapabilities(webdriver.Capabilities.chrome())
.build();
driver.get(url);
var titlename = driver.findElement(By.xpath('/html/body/div[2]/div[1]/div/img'));
titlename.then(function(value){
value.getText().then(function(titlename){
print(titlename)
})
})
}
The error message I got is shown below:
[12216:7056:0207/124916.024:ERROR:chrome_browser_main_extra_parts_metrics.cc(227)] START: ReportBluetoothAvailability(). If you don't see the END: message, this is
crbug.com/1216328.
[12216:7056:0207/124916.025:ERROR:chrome_browser_main_extra_parts_metrics.cc(230)] END: ReportBluetoothAvailability()
[12216:7056:0207/124916.025:ERROR:chrome_browser_main_extra_parts_metrics.cc(235)] START: GetDefaultBrowser(). If you don't see the END: message, this is crbug.com/1216328.
[12216:9360:0207/124916.027:ERROR:device_event_log_impl.cc(214)] [12:49:16.027] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection:
[12216:9360:0207/124916.030:ERROR:device_event_log_impl.cc(214)] [12:49:16.030] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection:
[12216:7056:0207/124916.032:ERROR:chrome_browser_main_extra_parts_metrics.cc(239)] END: GetDefaultBrowser()
Please help me how to fix this error. I tried re-installing Chrome and Chrome driver and I checked the version of both.