How to shrink/zoom/scroll the browser display?

Discussions and Tech Support related to using the iMacros Component for .NET in your applications.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

How to shrink/zoom/scroll the browser display?

by BGood on Wed Mar 20, 2013 11:07 am

Is there a way to programatically shrink/zoom/scroll the browser display? By this I mean:

Shrinking would scale the font size down and show more of the web page.

Zooming would show less of the web page and effectively scale the font size up.

Scrolling would move the display window up/down the page.

Right now, the only way I have figured out to scroll is to target an html element, and I have not figured out a way to do shrinking/zooming yet.

Thanks.
BGood
 
Posts: 19
Joined: Wed Mar 30, 2011 7:23 pm

Re: How to shrink/zoom/scroll the browser display?

by Marcia, Tech Support on Fri Apr 05, 2013 12:24 am

Hi,

I am afraid you cannot do this in the iMacros Component's browser...
Regards,

Marcia
Marcia, Tech Support
 
Posts: 1058
Joined: Thu Jan 29, 2009 6:10 am

Re: How to shrink/zoom/scroll the browser display?

by rguez_18 on Tue May 14, 2013 6:57 am

You can scroll by using the script below. You can play around with the parameters to hit the location on where you want to scroll to. Hope this helps. Thanks!

URL GOTO=javascript:window.scrollBy(0,150)
.NET Developer
<---Using IMacro since version 4 - See Date Joined on Forum
***For Quotes and Estimates please feel free to contact me.
YM: Rguez_18 <at> y a hoo <that> com
Skype: Rguez_18
rguez_18
 
Posts: 101
Joined: Thu Oct 20, 2005 11:04 am

Re: How to shrink/zoom/scroll the browser display?

by chivracq on Mon Feb 24, 2014 6:37 am

Reading sometimes some older Threads (for fun!!)...

For Scrolling, I use indeed as well the same Code like 'rguez_18' in my Scripts.

I don't do any Zooming nor Shrinking but some quick Testing gives me a way to achieve it using the EVENT Mode on Firefox with the following Code:

Code: Select all
VERSION BUILD=8810214 RECORDER=FX
TAB T=1
URL GOTO=http://forum.iopus.com/viewtopic.php?f=24&t=20499

'EVENT TYPE=CLICK SELECTOR="#p51935>DIV>DIV>DIV>SPAN:nth-of-type(2)" BUTTON=0
'EVENT TYPE=CLICK SELECTOR="#p52778>DIV>DIV>DIV" BUTTON=0
TAG POS=1 TYPE=SPAN ATTR=TXT:Zooming
EVENT TYPE=KEYPRESS SELECTOR="#phpbb" CHAR="+" MODIFIERS="ctrl"
WAIT SECONDS=2
EVENTS TYPE=KEYPRESS SELECTOR="#phpbb" CHARS="++++++++" MODIFIERS="ctrl"
WAIT SECONDS=2
'EVENT TYPE=CLICK SELECTOR="#p51935>DIV>DIV>DIV>SPAN" BUTTON=0
WAIT SECONDS=2
EVENT TYPE=KEYPRESS SELECTOR="#phpbb" CHAR="-" MODIFIERS="ctrl"
WAIT SECONDS=2
EVENTS TYPE=KEYPRESS SELECTOR="#phpbb" CHARS="----" MODIFIERS="ctrl"
WAIT SECONDS=2
EVENTS TYPE=KEYPRESS SELECTOR="#phpbb" CHARS="----" MODIFIERS="ctrl"


The TAG is not even needed, but can be used to direct the Zooming at a specific Element/Area...

I can use "====" instead of "++++" as well for Zooming, as I have the "+" and "=" Chars on the same Key on my Keyboard.

Tested on iMacros v8.8.1 Add-on for Firefox on Pale Moon v24.3.2 (= FF v27.0.1) on WinXP SP3.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6474
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: How to shrink/zoom/scroll the browser display?

by MWK on Sun Aug 09, 2015 8:49 pm

Hi
iam stuck on the same issue

using iMacros Component's browser.

anyway round this problem


want to zoom and shrink page for different testing environments
MWK
 
Posts: 1
Joined: Sun Aug 09, 2015 8:44 pm

Re: How to shrink/zoom/scroll the browser display?

by chivracq on Mon Aug 10, 2015 1:03 pm

MWK wrote:Hi
iam stuck on the same issue

using iMacros Component's browser.

anyway round this problem

want to zoom and shrink page for different testing environments

FCIM...! :mrgreen:

I already gave a working Solution for FF, that can be your Plan B...

Your "different testing environments" sounds completely vague to me...

If you can find a way to do the Zooming in JavaScript, you should be able I reckon to use the 'URL GOTO' Syntax like for Scrolling...

A quick Search in Google (most Hits from Stackoverflow, for example this one and this one...) retrieves a few different ways to do it, but for the 4 following ones, none is supposed to work in FF, and indeed, I don't get any to work [on iMacros for FF v8.8.2, Pale Moon v24.6.2 (=FF31), Win7-x64]. They are supposed to work on IE and CR, I'll let you test them and report...:
Code: Select all
'URL GOTO=javascript:window.parent.document.body.style.zoom=2
'URL GOTO=javascript:window.parent.document.body.zoom=2
'URL GOTO=javascript:document.body.style.zoom="80%"
URL GOTO=javascript:document.body.style.zoom=1.0;this.blur()
(You try them one by one...)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6474
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to iMacros Component for .NET

Who is online

Users browsing this forum: No registered users and 0 guests

-->