Question: I have a field currently casted to object. I need to check if this field is a type of enum, and if so i would like to get the name of the currently set value. 
Any ideas would be appreciated.

```
If(field is an enum){
      get the value of the field
}

```

Where i am currently at 

```
if (field.getClass().isEnum()){
    String enumValue =  //here i need to cast the field to enum and do something like field.name()
}

```

Answer: 
Try replacing this line at the end `await driver.findElement(By.xpath("//button[text()='Transfers']")).click();` with this one:

```
await driver.executeScript("arguments[0].click();", btn);

```
Use below line code/element which is throwing error

```
var element = driver.findElement(By.xpath("//button[text()='Transfers']"));
browser.executeScript("arguments[0].click();", element );

```

javascriptexecutor of selenium will use javascript to click on element

protractor internally using selenium