Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

Archives: FAQs

How do you upload a file using Selenium WebDriver?

To upload a file we can simply use the command element.send_keys(file path). But there is a prerequisite before we upload the file. We have to use the html tag: ‘input’ and attribute type should be ‘file’.

How to set the size of browser window using Selenium?

To maximize the size of browser window, you can use the following piece of code:driver.manage().window().maximize(); – To maximize the window To resize the current window to a particular dimension, you can use the setSize() method. Check out the below piece of code: To set the window to a particular size, use window.resizeTo() method. Check the below piece of code: ((JavascriptExecutor)driver).executeScript(“window.resizeTo(1024, …

How to set the size of browser window using Selenium? Read More »

What is the use of JavaScriptExecutor?

JavaScriptExecutor is an interface which provides a mechanism to execute Javascript through the Selenium WebDriver. It provides “executescript” and “executeAsyncScript” methods, to run JavaScript in the context of the currently selected frame or window. An example of that is:

What is a Robot Class?

The Robot class helps in providing control over the mouse and keyboard devices. It includes: Invoked when you want to press any key Invoked to release the pressed key on the keyboard Invoked to move the mouse pointer in the X and Y coordinates Invoked to press the left button of the mouse

How to simulate network bandwidth in JMeter?

In Apache JMeter, we can simulate network bandwidth very easily. Following are the steps to simulate network bandwidth: Open ‘jmeter.properties’ file in notepad (location: apache-jmeter/bin) Search ‘cps’ (characters per second) you will findDefine characters per second > 0 to emulate slow connections#httpclient.socket.http.cps=0#httpclient.socket.https.cps=0 Change cps value as per your needcps = rb*128 (rb= Required Bandwidth) cps …

How to simulate network bandwidth in JMeter? Read More »