How to run a test case on remote webdriver using ruby selenium

0 votes
How to run a test case on remote webdriver using ruby selenium?
Aug 23, 2019 in Selenium by Dhanush
1,552 views

1 answer to this question.

0 votes

Hey Dhanush, you can follow the below shown code snippet to run a test on Remote Webdriver using Ruby Selenium:

require "selenium-webdriver"

username = 'abc%40domain.com'
authkey = 'yourauthkey' 

# Defining capabilities of the test session, like browser, OS etc
capability = Selenium::WebDriver::Remote::Capabilities.new
capability["name"] = "Dummy Example"
capability["build"] = "1.0"
capability["browser_api_name"] = "Chrome"
capability["os_api_name"] = "Windows10"
driver = Selenium::WebDriver.for(:remote, :url =>; "http://#{username}:#{authkey}@hub.edureka.co:80/wd/hub", :desired_capabilities =>; capability)

puts "Loading URL"
driver.navigate.to("https://www.edureka.co")

puts "Clicking Login"
element = driver.find_element(class: 'login')
element.click

driver.quit
answered Aug 23, 2019 by Abha
• 28,140 points

Related Questions In Selenium

0 votes
1 answer

How to handle checkboxes on a webpage using Ruby Selenium Webdriver?

Hi Sandeep, you can use following code ...READ MORE

answered Aug 26, 2019 in Selenium by Anvi
• 14,150 points
2,142 views
0 votes
1 answer

How to mouse hover on a web element using Selenium WebDriver?

Hello Nitin, to automate mouse hovering over ...READ MORE

answered May 7, 2019 in Selenium by Anvi
• 14,150 points
6,518 views
0 votes
1 answer
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,673 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,142 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,221 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,874 views
0 votes
1 answer

How to run a group of test cases using TestNG in Selenium Webdriver?

Hey Kajal, TestNG allows you to perform ordered ...READ MORE

answered Jun 12, 2019 in Selenium by Abha
• 28,140 points
2,927 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP