Britsimon
Super Moderator
Trying to figure out some VERY basic java code for the CEAC data
There are some new possible status codes (there were ISSUED, REFUSED and so on) there are now "at NVC" and "in Transit". When I see either of those I want to not do some extra logic.
I am getting myself confused with the OR logic.
So - this works (If "at NVC" was the only extra status):
if (
!status.ownText().toString().toUpperCase().contains("NVC")
)
{
But this does not work:
if (
!status.ownText().toString().toUpperCase().contains("NVC")
||
!status.ownText().toString().toUpperCase().contains("TRANSIT")
)
{
When I run that I get a NullPointerException.
Anyone able to correct my OR logic. The test should look for either value, not both.
There are some new possible status codes (there were ISSUED, REFUSED and so on) there are now "at NVC" and "in Transit". When I see either of those I want to not do some extra logic.
I am getting myself confused with the OR logic.
So - this works (If "at NVC" was the only extra status):
if (
!status.ownText().toString().toUpperCase().contains("NVC")
)
{
But this does not work:
if (
!status.ownText().toString().toUpperCase().contains("NVC")
||
!status.ownText().toString().toUpperCase().contains("TRANSIT")
)
{
When I run that I get a NullPointerException.
Anyone able to correct my OR logic. The test should look for either value, not both.