Q:

page factory pattern and dropdownlist

I am a novice in selenium.
I need some help trying to do this.
how do I use page factory pattern to select a drop down list 
the code I tried is not working 
I am getting an error saying annotation name expected instead 
@FindBy(how=How.ID,using="ccompound")    
public WebElement Select_Compound;
Select dropDownBox = new Select(Select_Compound);
dropDownBox.selectByVisibleText("monthly")

thanks 

A:

Move the last 2 statements to the test method. That's why you get the syntax error.
Select dropDownBox = new Select(Select_Compound);
dropDownBox.selectByVisibleText("monthly");

The last statement can not exist outside the method.

