Having an error while picking the WebElement in Collect 'List' class!

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Having an error while picking the WebElement in Collect 'List' class!

javelearner
Dear Selenium user, 

I am having the following error while saving the WebElements in List class any suggestions what should I do?? 


""" The type List is not generic; it cannot be parameterized with arguments <WebElement> """"""" 

Please find the attached screenshot.. 

I will greatly appreciate any help!! 

Java lover and selenium learner ... 



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/03bc4279-12e6-476b-94e3-7a887e50bc4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

error in selenium.JPG (30K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Having an error while picking the WebElement in Collect 'List' class!

Santhu
Use findelements instead of findelement.

On Sat, Apr 21, 2018, 4:57 AM <[hidden email]> wrote:
Dear Selenium user, 

I am having the following error while saving the WebElements in List class any suggestions what should I do?? 


""" The type List is not generic; it cannot be parameterized with arguments <WebElement> """"""" 

Please find the attached screenshot.. 

I will greatly appreciate any help!! 

Java lover and selenium learner ... 



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/03bc4279-12e6-476b-94e3-7a887e50bc4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAGPWr3gXU6Rn%3DSUOQXQPtXKPFqc-qXKjOH2jeoEtRc5s4NPYng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Having an error while picking the WebElement in Collect 'List' class!

javelearner
Thanks for your help and also ... It is working now by writing in this way.. 

java.util.List<WebElement> allRows = Class_03_27_2018.driver
.findElements(By.xpath("//div[@id='ui-datepicker-div']//table//tbody//tr"));

I am interested to write the code like this... 
List<WebElement> allRows = Class.driver
.findElements(By.xpath("//div[@id='ui-datepicker-div']//table//tbody//tr"));

and import the java.util.. under the class.. How I can do that?? 

Thanks! 
Java leaner

On Sat, Apr 21, 2018 at 2:42 AM, Santhu <[hidden email]> wrote:
Use findelements instead of findelement.

On Sat, Apr 21, 2018, 4:57 AM <[hidden email]> wrote:
Dear Selenium user, 

I am having the following error while saving the WebElements in List class any suggestions what should I do?? 


""" The type List is not generic; it cannot be parameterized with arguments <WebElement> """"""" 

Please find the attached screenshot.. 

I will greatly appreciate any help!! 

Java lover and selenium learner ... 



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/03bc4279-12e6-476b-94e3-7a887e50bc4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/HJLNXsXOCOE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAGPWr3gXU6Rn%3DSUOQXQPtXKPFqc-qXKjOH2jeoEtRc5s4NPYng%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAPFr79ZWLOVajxFP3Q9YREfDMhHuoVOzQJEWvBDty1zEEVrD8A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.