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 in Selenium by Dhanush
13 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 by Abha
• 23,030 points

Related Questions In Selenium

0 votes
1 answer
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 in Selenium by Anvi
• 12,860 points
144 views
0 votes
1 answer
0 votes
1 answer

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,090 points
593 views
0 votes
1 answer
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,130 points
901 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
581 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 in Selenium by Abha
• 23,030 points
79 views
0 votes
1 answer