【问题标题】:notnull checking in selenium非空检查硒
【发布时间】:2011-04-29 06:41:01
【问题描述】:
String uid = selenium.getTable("bc."+i+"."+0);

System.out.println(uid);

int bcid = Integer.parseInt(uid);

if(uid != "' '"){   

    selenium.type("bcname", s.getCell(0, i).getContents()); 

    }else{

     System.out.println("Not edited");  

   }

我需要检查我的 'uid' 值不是空值。但它不起作用,我不知道是什么问题。我如何检查非空值,请帮助我

【问题讨论】:

  • 要检查uid是否不为NULL还是为空?

标签: java selenium


【解决方案1】:

可以使用下面的代码来检查字符串是否为空

if(!uid.isEmpty())

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-04-29
    • 2021-10-11
    • 1970-01-01
    • 1970-01-01
    • 2018-11-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多