Two weeks ago, Google had a big day in Washington. President Biden signed an executive order to create artificial intelligence safeguards that could affect Google’s most pressing projects, and Secretary of State Antony J. Blinken gave the company an award for its work in aiding Ukrainian refugees and promoting women’s economic security. Sundar Pichai, Google’s chief executive, had spent much of the day on a at a federal courthouse about two miles from the White House, defending his company from claims that it crushed rivals in the and online advertising markets. On Tuesday, Mr. Pichai testified again, this time in San Francisco, to confront claims brought by the video game company Epic Games that his company broke the law, wielding monopolistic power over app developers on Android’s Google Play Store. Mr. Pichai over the last month has become the face of Google’s antitrust court fights on both sides of the country. And his visits to the witness underscore the growing importance for Big Tech leaders to be sharp witnesses for their companies, whether in an antitrust trial or in hearings on Capitol Hill. Testifying under oath is a task that many tech chief executives might be asked to do in the coming years, with Amazon, Meta and others facing their own antitrust court fights. It is not a task at which many executives have excelled. Though he was never called to the witness stand to testify, Bill Gates, who was chief executive of Microsoft in the last big technology antitrust case brought by the Justice Department more than two decades ago, came across as combative and evasive in depositions. Over the last few years, executives including Mark Zuckerberg and OpenAI’s Sam Altman (and, of course, Mr. Pichai) have been asked to testify before Congress for various reasons, with varying degrees of success. Mr. Zuckerberg has at times exasperated lawmakers with vague responses, while Mr. Altman appeared to charm senators in a this year. The main duty on the witness for Mr. Pichai — a low-key and detail-focused executive — has been to keep the temperature low under questioning and keep to the central point of Google’s antitrust defense: that it is an innovative company that has maintained its leadership through innovation and hard work instead of illegal monopolistic behavior. On Tuesday, Mr. Pichai ran into aggressive questioning by a lawyer for Epic, Lauren Moskowitz, who asked him to provide yes-or-no responses. That led to at least one small revelation: Mr. Pichai confirmed that his company gave Apple 36 percent of the search revenue generated on iPhones, and said the total payment “was well over $10 billion” last year. Ms. Moskowitz asserted that the figure was at least $18 billion. Lawyers for Google and Apple fought on Tuesday morning to keep the figures concealed, emphasizing a need for corporate privacy that has carried through both of Google’s trials. Judge James Donato rejected their requests, saying, “Just coming in and saying we’re kind of sensitive with this isn’t going to fly.” Ms. Moskowitz was trying to counter Google’s claim that it cannot be considered a monopoly because of its rivalry with Apple. If that were the case, she argued, why did it give Apple preferential treatment over other companies like Samsung, which she said received a 16 percent share of the search revenue from its ? “We compete fiercely with Apple, at the operating system, the smartphone and the app store level,” Mr. Pichai said later, when questioned by a Google lawyer. “The competition has been good for consumers and developers.” The Justice Department filed its landmark antitrust suit against Google in October 2020, arguing that the company’s default-search deals with phone makers and browser companies helped it illegally maintain a . Google called Mr. Pichai, 51, to the stand two weeks ago. Rather than sit in the , Mr. Pichai stood at a for almost four hours, wearing a microphone, as though he were delivering a speech at a corporate conference. His handlers said he had to stand because of a sprained lower back. He spoke of his background, getting a telephone as a in Chennai, India, and understanding then the power of technology, before he deftly answered questions about his company’s competitive standing, relationship with Apple and the default-search contracts the government argues were illegal. Mr. Pichai tried to refute the government lawyer’s arguments that Google paid Apple billions of dollars a year to keep it out of the search market. He presented a different story, saying his company wanted to be the iPhone’s default search engine because of the “value” of that spot, and the need to ensure Apple would safeguard the user experience. “I felt the deal had done well since 2016,” Mr. Pichai said. “It was continuing to increase search usage, search revenue.” In cross-examination, Mr. Pichai repeated the rationale for the deal so many times that for a moment, he seemed to lose patience with the line of questioning, saying, “I just gave all the reasons” for the deal. Adam Kovacevich, a tech industry lobbyist at the Chamber of Progress who spent 12 years working at Google, said Mr. Pichai’s testimony gave the court a high-level view of how the company made strategic decisions. “He did fine,” Mr. Kovacevich said of Mr. Pichai’s performance. “The biggest thing to me is when you’re in that position, your first objective is to not be Bill Gates in the Microsoft trial. Your No. 1 objective is to come off as responsive and reasonable.” Excerpts from Mr. Gates’s combative, videotaped testimony were shown in court more than two decades ago. The Microsoft co-founder, lawyers say, undermined his and his company’s credibility with the judge in the case. In San Francisco, Mr. Pichai was questioned on topics ranging from why he erroneously marked emails as subject to attorney-client privilege (to prevent them from being forwarded) to whether Facebook and Amazon could have provided competition to Google’s Play Store when they had smartphone ambitions. “There are nuances in these questions,” he said with a smile when Ms. Moskowitz started to speak over him. “I’m trying to answer your question.” Several times, Judge Donato asked Ms. Moskowitz to “be quiet” to let Mr. Pichai speak. There will be one big difference between the lawsuits: The trial in Washington does not have a jury. The decision will be made by a judge. In San Francisco, Mr. Pichai had to appeal to a nine-person jury that could be open to the idea that a giant tech company is exploiting much smaller outfits. Tim Sweeney, Epic’s chief executive, is also expected to testify in the trial. Google and Epic declined to comment. Epic, the maker of the hit game Fortnite, brought the claim against Google in 2020, in an attempt to sidestep the 15 to 30 percent fees from subscriptions and in-app purchases that it must pay Google. The game developer antagonized Google and Apple by telling users to pay for in-app transactions directly through