Increasing empirical evidence shows the existence of pleiotropy, where genetic variants influence multiple phenotypes related to complex diseases such as glaucoma, hypertension, autism spectrum disorder, major depressive disorder, and schizophrenia. There are two different types of pleiotropy: causal pleiotropy, where genetic variants directly affect multiple phenotypes simultaneously; and mediated pleiotropy, where genetic variants affect certain phenotypes through the mediation of other phenotypes and demographic covariates. Although there are a number of existing multiple traits association tests, few tests can deal with both causal and mediated pleiotropy. We propose a novel multiple-traits genetic association test framework which is flexible for various pleiotropy structures by selecting mediators adaptively. This approach will not only increase the statistical power by aggregating multiple weak effects, but also improve our understanding of the disease etiology.