Mouse Method to Open a Page in a New Browser Tab

zenfreak

Client
Регистрация
21.08.2013
Сообщения
249
Благодарностей
11
Баллы
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?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 071
Благодарностей
5 702
Баллы
113

zenfreak

Client
Регистрация
21.08.2013
Сообщения
249
Благодарностей
11
Баллы
18
@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.
 

zenfreak

Client
Регистрация
21.08.2013
Сообщения
249
Благодарностей
11
Баллы
18
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.
 

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