Ms. Livni made her first foreign trip to Cairo , to underline Egypt 's importance as an Arab leader and a country also made anxious by the huge victory of Hamas in the Palestinian legislative elections .