The secretary of state’s visit comes as Democrats and Republicans are vying to appear tougher on China.