Closed GoogleCodeExporter closed 9 years ago
We tried it on gmail thinking that problem was due to an ajax page which had a
back button override. But it does not reproduce
Can you please provide a testcase & the pages ?
This would help us to reproduce the issue
You can have all the confidential informed stripped out.
Original comment by gmanikp...@chromium.org
on 26 Mar 2015 at 6:23
I'm sorry, but I cannot provide a test case and the pages. For you to
reproduce the issue you would have to have an active sessionid that would give
you access to confidential information.
I have done some further digging into the problem, and found:
1. There is nothing wrong with chromedriver. It (reasonably) implements
driver.back() by using the Page.getNavigationHistory and
Page.navigateToHistoryEntry to go back one page.
2. The problem is that the "entries" array returned by
Page.getNavigationHistory, the "id" is not unique each entry.
3. Page.navigateToHistoryEntry relies on the id being unique, and returns the
first page in the list with that id.
4. In the log I submitted, the last 3 pages shared the same supposedly unique
"id":6, and Page.navigateToHistoryEntry navigated to the first instance which
was actually two pages back.
I can tell you that this web page contains a search form in an iframe which is
dynamically reloaded after each search. Each time the iframe is reloaded, a
new entry is added to the entries array returned by
Page.navigateToHistoryEntry, but the id for that entry remains the same as the
previous entry.
I now see that the underlying problem is that
//src/content/browser/frame_host/navigation_entry_impl.cc is not generating
unique id's when this site is browsed.
Should this issue be closed and referred to another project?
Original comment by rdst...@steeds.us
on 27 Mar 2015 at 5:08
I am closing this defect, Please log a new issue in chromium project
https://code.google.com/p/chromium/issues/list
Also, I understand you cannot share the test data due to its confidentiality.
But it would be helpful if you could provide some sample test case & page with
the team.
Thanks,
Original comment by gmanikp...@chromium.org
on 27 Mar 2015 at 10:41
I think my analysis in comment#2 is wrong.
Further digging through the code suggests that chromedriver is actually
implementing the goback() command by executing the javascript
window.history.back() in line 216 of web_view_impl.cc .
I believe that window.history.back() should work, but there do seem to be
multiple unresolved issues with it in chromium.
As a workaround in my python code, I have replaced the line in my code:
driver.back()
with the new line:
driver.find_element_by_tag_name('body').send_keys('\b')
This sends a backspace keystroke to the browser which is a keyboard shortcut
for the browser back button in chrome.
Since making this change, my python webdriver program has performed as expected.
Original comment by rdst...@steeds.us
on 31 Mar 2015 at 11:39
Original issue reported on code.google.com by
rdst...@steeds.us
on 25 Mar 2015 at 6:45