Testing scenario is,
- creating a cell,
- Change the language from the drop down menu(from R to Python),
- Enter the code and execute it. HTML code for drop down menu is
<select class="form-control cell-control-select cell-control">
<option>Markdown</option>
<option>R</option>
<option>Python</option>
<option>RMarkdown</option>
</select>
and below is my casperjs code
casper.then(function(){
this.mouse.click({ type: 'xpath' , path: "/html/body/div[3]/div/div[2]/div/div[3]/div[1]/div/select"});//x path for dropdown menu
this.echo('clicking on dropdown menu');
this.wait(3000);
});
casper.then(function(){
var z = this.evaluate(function() {
document.querySelector('.form-control').selectedIndex = 2;
return true;
});
this.wait(3000);
});
it is selecting the Python language from the drop down menu but when we run the code it is showing Error in prompt cell. The same error we get when we run R code in python language cell.