Is it possible to increase the window size in AngularJS Protractor beyond the screen dimensions?

Currently, I am utilizing Protractor for e2e testing with an ng-grid. Unfortunately, not all columns are visible on the screen due to its limited width. My goal is to widen the window beyond the screen size so that everything is displayed within the window without any need for scrolling.

I attempted the following code snippet to increase the window size:

browser.driver.manage().window().setPosition(0, 0);
browser.driver.manage().window().setSize(2000, 3000);

However, this did not result in a larger window surpassing my screen dimensions. Can anyone provide suggestions on how I can force it to expand further? Thank you!

Answer №1

It's not possible to resize the window using setSize or window.resizeTo.

Instead, there are OS-specific alternatives:

For Linux:

You can enable virtual screen resolutions by running the following command:

xrandr --output LVDS1 --mode 1366x768 --fb 2000x3000 --panning 2000x3000

Replace 1366x768 with your actual display resolution and 2000x3000 with the virtual resolution you desire.

For Windows:

Enable Remote Desktop Connections on your Windows machine and connect using a custom resolution. This can be done from the command line on Linux:

export MACHINE_IP=10.0.2.15
export WIN_USER_NAME=brendan
export WIN_USER_PWD=secret

rdesktop ${MACHINE_IP} -u ${WIN_USER_NAME} -p ${WIN_USER_PWD} -x b -a 16bpp -g "2000x3000" -r sound:off

For Mac:

I'm not sure if a similar solution exists for Mac. Feel free to make any edits or additions.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

utilizing JavaScript to obtain JSON data within an EJS document

Hello, I'm currently facing an issue with my code and would appreciate any help to resolve it. Here is a snippet from my Node.js server file: //setup var express = require("express"); var request = require("request"); var bodyParser = require("body ...

A function in AngularJS called ng-click that applies a class to a selected navigation link when clicked

I'm having trouble figuring out the correct code for a navigation sidebar in an angularJS app. The goal is for the active link to be highlighted with a background color when clicked. Currently, it does work but the highlight only shows up after clicki ...

What is the solution for the error message "this.filters is not a function" in Vue.js 2?

Here is the code for my component: <script> import _ from 'lodash' export default{ props:['search','category'], data(){ return{ price_min:'', ...

The query parameter is not defined in the router of my Next.js app API

I'm currently working on building an API endpoint for making DELETE requests to remove albums from a user's document in the MongoDB Atlas database. Struggling with an error that keeps popping up, indicating that the albumName property is undefin ...

JQuery Fails to Trigger While Navigating Between Pages with React Router <Link>

When navigating from my home page to the product page, I am encountering an issue with my hamburger button. It appears as though it is clicked but does not open up the menu. However, if I refresh the page, the button works again. Strangely, after refreshin ...

Using Vue to dynamically add a CSS class based on a specific condition

I am in the process of creating a custom image slider with vuex and I would like to assign a specific class to the navigation dots used for sliding through the images. When a dot is active, it should have a class called dotActive. I intend to use the activ ...

Blog entries alternating between a pair of distinct hues

I want to create a design where each post container has a different color from the one next to it. Essentially, I would like the containers to alternate between two distinct colors. The left side shows how it currently appears, while the right side depict ...

Clear the history of a dynamically generated button using jQuery

Greetings fellow StackOverflow users! I'm currently tackling a project that requires jQuery to implement a master/detail table layout in asp.net C#. The master and detail tables need to be generated dynamically. The issue I'm facing involves gen ...

ES6 Babel's grammar is set to be exported as the default

When using Babel, I am encountering an issue with importing the module shown below: // mongoose_helpers.js const r_string = { type: String, required: true } const r_number = { type: Number, required: true } export default { r_string, r_number } ...

Unlock the message with Proxy Re-encryption technology

I'm completely new to encryption and am experimenting with a Node JS library called recrypt-js for Proxy Re-encryption using CryptoJS. I tried encrypting the message "test data" following the example provided, but I'm facing difficulty when tryin ...

Issue with serving static files in ExpressJs

I'm facing an issue with my Express app where the static files are not working properly for certain routes. For example, when I visit '/', all styles and images load correctly as expected when the index.ejs is rendered. However, when I navi ...

Utilize React's Context Provider to centrally manage all state while incorporating async calls

I am currently exploring more refined methods to establish a provider/consumer setup in which an asynchronous call is initiated from the provider, but the consumer does not need to handle state management. Within my context provider, I am fetching data to ...

Challenges with Incorporating Stripe

I am currently working on integrating Stripe into a school project. Despite following the documentation and instructions provided, I keep encountering a POST 500 (INTERNAL SERVER ERROR) along with an error message stating "Error fetching payment intent: Er ...

Ways to streamline the organization of Reddit comments?

Looking to avoid using the normalise api for flattening a reddit comment data structure. Here's an example call: https://www.reddit.com/r/reactjs/comments/506gca/what_backend_and_db_are_you_using_with_react/.json This request returns a nested struc ...

Chrome triggers Skrollr 'relative top-bottom' animations prematurely

I am working with multiple relative positioned divs stacked on top of each other, each set to a height of 100% using jQuery upon loading. Within these relative positioned divs, there is a fixed div containing the content. Using skrollr, I have implemented ...

Injecting controllers and classes dynamically using AngularJS

I'm currently working on a dynamic widgets list where each widget is defined by its html, class, controller, and name. Some of these parameters may be empty based on the type of widget. These widgets are then loaded dynamically into <li> element ...

Enhancing the node module of a subpackage within Lerna: A step-by-step guide

I recently integrated lerna into my workflow to streamline the installation of all node modules for multiple sub packages with just one command. Currently, I'm only utilizing the lerna bootstrap feature. Here's a snippet from my lerna.json: { & ...

Implementing conditional button visibility in Angular based on user authorization levels

I've been experimenting with the following code snippet: <button ng-if="!isAuthenticated()" ng-click="deleteReview()">Delete</button> In my JavaScript, I have: $scope.isAuthenticated = function() { $http.get("api/user ...

Using jQuery UI to create sortable lists that are connected and have hidden overflow features

How can I hide overflow from two fixed-height divs containing sortable lists connected to each other without affecting their connection? For example, if overflow is set to hidden, the list item doesn't display when dragged outside of the div. I' ...

Exploring VueJs 3's Composition API with Jest: Testing the emission of input component events

I need help testing the event emitting functionality of a VueJs 3 input component. Below is my current code: TextInput <template> <input v-model="input" /> </template> <script> import { watch } from '@vue/composition-api&ap ...