Question: I am a bit new to automation and i am trying to write a script to fill few data in a particular screen and submit them. Navigation to the screen and adding data to few fields are done properly. 

The screen has two datepickers. The **"From date"** one gets picked and date is been posted but not the **"To date"** picker.

[![Screen view](https://i.stack.imgur.com/4Cw06.png)](https://i.stack.imgur.com/4Cw06.png)

Can someone please help me.

This is the code I have developed.

```
public class BusinessCalendar extends Login{

static String Nav = "xxxx";

    @BeforeTest
    public void Navigation(){
        driver.navigate().to(Nav);
    }

    @Test
    public void CreateBusinessCalendar(){
        driver.findElement(By.id("txtBusinessYear")).click();
        driver.findElement(By.id("txtBusinessYear")).clear();
        driver.findElement(By.id("txtBusinessYear")).sendKeys("test year");
        driver.findElement(By.id("dtpFromDates")).clear();   
        driver.findElement(By.xpath("/html/body/div[10]/div[1]/table/tbody/tr[2]/td[5]")).click();
        driver.findElement(By.id("dtpToDates")).clear();
        driver.findElement(By.xpath("/html/body/div[10]/div[1]/table/tbody/tr[3]/td[4]")).click();
    }

    @AfterTest
    public void CloseBrowser(){
        driver.close();
        driver.quit();
    }
}

```

Answer: 
Hi there I am an engineer at Optimizely,

You could alternatively try the Fullstack product, which is more developer-oriented. With this you get an SDK that you install with your bundle and you implement your testing logic using code.

Example:

`npm install optimizely-client-sdk`

```
const optimizely = require('optimizely-client-sdk');
const optimizelyClient = optimizely.createInstance({
  datafile: {} // this is your experiment config which you get from the Optimizely UI
});

const variation = optimizelyClient.activate('color_experiment', 'user_1');
if (variation === 'blue') {
  // do something for blue
} else if (variation === 'red') {
  // do something for red
} else {
  // default case
}

```

And as long as you pass in the exact same `user_id` as the second argument to `activate`, you are guaranteed to always get the same variation for that user.

For more information or details on getting started please take a look at: <https://developers.optimizely.com/x/solutions/sdks/getting-started/index.html?language=javascript>
Also keep in mind that Optimizely gets blocked by adblockers, it can happen if a user turns their adblocker on after they've been on the page and served up an experiment to see - they would get the original version.