On a social network consisting of m users and some friendships between users, two users can communicate with each other if they know a common language. You are given an integer n, an array languages, and an array friendships where: You can choose one language and teach it to some users so that all friends…
Category: Selenium Interview Questions and Answers
Leet code problem 1641: – Count Sorted Vowel Strings
Given an integer n, return the number of strings of length n that consist only of vowels (a, e, i, o, u) and are lexicographically sorted. A string s is lexicographically sorted if for all valid i, s[i] is the same as or comes before s[i+1] in the alphabet. Example 1: Input: n = 1Output:…
How to compare “Strings” in Jenkins pipeline scripts?
To compare the “String” we can follow the below approach.
How to display HTML page inside mail body with email-ext plugin in Jenkins?
For this we need to install the Junit plugin for Jenkins. As if we check the source template of the email-ext plugin as mentioned here, then we can find that for Junit report part, it’s fetching the values from Junit result. Then we need to call this in the pipeline as mentioned below, assuming we…
How to handle SSL certificate in Edge browser for Selenium Web-Driver?
In many cases we can face the error related to SSL certificate as mentioned below :- So, this error in Edge browser can be handled using EdgeOptions class provided by Selenium Web driver. The sample code block is mentioned below:- In the above code block we are accepting the Insecure certificate by passing Boolean value…
Demo Web Tables for Selenium Automation Practice
Demo Table 1 This table has 7 rows and 3 columns. So, the distribution of rows and columns even. We can assume this table as static table. Company Name Contact Country Google Maria Andreas France Microsoft Roland Mendel UK Island Trading Yoshi Tannamuri Canada Amazon Giovanni Rovelli Italy Meta Giovanni Rovelli Italy Google Francisco Chang…
How to copy or mirror code from one git repository to a new Git repository for Windows Machine
The steps are mentioned Below: Copy or clone the code to local folder from the Git repository: – For that first open the bash shell and move to the desires folder by using ‘cd’ command. And then type the below command and press enter. Here it is assumed that ‘ssh’ keygen is already generated and…
Any other way we can enter the input data in a text Box other than using sendKeys() methods in Selenium WebDriver?
Ans:- This is very frequently asked by the interviewer to check whether you are aware about the JavaScriptExecutor interface or not. Using javaScriptExecutor we can enter the input data in a text box. The code is mentioned below:- Code:- Explanation of the source code (Here source code snip added for better understanding):- JavaScriptExecutor is an…
How to access the collection elements using the streams?
Streams is introduced in java8 version. It basically helps to write a concise piece of code and it’s functional style of code writing. For the complete piece of code please visit the below mentioned link. The piece of code for stream iteration is mentioned below :- In the above case the “forEach” is a terminal…
How to modify the collection while iterating using java?
As in the previous post we have explained how to iterate over the collection. the same code can be found by clicking on the below mentioned link. Now here the same piece of code will be used to explain the modification of collection at the time of iteration. Now new hotel is declared and when…