0

I am using RSelenium on tripadvisor to get some information (like price) but i'm stuck on how to pass dates.

Below is what I have tried. Could some one help me out here. thanks in advance!!

chrome$navigate("https://www.tripadvisor.in/")          
a <-chrome$findElement(using = 'css selector', ".typeahead_input")
a$sendKeysToElement(list("Bangalore"))

chrome$findElement(using = 'css selector', ".submit_text")$clickElement()
#chrome$findElement(using = 'css selector', 
".ui_picker_arrow_target")$clickElement()
chrome$findElement(using = 'css selector', "#PERSISTENT_TRIP_SEARCH_BAR > 
div.ui_columns.is- mobile.datepicker_box.trip_search.metaDatePicker.hotels_static_datepickers.wrap_label.responsive-inline-mobile.usePickerTypeIcons.hasDates.with_children > div:nth-child(2) > div > div.prw_rup.prw_datepickers_trip_search_dates.ui_column.responsive_inline_priority.supports_pre_pop_with_default_dates.wctx-tripsearch > div > span.unified-picker.ui_picker_field.focused > span.picker-inner > span")$clickElement()
Leon Bambrick
  • 26,009
  • 9
  • 51
  • 75
Pradeep
  • 3
  • 4
  • Welcome to the site. My guess is that It might be helpful if you say what happened when you try this. If there's an error message, or something unexpected happens, give some info about that. Best of luck. – Leon Bambrick Mar 19 '18 at 04:22
  • I am getting errors saying " Selenium message:no such element: Unable to locate element:" and i am pretty much sure that i have given some thing wrong may be because i am new to selenium and html also, Till [code] chrome$findElement(using = 'css selector', ".submit_text")$clickElement() [\code], but after that i am not able to select the required dates. – Pradeep Mar 19 '18 at 05:34
  • After much work around i was able to understand that if i give outer html which has date, will work but not sure on how to pass it. below is the outer html that i want to give to select the dates. [code] Check Out Tue, 01/08/18 Check Out Sat, 10/08/18 [/code] – Pradeep Mar 19 '18 at 05:35

0 Answers0