How can I simulate a back button keypress?
There is currently no function to call for this and I thought that using simulate_keys would cover it, but there is no keycode in selenium/
Perhaps I'm missing something though - Is there a way to simulate the back button?
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Craig
- Solved:
- 2012-01-23
- Last query:
- 2012-01-23
- Last reply:
Craig (craigtlandry) said : | #1 |
I've just found a solution although it is probably not ideal:
In my script I just import sst.actions.browser and then call browser.back() when needed. My guess is that the preferred way to do this would be to wrap the browser.back() in a function from sst.actions. Still though, this covers my needs for now. Marking is solved.
Corey Goldberg (coreygoldberg) said : | #2 |
Craig,
yup, that's how I'd approach it..
> My guess is that the preferred way to do this
> would be to wrap the browser.back() in a
> function from sst.actions
something like a `go_back()` function would fit with the API/approach.
feel free to enter a bug to ask for this enhancement (I'll add it), or submit a merge proposal if you want to help with dev.
regards,
-Corey
Craig (craigtlandry) said : | #3 |
go_back() sounds good to me. When I get a few minutes I'll open a
feature request and submit a patch with it.
On Mon, Jan 23, 2012 at 2:05 PM, Corey Goldberg
<email address hidden> wrote:
> Your question #185576 on selenium-
> https:/
>
> Corey Goldberg posted a new comment:
> Craig,
>
> yup, that's how I'd approach it..
>
>> My guess is that the preferred way to do this
>> would be to wrap the browser.back() in a
>> function from sst.actions
>
> something like a `go_back()` function would fit with the API/approach.
>
> feel free to enter a bug to ask for this enhancement (I'll add it), or
> submit a merge proposal if you want to help with dev.
>
> regards,
>
> -Corey
>
> --
> You received this question notification because you asked the question.
Corey Goldberg (coreygoldberg) said : | #4 |
I just added the "go_back()" function. It is available in trunk.