Title: Parameter 'browser' is required by @Configuration on method setUp but has not been marked @Optional or defined · Issue #10 · browserstack/testng-browserstack · GitHub
Open Graph Title: Parameter 'browser' is required by @Configuration on method setUp but has not been marked @Optional or defined · Issue #10 · browserstack/testng-browserstack
X Title: Parameter 'browser' is required by @Configuration on method setUp but has not been marked @Optional or defined · Issue #10 · browserstack/testng-browserstack
Description: Hello, I am getting "Parameter 'browser' is required by @configuration on method setUp but has not been marked @optional or defined" message while running my test class I have extended my base class to test class as well as I have added ...
Open Graph Description: Hello, I am getting "Parameter 'browser' is required by @configuration on method setUp but has not been marked @optional or defined" message while running my test class I have extended my base clas...
X Description: Hello, I am getting "Parameter 'browser' is required by @configuration on method setUp but has not been marked @optional or defined" message while running my test class I have ext...
Opengraph URL: https://github.com/browserstack/testng-browserstack/issues/10
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Parameter 'browser' is required by @Configuration on method setUp but has not been marked @Optional or defined","articleBody":"Hello,\r\nI am getting \"Parameter 'browser' is required by @Configuration on method setUp but has not been marked @Optional or defined\" message while running my test class\r\nI have extended my base class to test class as well as I have added browser and url values in testng xml\r\nPlease refer code below\r\n==================================================================\r\nBase class\r\npublic class Baseclass_1 \r\n{\r\npublic static WebDriver driver;\r\n\t\r\n\t\r\n\t@Parameters({\"browser\",\"url\"})\r\n\t@BeforeClass\r\n\tpublic void setUp(String browser,String url)\r\n\t{\r\n\t\tif(browser.equalsIgnoreCase(\"firefox\"))\r\n\t\t{\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\",\"G:\\\\Javaprogramming\\\\Selenium\\\\Selenium Setup\\\\geckodriver.exe\");\r\n\t\t\tdriver=new ChromeDriver();\r\n\t\t\t\r\n\t\t}\r\n\t\telse if(browser.equalsIgnoreCase(\"chrome\"))\r\n\t\t{\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\tdriver.get(url);\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\r\n\t@AfterClass\r\n\tpublic void tearDown()\r\n\t{\r\n\t\tdriver.quit();\r\n\t\t\t\r\n\t}\r\n===================================================================\r\nTest class\r\npublic class FBTestnew extends Baseclass_1\r\n{\r\n\tWebDriver driver;\r\n\t\r\n\t@Test\t\r\n\tpublic void LogintoFB()\r\n\t{\r\n\t\t\r\n\t\t// Baseclass_1.setUp(\"firefox\",\"https://www.facebook.com/\");\r\n\t\tFBHome FB_Hpme =PageFactory.initElements(driver, FBHome.class);\r\n\t\tFB_Hpme.LogintoFB(\"username\", \"password\");\r\n\t\t\r\n\t}\r\n\r\n}\r\n===================================================================\r\nTestng xml\r\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\r\n\u003c!DOCTYPE suite SYSTEM \"http://testng.org/testng-1.0.dtd\"\u003e\r\n\u003csuite name=\"Parameterization Test Suite\"\u003e\r\n\u003cparameter name=\"browser\" value=\"Firefox\"/\u003e\r\n\t\u003cparameter name=\"url\" value=\"https://www.facebook.com\"/\u003e\r\n\t\u003ctest name=\"Testing Parameterization\"\u003e\r\n\t\r\n\t\r\n\t\t\u003cclasses\u003e\r\n\t\t\t\u003cclass name=\"Com.Browser.Baseclass_1\" /\u003e\r\n\t\t\u003c/classes\u003e\r\n\t\u003c/test\u003e\r\n\u003c/suite\u003e\r\nBut running a test class or testng xml The browser is not launched.\r\nExecuring RunAs TestNG class from test class following error seen\r\n\r\nFAILED CONFIGURATION: @BeforeClass setUp\r\norg.testng.TestNGException: \r\nParameter 'browser' is required by @Configuration on method setUp but has not been marked @Optional or defined\r\n===============================================================\r\nWhere as on running testng by executing Run As TestNG Suite, following error seen.\r\n[RemoteTestNG] detected TestNG version 6.8.0\r\n[TestNG] Running:\r\n G:\\Javaprogramming\\Maven2\\testng.xml\r\n===============================================\r\nParameterization Test Suite\r\nTotal tests run: 0, Failures: 0, Skips: 0\r\n===============================================\r\nCan Anyone help me?","author":{"url":"https://github.com/meetparag81","@type":"Person","name":"meetparag81"},"datePublished":"2018-02-28T04:22:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":34},"url":"https://github.com/10/testng-browserstack/issues/10"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a0c57a89-07b4-7c5b-04f3-8b3f02753016 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B046:2946F1:49B94E3:6279F41:696DFC1D |
| html-safe-nonce | 77819f46b62b0fec44d6b49583799df15ce68f99ce4daae0f17f5f4cfa374cf2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDQ2OjI5NDZGMTo0OUI5NEUzOjYyNzlGNDE6Njk2REZDMUQiLCJ2aXNpdG9yX2lkIjoiMzA5MjE1NzQ3MTY4NjI2MTc4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7268b3afa7816262306f442508aa0bcc75a08799a4ed25c5d50c8fdf0f9798ae |
| hovercard-subject-tag | issue:300886785 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/browserstack/testng-browserstack/10/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ced5fbcd9a57dae549aa9a924d78e285bad770751b3d75dba3f0582e31c37f38/browserstack/testng-browserstack/issues/10 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ced5fbcd9a57dae549aa9a924d78e285bad770751b3d75dba3f0582e31c37f38/browserstack/testng-browserstack/issues/10 |
| og:image:alt | Hello, I am getting "Parameter 'browser' is required by @configuration on method setUp but has not been marked @optional or defined" message while running my test class I have extended my base clas... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | meetparag81 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4922b452d03cd8dbce479d866a11bc25b59ef6ee2da23aa9b0ddefa6bd4d0064 |
| turbo-cache-control | no-preview |
| go-import | github.com/browserstack/testng-browserstack git https://github.com/browserstack/testng-browserstack.git |
| octolytics-dimension-user_id | 1119453 |
| octolytics-dimension-user_login | browserstack |
| octolytics-dimension-repository_id | 52861075 |
| octolytics-dimension-repository_nwo | browserstack/testng-browserstack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 52861075 |
| octolytics-dimension-repository_network_root_nwo | browserstack/testng-browserstack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7e5ae23c70136152637ceee8d6faceb35596ec46 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width