Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

3 Neutral

About newcoder1010

  • Rank

Recent Profile Visitors

23,990 profile views
  1. Thank you so much! It has worked now. I am still not sure why it does not work with == operator. -)
  2. System.out.println("*" + shouldLoginNo + + shouldLoginNo.length() + "*"); I get this *Yes3*
  3. I am doing selenium web driver testing and to read data from excel, I am using apache POI. Again reading data from excel, I have no problem. When it compares in the IF statement, I have problem. import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.concurrent.TimeUnit; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Cell; File file = new File("C://Tek_AllSites.xls"); // Open the Excel file FileInputStream fis = new FileInputStream(file); // Access the required test data sheet HSSFWorkbook wb = new HSSFWorkbook(fis); HSSFSheet sheet = wb.getSheet("AllSites"); int TotalRow; int TotalCol; String pageTitle = ""; TotalRow = sheet.getLastRowNum(); System.out.println("Total row " + TotalRow); TotalCol = sheet.getRow(0).getLastCellNum(); HSSFRow headerRow = sheet.getRow(0); String result = ""; for(int count = 1;count<=TotalRow;count++){ HSSFRow row = sheet.getRow(count); String shouldLoginNo =row.getCell(5).toString(); System.out.println("pageTitle " + pageTitle); System.out.println("*" + shouldLoginNo + "*"); // Printig Yes just fine if (shouldLoginNo.trim() == "Yes"){ System.out.println("*" + shouldLoginNo + "*"); // Not printing here } }
  4. String is the data type. It reads data from excel cell.
  5. shouldLoginNo here is a varriable. Not sure how to return value? I also updated my original post. It works when i have hard coded value to the variable.
  6. Hello, String msg =row.getCell(5).toString(); System.out.println("msg " + msg); if (shouldLoginNo.trim() == "Yes"){ System.out.println("msg " + msg); } Its not printing the IF message. msg is coming from excel spreadsheet. It is getting the value "Yes" just fine. I added trim method but it is still not printing IF message. If I hard code value like this and it works. It tells me something is wrong when it reads value from excel. shouldLoginNo = "Yes"; How can I print the msg inside the IF block? Thanks!
  7. Hello, <div data-mediasize="992" class="responsive-menus responsive-menus-0-0 absolute responsified"><span class="toggler">☰ </span><ul class="responsive-menus-simple" id="rm-removed"> <li class="first"> <a href="/" data-drupal-link-system-path="<front>" class="is-active">Home</a> </li> <li> <a href="/how_it_works" data-drupal-link-system-path="node/4">How it works</a> </li> </ul></div> @media only screen and (max-width: 768px) .responsive-menus.responsified span.toggler { color: white; } When I visit the mobile version in chrome toggle device tool, I see the menu is in white. But mobile device shows it in black. How can I display the menu in white? Thanks!
  8. Hello, <figure class="figure-about"><img src="../sites/default/files/imgs/Sky-Blue-House.jpg" alt="houses image"><figcaption class="figure-caption">For Sale. <a href="../contact_us" title="Contact us">Contact us</a> today!<br></figcaption></figure> How can I put a specific color on top of the image? Thanks!
  9. I meant to say how to hide this? <option value="All" selected="selected">- Any -</option>
  10. Hello, <select data-drupal-selector="edit-field-house-selling-price-value" class="form-select form-control" id="edit-field-house-selling-price-value" name="field_house_selling_price_value"><option value="All" selected="selected">- Any -</option><option value="1">Under $100,000</option> <option value="2">$100,000 - $200,000</option><option value="3">$200,000 - $300,000</option></select> Above html has a value "any". How can I rename it to "Price Range" using CSS? Thank you!
  11. I got the second part working. Please advise on the status element how to float to right. Thanks! .views-field.views-field-title { top: 0; left: 16px; font-size: 18px;position:absolute; }
  12. One more question. Right now, image is sitting below the title. How can I place the title above the image? Please see the second image in the link.
  • Create New...