Skip to Content
Java를 사용한 Selenium WebDriver 실습
book

Java를 사용한 Selenium WebDriver 실습

by Boni Garcia
May 2025
Beginner to intermediate
422 pages
6h 58m
Korean
O'Reilly Media, Inc.
Content preview from Java를 사용한 Selenium WebDriver 실습

6장. 원격 웹 드라이버

이 작품은 AI를 사용하여 번역되었습니다. 여러분의 피드백과 의견을 환영합니다: translation-feedback@oreilly.com

지금까지 이 책에서 설명한 예제에서는 테스트를 실행하는 머신에 로컬로 설치된 웹 브라우저를 사용했습니다. 이 장에서는 Selenium WebDriver API의 또 다른 관련 기능인 원격 브라우저(즉, 다른 호스트에 설치된) 사용 기능에 대해 다룹니다. 먼저, 셀레늄 웹드라이버에서 원격 브라우저를 사용할 수 있는 아키텍처를 살펴봅니다. 둘째, 셀레늄 웹 드라이버 테스트를 위한 원격 브라우저를 제공하는 네트워크 인프라인 셀레늄 그리드에 대해 알아본다. 셋째, 자동화된 테스트를 위한 관리형 서비스를 제공하는 회사, 즉 가장 관련성이 높은 Cloud 제공업체를 분석합니다. 마지막으로, Docker를 사용하여 Selenium용 브라우저 인프라를 지원하는 방법을 살펴봅니다.

셀레늄 웹 드라이버 아키텍처

1장에서 소개한 것처럼 Selenium WebDriver는 웹 브라우저를 프로그래밍 방식으로 제어할 수 있는 라이브러리입니다. 자동화는 각 브라우저의 기본 기능을 기반으로 합니다. 따라서 셀레늄 웹드라이버 API를 사용하는 스크립트(일반적으로 테스트)와 브라우저 사이에 드라이버라는 바이너리 파일을 배치해야 합니다. 이 책에서 지금까지 살펴본 예제에서는 로컬 브라우저, 즉 셀레늄 웹드라이버 API를 사용하는 테스트를 실행하는 동일한 시스템에 설치된 브라우저를 사용했습니다. 그림 6-1은 이 접근 방식을 보여줍니다. 이 경우, 그리고 Selenium WebDriver API의 Java 언어 바인딩을 사용하는 경우, ChromeDriver 의 인스턴스를 생성하여 Chrome을 제어하고, FirefoxDriver Firefox 등을 제어해야 합니다.

hosw 0601
그림 6-1. 로컬 브라우저를 사용하는 셀레늄 웹 드라이버 아키텍처

이 프로세스를 지원하는 통신 프로토콜을 W3C 웹드라이버라고 합니다. 이 표준 프로토콜은 HTTP를 통한 JSON 메시지를 기반으로 합니다. 덕분에 셀레늄 웹드라이버 아키텍처는 상호 연결된 여러 컴퓨터(호스트)에 배포할 수 있습니다. 그림 6-2는 원격 아키텍처의 개략도를 보여줍니다.

hosw 0602
그림 6-2. 원격 브라우저를 사용하는 셀레늄 웹 드라이버 아키텍처

이 경우 셀레늄 웹드라이버 API는 일반적으로 셀레늄 서버라고 하는 서버 측 컴포넌트로 W3C 웹드라이버 메시지를 보냅니다. 이 서버는 자동화가 이루어지는 웹 브라우저를 제공하는 다른 호스트에 대한 클라이언트 요청의 프록시 역할을 합니다. 이 원격 아키텍처는 크로스 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

몽고DB 완벽 가이드(3판): 실전 예제로 배우는 NoSQL 데이터베이스 기초부터 활용까지

몽고DB 완벽 가이드(3판): 실전 예제로 배우는 NoSQL 데이터베이스 기초부터 활용까지

김인범, 크리스티나 초도로우, 섀넌 브래드쇼, 오언 브라질
Apache Flink를 사용한 스트림 처리

Apache Flink를 사용한 스트림 처리

Fabian Hueske, Vasiliki Kalavri
생성형 AI를 위한 프롬프트 엔지니어링

생성형 AI를 위한 프롬프트 엔지니어링

제임스 피닉스, 마이크 테일러

Publisher Resources

ISBN: 9798341654754