From 1c9dda3c9b0175d61f543342d0383c597897954f Mon Sep 17 00:00:00 2001 From: mrchypark Date: Wed, 10 Feb 2016 15:21:01 +0900 Subject: [PATCH 1/3] fix for unicode - UTF-8 page_source --- R/webdriver.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/webdriver.R b/R/webdriver.R index 28dd6a5..7fda89e 100644 --- a/R/webdriver.R +++ b/R/webdriver.R @@ -299,7 +299,7 @@ page_source <- function(){ customrequest="GET", httpheader=c('Content-Type'='application/json;charset=UTF-8'), binary=T))) - + Encoding(source$value)<-"UTF-8" return(source$value) } From f276c5212a33bb15e49bb5cb163e124e9354b541 Mon Sep 17 00:00:00 2001 From: Chan-Yub Park Date: Tue, 16 Feb 2016 11:26:01 +0900 Subject: [PATCH 2/3] add get_cookies function get current_cookies --- R/webdriver.R | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/R/webdriver.R b/R/webdriver.R index 7fda89e..65c01ff 100644 --- a/R/webdriver.R +++ b/R/webdriver.R @@ -221,7 +221,7 @@ page_title <- function(){ customrequest = "GET", httpheader = c('Content-Type' = 'application/json;charset=UTF-8'), binary = T))) - + Encoding(windowTitle$value)<-"UTF-8" return(windowTitle$value) } @@ -302,6 +302,19 @@ page_source <- function(){ Encoding(source$value)<-"UTF-8" return(source$value) } +#' Retrieve cookies +#' +#' Get the current cookies +#' @export +#' @return a string containing the page cookies +get_cookies <- function(){ + cookies <- fromJSON(rawToChar(getURLContent(paste0(seleniumSession$sessionURL, "/cookie"), + customrequest = "GET", + httpheader = c('Content-Type' = 'application/json;charset=UTF-8'), + binary = T))) + + return(cookies$value) +} #' Find an element via XPath #' From 9792e1c9e42bbd5652cc7247030534dda98cfe3d Mon Sep 17 00:00:00 2001 From: Chan-Yub Park Date: Wed, 6 Jul 2016 17:48:48 +0900 Subject: [PATCH 3/3] Update README --- README | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README b/README index 755bdf7..94eef4f 100644 --- a/README +++ b/README @@ -1 +1,7 @@ -R bindings to the Webdriver API \ No newline at end of file + +crubba doesn't maintain this package anymore because he/she still doesn't react about my pr. +So I'm trying to maintain Rwebdriver package. +Because easier than RSelenium. + + +R bindings to the Webdriver API