Context menu / right click with selenium

There are certain scenarios where we want to perform operation on the right click menu options. let’s see the demo site https://swisnl.github.io/jQuery-contextMenu/demo.html If you right click on the “right click me” button, it exposes several options to perform, this is what we will automate using selenium. Selenium provides contextClick() which accepts the button to click…

Manage browser windows [Resize and reposition] with selenium

We can change the browser window position on desktop and resize the windows using selenium commands. These functionalities helps to view the tests running parallely on different browsers, [we can place browsers side by side to see the actions performed on the browsers]. package testPkg; import org.openqa.selenium.Dimension; import org.openqa.selenium.Point; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver;…

Handle textBoxes in selenium

TextBox is an element where we can enter/input alphanumeric text.To identify the textBoxes we need to look for the input tag with type=text, [below screenshot] Let’s see some of the actions we can perform with textboxes in selenium: Enter value to textBox – using sendKeys method After entering text to textBox, we can fetch the…

Handling ListBoxes in selenium

ListBox is an element where user can select/deselect one or more items from it. To identify the ListBox on webpage, look for select tag and attribute should be ‘multiple’ to select multiple items and there will be option tag which contains each item in it.[as shown below] How can we identify a ListBox on webpage:…