-1

Below is the code: String ewmailXpath = AppXPathsConstants.MailXpath_replace.replace("XXXXX",formEntryMap.get("Mail"));

            WebElement MailEl = driver.findElement(By.xpath(ewmailXpath ));
            String email = MailEl .getText();
            System.out.println("Get the email:"+email);
            String Art = AppXPathsConstants.ArtValXpath_replace.replace("XXXXX",formEntryMap.get("Arts"));
            WebElement ArtXpath = driver.findElement(By.xpath(Art));
            String ArtElm = ArtXpath .getText();
            System.out.println("Get ArtText :"+ArtElm  );
            
            DriverUtil.waitTime(3000);
            if(email.contains(ArtElm )) =>It fails at this point basically trying to compare the values which are there in the grid which is in non editable mode and if the value is there then i need to click on the Edit button which will be performed after entering the Loop .


            {
                System.out.println("Enter the Loop");

}

3
  • Obviously the email addresses are not equal. You print both to system out, so check that and see for yourself. White characters might make the difference. – pavelsaman Jun 4 at 8:09
  • yes i did that and you are right – user49677 Jun 4 at 8:16
  • but my question over here is in the grid i need to check if the row ees are there in the gird then i need to click on the edit button of the row which contains this email and this article so any leads will he helpful – user49677 Jun 4 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.