Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I am using chrome Version 34.0.1847.116 on Mac OSX 64 bit. When I run the testcase using chrome, testcase fails. Same testcases works in firefox

public class Test {
            private WebDriver driver;
            String url="http://my.setmore.com/bookingpage/642a419721f241beb5";
            static String st="No Slots Available";
            static String xpath_service=".//*[@id='ed5b41b240aa4095a0']/div/b";
            static String css_currentdate="td.datepickerSelected > a > span";
            private static String xpath_slots="//div[@class='time_sheet']/ul[@class='morning' or 'afternoon' or 'evening']/li/a";

public void setUp(){
                    System.setProperty("webdriver.chrome.driver", "/Applications/chromedriver");
                WebDriver driver = new ChromeDriver();              
                driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
public void currentdate()

             driver.findElement(By.xpath(xpath_service)).click();**-i got exception at this place**
             int count=slots;
public void end(){

Getting java.lang.NullPointer.Exception.

share|improve this question

1 Answer 1

Try with CSS and check if it works. You could use cssify to do this.

If using CSS works this might be the chromedriver issue with dealing with xpath. Also, try checking with the latest chromedriver.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.