Title: I am not able to get data from Excel to testng class · Issue #24 · browserstack/testng-browserstack · GitHub
Open Graph Title: I am not able to get data from Excel to testng class · Issue #24 · browserstack/testng-browserstack
X Title: I am not able to get data from Excel to testng class · Issue #24 · browserstack/testng-browserstack
Description: public class Readandwrite { public static void main(String[] args) throws IOException { Workbook wb = new XSSFWorkbook(); FileOutputStream f = new FileOutputStream("C:\\Users\\Desktop\\Selenium\\FileHandling\\MyExcelSheet.xlsx"); Sheet s...
Open Graph Description: public class Readandwrite { public static void main(String[] args) throws IOException { Workbook wb = new XSSFWorkbook(); FileOutputStream f = new FileOutputStream("C:\\Users\\Desktop\\Selenium\\Fi...
X Description: public class Readandwrite { public static void main(String[] args) throws IOException { Workbook wb = new XSSFWorkbook(); FileOutputStream f = new FileOutputStream("C:\\Users\\Desktop\\Seleniu...
Opengraph URL: https://github.com/browserstack/testng-browserstack/issues/24
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"I am not able to get data from Excel to testng class","articleBody":"public class Readandwrite {\r\n\t\r\n\t\r\n\r\n\tpublic static void main(String[] args) throws IOException {\t\r\n\t\t\r\n\t\t\r\n\t Workbook wb = new XSSFWorkbook();\r\n\t\t FileOutputStream f = new FileOutputStream(\"C:\\\\Users\\\\Desktop\\\\Selenium\\\\FileHandling\\\\MyExcelSheet.xlsx\");\r\n\t\t Sheet s = wb.createSheet(\"MySheet\");\r\n\t\t s.createRow(0).createCell(0).setCellValue(\"abc@facebook.com\");\r\n\t\t s.getRow(0).createCell(1).setCellValue(\"abc123\");\r\n\t\t wb.write(f);\r\n\t\t\r\n\t\t\r\n\t\r\n\t//public static void read() throws IOException {\r\n\t\r\n\t\t File S = new File(\"C:\\\\Users\\\\Desktop\\\\Selenium\\\\FileHandling\\\\MyExcelSheet.xlsx\");\r\n\t\t FileInputStream input = new FileInputStream(S);\r\n\t\t XSSFWorkbook wb1 = new XSSFWorkbook(input);\r\n\t\t XSSFSheet Sh = wb1.getSheet(\"MySheet\");\r\n\t\t\r\n\t\t \r\n\t}}\r\n\r\n\r\n\r\n\r\n\r\npublic class ReadandWrite2 extends Readandwrite {\r\n\tChromeDriver cd;\r\n\t\r\n\r\n//@Parameters ({\"UserName\",\"pass\"})\r\n@BeforeTest\r\npublic void ReadandWriteExcel() {\r\n\r\n\t\r\n\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\Desktop\\\\Selenium\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t cd=new ChromeDriver();\r\n\t cd.get(\"https://www.facebook.com/login.php\");\t\r\n\t\t\t\t\r\n}\r\n\r\n@Test\r\npublic void usernameandpassword() {\r\n\tWebElement UserName=cd.findElement(By.id(\"email\"));\r\n\tWebElement pass= cd.findElement(By.id(\"pass\"));\r\n\tUserName.sendKeys(Sh.getRow(1).getCell(0).getStringCellValue());//Error\r\n\tpass.sendKeys(Sh.getRow(1).getCell(1).getStringCellValue());//Error\r\n\tcd.findElement(By.xpath(\"//*[@id=\\\"loginbutton\\\"]\")).click();\r\n\t\r\n}}\r\n\t","author":{"url":"https://github.com/Ojasadi","@type":"Person","name":"Ojasadi"},"datePublished":"2021-01-25T04:12:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/24/testng-browserstack/issues/24"}
| 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:c33b0abe-33ef-fed9-d93f-15c6a164e0be |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 94AC:2A7CEE:90700A7:BEDC2B9:696DFC12 |
| html-safe-nonce | 13aa8006a7e2f584b1da9e211d7cf94b2c371e83ba44615feac953052bf152ca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NEFDOjJBN0NFRTo5MDcwMEE3OkJFREMyQjk6Njk2REZDMTIiLCJ2aXNpdG9yX2lkIjoiMzI0Mzg3Mzc2ODMyODUyNjg2NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7079a0c3b69bef78023c51f9de3c3cf45f4891927fa01303c8b7f399548f76a2 |
| hovercard-subject-tag | issue:793007436 |
| 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/24/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b00073191a03bf86ea88eb1928ed8b7ec80bb1bb9110e598a362afc72ba3fd4d/browserstack/testng-browserstack/issues/24 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b00073191a03bf86ea88eb1928ed8b7ec80bb1bb9110e598a362afc72ba3fd4d/browserstack/testng-browserstack/issues/24 |
| og:image:alt | public class Readandwrite { public static void main(String[] args) throws IOException { Workbook wb = new XSSFWorkbook(); FileOutputStream f = new FileOutputStream("C:\\Users\\Desktop\\Selenium\\Fi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Ojasadi |
| 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