Can I expect the BrowserBack Key to Work?

  • Автор темы Автор темы zenfreak
  • Дата начала Дата начала

zenfreak

Client
Регистрация
21.08.2013
Сообщения
249
Реакции
12
Баллы
18
Using this
Код:
Развернуть Свернуть Копировать
Emulator.SendKey(instance.ActiveTab.Handle,System.Windows.Forms.Keys.BrowserBack, KeyboardEvent.Press);
doesn't seem to have any effect.

Does anyone know a way I can emulate a browser back?
 
I did not fully understand your solution. So I have this url http://example.com/article05.html and I've clicked on a link on that page, let's say http://example.com/article05-indepth.html and usually, this will open a popup that I can close by clicking a button but right now I get a "Page isn't available" and need to hit the back browser button.

I don't really know the initial url (http://example.com/article05.html) so I can visit that using http://example.com/article05-indepth.html as a referer as I think you are suggesting.

How can I get back to http://example.com/article05.html without knowing the url?
 
If clicking link there is pop up then back button is not active even in browser.

If honestly I also did not understand what You mean, but there is variable {-Page.Url-} so you can save that in any other variable BEFORE clicking any link. So in case you need to get back you use this variable.
 
Sorry for the misunderstanding. The popup I was referring to it's not a browser popup window but just a simple javascript popup so it's part of the same browser page. This happens when opening posts in the Instagram feed - when I click the post, a popup shows up and I can close it by clicking the X button or clicking anywhere outside the box and return to the feed I was into. But if for some reason, the post doesn't exist anymore, when I click, instead of showing the popup, I will be visiting a page like this one: https://www.instagram.com/p/Bgo3e-9FUXa/ with an error "Sorry, this page isn't available."

To get back to my feed I'll have to use the browser back button, otherwise, if simply visiting the feed URL, I will lose my current feed position! This is the main downside of visiting the previous URL vs using the browser back button.

I was advised to use this for emulating the browser back button: http://help.zennolab.com/en/v5/zenn...nter~ZennoLab.CommandCenter.Tab~KeyEvent.html but not sure how to use it and what's role of the "alt", "ctrl", "shift" keyModifers.

I assume it should look something like this: instance.ActiveTab.KeyEvent("BrowserBack", "press", "ctrl"); but this doesn't work and, like I said, not sure why do I need alt, ctrl or shift for

Not sure why is this so hard to emulate as this should be part of the basic browser emulation
 
  • Спасибо
Реакции: EtaLasquera

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)