window-resize

How to resize current browser window in Selenium WebDriver with Java?

♀尐吖头ヾ 提交于 2019-12-03 16:14:42
问题 I need to resize the browser as 300x400 during executing the Selenium automated tests. How can I resize the browser window in Selenium WebDriver (aka, Selenium 2) with Java? [Note: It needs to resize the browser window for testing Responsive Web Design (RWD)] 回答1: You can get a reference to the current window with driver.manage().window() . And the window has a setSize() method, so you could try Dimension dimension = new Dimension(800, 600); driver.manage().window().setSize(dimension) 回答2:

Make an equal height function resizeable on window resize

不羁岁月 提交于 2019-12-03 08:31:24
We created a very basic equal height function a while back that works great. However, we've been tasked with making the column heights resize as the window is resized. It's being implemneted into a responsive, fluid design. But the powers that be don't understand that the typical responsive use case isn't dragging your browser all over the place to accept specific break points. Anyhow, got the markup and js setup in jsfiddle here. http://jsfiddle.net/J6uaH/3/ Just can't quite wrap my brain around adding the window resize element to the heights. Any help that anyone can provide will be hugely

How to detect window size and then do something with jquery switch statement

限于喜欢 提交于 2019-12-03 07:08:36
问题 i would like to check for the window size with jquery and based on the different resolutions i would like to change the background image. So i was thinking to somehow use the "switch" statement for more cases, but i just don't know how this would look like. This is the basic structure i want but with more options: if ((screen.width>=1024) && (screen.height>=768)) { //do something } else { //do something else } Thanks for your help. 回答1: The switch statement won't let you do stuff like

How to resize current browser window in Selenium WebDriver with Java?

假如想象 提交于 2019-12-03 05:41:42
I need to resize the browser as 300x400 during executing the Selenium automated tests. How can I resize the browser window in Selenium WebDriver (aka, Selenium 2) with Java? [Note: It needs to resize the browser window for testing Responsive Web Design (RWD)] NilsH You can get a reference to the current window with driver.manage().window() . And the window has a setSize() method, so you could try Dimension dimension = new Dimension(800, 600); driver.manage().window().setSize(dimension) For Responsive Design it's better if you don't use fixed data, in this case screen resolution - users need

Size batch windows and set in specific location

心已入冬 提交于 2019-12-02 14:26:32
问题 I have multiple batch files I run to monitor my network links. I have one of the sets of code below. I run a single batch file to open all the files at once. I then have to reposition them across the top of the screen so I can open internet explorer to display solar winds across the bottom portion of the screen. I want to add to the code I am using to set where each window will open. Thank you in advance for the help. @echo off TITLE = VoIP Link mode 50,20 setlocal enableextensions

How to get with Curses the window-size from a resized window?

安稳与你 提交于 2019-12-02 11:11:03
问题 I tried it this way, but it doesn't work - the returned values from getmaxyx remain always the same. #!/usr/bin/env perl use warnings; use 5.012; use Curses; my $size_changed = 0; $SIG{'WINCH'} = sub { $size_changed= 1; }; initscr(); my ( $row, $col ); getmaxyx( $row, $col ); addstr( "begin: $row - $col\n" ); refresh(); for ( 0 .. 19 ) { addstr( "-------------\n" ); if ( $size_changed ) { getmaxyx( $row, $col ); addstr( "new: $row - $col\n" ); $size_changed = 0; } refresh(); sleep 1; } sleep

Size batch windows and set in specific location

只谈情不闲聊 提交于 2019-12-02 08:48:24
I have multiple batch files I run to monitor my network links. I have one of the sets of code below. I run a single batch file to open all the files at once. I then have to reposition them across the top of the screen so I can open internet explorer to display solar winds across the bottom portion of the screen. I want to add to the code I am using to set where each window will open. Thank you in advance for the help. @echo off TITLE = VoIP Link mode 50,20 setlocal enableextensions enabledelayedexpansion rem Get address from command line set "address=13.2.9.6" if not defined address set

How do I resize a Windows Forms form in C#?

孤人 提交于 2019-12-02 07:13:07
问题 I am making a Windows Forms application. I want the forms height to increase after a button is pressed. How do I do this? 回答1: Use the Height property. For instance: this.Height = newHeight; 回答2: You can just increase the form height value by a specified amount on the button click: private void button1_Click(object sender, EventArgs e) { int amountToIncrease = 10; this.Height += amountToIncrease; } 回答3: this.Size = new Size(175, 125); or this.ClientSize = new Size(175, 125); From MSDN: The

How to get with Curses the window-size from a resized window?

笑着哭i 提交于 2019-12-02 05:14:12
I tried it this way, but it doesn't work - the returned values from getmaxyx remain always the same. #!/usr/bin/env perl use warnings; use 5.012; use Curses; my $size_changed = 0; $SIG{'WINCH'} = sub { $size_changed= 1; }; initscr(); my ( $row, $col ); getmaxyx( $row, $col ); addstr( "begin: $row - $col\n" ); refresh(); for ( 0 .. 19 ) { addstr( "-------------\n" ); if ( $size_changed ) { getmaxyx( $row, $col ); addstr( "new: $row - $col\n" ); $size_changed = 0; } refresh(); sleep 1; } sleep 3; endwin(); #!/usr/bin/env perl use warnings; use 5.012; use Curses; my $size_changed = 0; $SIG{'WINCH

How do I resize a Windows Forms form in C#?

女生的网名这么多〃 提交于 2019-12-02 02:22:30
I am making a Windows Forms application. I want the forms height to increase after a button is pressed. How do I do this? CrazyCasta Use the Height property . For instance: this.Height = newHeight; You can just increase the form height value by a specified amount on the button click: private void button1_Click(object sender, EventArgs e) { int amountToIncrease = 10; this.Height += amountToIncrease; } this.Size = new Size(175, 125); or this.ClientSize = new Size(175, 125); From MSDN: The size of the client area of the form is the size of the form excluding the borders and the title bar. http:/