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 22, 2019 in Selenium by Dhanush
259 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
• 27,930 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,110 points
320 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,110 points
3,286 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,510 points
3,555 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

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

answered Aug 31 in Selenium by Sri
• 2,970 points
4,564 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,890 points
2,611 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 2 in Selenium by Sri
• 2,970 points
2,898 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
• 27,930 points
1,100 views
0 votes
1 answer