Open gorkang opened 3 years ago
remDr$log("browser") shows console.warn() and console.error() messages, but does NOT show console.log() messages.
console.warn()
console.error()
console.log()
The expected behavior is that console.log() outputs would also be shown.
Please find a reproducible example below:
system('docker stop $(docker ps -q)') system("docker run -d --shm-size=2g -p 4445:4444 -p 5901:5900 selenium/standalone-chrome-debug") library(RSelenium) remDr <- remoteDriver(port=4445L, browserName = "chrome") ##4445 for mac. windows can use 4444 remDr$open(silent = TRUE) remDr$navigate("https://google.com") # Gets warnings and errors as expected remDr$executeScript("console.warn('This is a warning message')") #> list() remDr$log("browser") #> [[1]] #> [[1]]$level #> [1] "WARNING" #> #> [[1]]$message #> [1] "console-api 2:32 \"This is a warning message\"" #> #> [[1]]$source #> [1] "console-api" #> #> [[1]]$timestamp #> [1] 1.623427e+12 remDr$executeScript("console.error('This is an error message')") #> list() remDr$log("browser") #> [[1]] #> [[1]]$level #> [1] "SEVERE" #> #> [[1]]$message #> [1] "console-api 2:32 \"This is an error message\"" #> #> [[1]]$source #> [1] "console-api" #> #> [[1]]$timestamp #> [1] 1.623427e+12 # Does NOT get console.log :( remDr$executeScript("console.log('This is a log message')") #> list() remDr$log("browser") #> list()
Created on 2021-06-11 by the reprex package (v2.0.0)
remDr$log("browser") shows
console.warn()
andconsole.error()
messages, but does NOT showconsole.log()
messages.The expected behavior is that console.log() outputs would also be shown.
Please find a reproducible example below:
Created on 2021-06-11 by the reprex package (v2.0.0)