Problem in reading Numeric value as String from Excel file using Selenium Web-Driver Using Java
1. First Get value from excel.
sheet1.getRow(12).getCell(1).getNumericCellValue();
2. Type Cast with int type
int SrNumber = (int)sheet1.getRow(12).getCell(1).getNumericCellValue();
3. Concatenate SrNumber with the null value and store value into a String variable.
String SrNum ="" + SrNumber;
4. Print the String Value
System.out.println(SrNum);
How to get Current LOV value in Selenium Web-Driver Using Java
Problem: In this Example, I want to get the current Status value as output i.e Open.
Code: WebElement element1=Driver.findElement(By.id("HIssueStatus"));
Select se=new Select(element1);
WebElement firstOption = se.getFirstSelectedOption();
System.out.println("The First selected option is::" +firstOption.getText());
No comments:
Post a Comment