Mouse Method to Open a Page in a New Browser Tab

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

zenfreak

Client
Регистрация
21.08.2013
Сообщения
249
Реакции
12
Баллы
18
I would like to use one of the mouse methods that will open a page in a new browser tab upon clicking on a link.

Right now I'm using:
Код:
Развернуть Свернуть Копировать
instance.ActiveTab.MouseMove(points, delay, true, true);

But also tried this way down here:
Код:
Развернуть Свернуть Копировать
instance.ActiveTab.MouseClick(x, y "left", "down");
instance.ActiveTab.MouseClick(x, y, "left", "up");
Could be considered another way to perform a click?
 
@copper12 I know that documentation but it's not helping me as I'm making the click using instance.ActiveTab.MouseMove. I don;t see how can I find info on how to open a new window using your link.

@rostonix I managed to use your technique of adding the _blank attribute but I've done that by using "set value" from the actions designer. Basically, I've done the same thing you pointed out but using the graphical interface and it worked. Thank you!

I'm still not sure why using:

Код:
Развернуть Свернуть Копировать
instance.ActiveTab.MouseClick(x, y "left", "down");
instance.ActiveTab.MouseClick(x, y, "left", "up");

it's not performing a click as mouse down/mouse up should be the action performed when you click.
 
Is there any other way to do this as I found some elements that do not open in a new window even if the target is set to _blank

<a __is_owner="true" id="ow16" data-focusid="25" target="_blank" jscontroller="I150Fe" jsaction="click:Cw6dad(preventDefault=true); mouseenter:d2MfZc; mouseleave:bugzGe" jslog="11927; 6:105423095693647355211; track: click" data-profileid="105423095693647355211" class="m3JvWd" href="./105423095693647355211">click me</a>

The above code is taken from the webpage I'm having trouble with. If you write this into a html it will open in a new window but if clicked in its original environment it does not open in a new window.
 

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