How to iterate two list of WebElements and print the values one by one to perform some action in selenium(First value from one list and second value from second list)
Use the method findElements and save the list of elements in a variable Then u can use a ForEach loop to loop through each element and click on each one. Let me kn if u need the code .
What u have to do is, keep class for identifying and returning the elements seperate. And then you create a test case which basically imports these classes and will perform actions on these elements to create actions. I will add it to the list of topics we need to cover ... But will it might take a while due to my existence job timings. I hope it helps..if u have anything else do email me
Hi bhagbati, list is a collection and it's a Java concept. Eg :- String fruit = "apple"; This will save one string List fruits Now u can save multiple strings in the list variable fruits.
How we can click on multiple webelements with same xpath in a container using for loop?
How to iterate two list of WebElements and print the values one by one to perform some action in selenium(First value from one list and second value from second list)
can you make this a dynamic method and call it in your testclass?
the demo page of newtour is not available
Hi Bro, I need ur help, I try to iterate the list of webelements, but I didn't not access the elements. Can u please help me to sort out this.
Send me ur code
your video is very helpful and easy to understand
How we can click on multiple elements with same classnane
Use the method findElements and save the list of elements in a variable
Then u can use a ForEach loop to loop through each element and click on each one.
Let me kn if u need the code .
how to return this webelement when using page object model??
What u have to do is,
keep class for identifying and returning the elements seperate.
And then you create a test case which basically imports these classes and will perform actions on these elements to create actions.
I will add it to the list of topics we need to cover ... But will it might take a while due to my existence job timings.
I hope it helps..if u have anything else do email me
What is LIST here ? Is this a Class or just a keyword ? And what is the concept to surround the WebElement class ?
Hi bhagbati, list is a collection and it's a Java concept.
Eg :- String fruit = "apple";
This will save one string
List fruits
Now u can save multiple strings in the list variable fruits.
@@Automationzone - Thank you so much for your response.
Hi , How can u add this list to excel in one column
I will show this in an upcoming video, but basically you need to use a module like xlrd and a few loops to write this data to an excel spreadsheet.
very good explanation bro
Hello