How to resolve Test on method Verifypagetitle but has not been marked @Optional or defined

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

How to resolve Test on method Verifypagetitle but has not been marked @Optional or defined

jenajyo93
Parameter 'Browser' is required by @Test on method Verifypagetitle but has not been marked @Optional or defined
in C:\Users\Jyoti\AppData\Local\Temp\testng-eclipse--360738419\testng-customsuite.xml

--
You received this message because you are subscribed to the Google Groups "testng-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].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to resolve Test on method Verifypagetitle but has not been marked @Optional or defined

Krishnan Mahadevan
Looks like you have a method defined as below

@Parameters("Browser")
@Test
public void Verifypagetitle(String browser) 

And you seem to have been right clicking on your method via eclipse and choosing Run As > TestNG test.

You need to create a testng suite xml file, wherein you have created a <parameter name"Browser" value="<someValue>"/> (or) pass a value via -DBrowser=<someValue>


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Sun, Feb 4, 2018 at 8:05 PM, <[hidden email]> wrote:
Parameter &apos;Browser&apos; is required by @Test on method Verifypagetitle but has not been marked @Optional or defined
in C:\Users\Jyoti\AppData\Local\Temp\testng-eclipse--360738419\testng-customsuite.xml

--
You received this message because you are subscribed to the Google Groups "testng-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].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-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].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.