Download and install Ruby using https://www.ruby-lang.org/en/documentation/installation/#rubyinstaller or use Chocolatey package Download Selenium gem - selenium-webdriver (2.53.4) run command "gem install selenium-webdriver" Download Gecko driver (geckodriver-v0.13.0) https://github.com/mozilla/geckodriver/releases put it in a folder and path to SYS ENV variable Downgrade Firefox - 45.0 v Simple test rb script for google require 'rubygems' require 'selenium-webdriver' begin driver=Selenium::WebDriver.for :firefox puts "Init success" driver.manage.window.maximize puts "Navigating to site" driver.navigate.to("http://google.com") driver.find_element(:name,'q').send_keys("Selenium Tutorials\n\r") puts "Hit enter to quit" gets #waits until user hits enter key puts "Closing browser..." ...
Some times we can't just bind data source to a datagridview as we need much deeper data to be presented in our grid. In such a situation we can use the following method to get it done. 1) Prepare your Grid with columns as usual 2) Let say our datasource consists this structure Classes are like this 1: public class Player 2: { 3: public int ID{get;set;} 4: public string FirstName{get;set;} 5: public string LastName{get;set;} 6: public string FullName 7: { 8: get { return FirstName + " " + LastName; } 9: } 10: public int Age{get;set;} 11: public string NIC{get;set;} 12: public Style PStyle{get;set;} // associated Style property 13: } 14: public class Style 15: { 16: public int StyleID{get;set;} 17: public string Name{get;set;} 18: } Using Player class I need to get a list of Players to the grid 1: List bowlers = DataAccess.GetBowlers(); I need to show the bowler's first name...
Comments
Keep it up
I expect more in the future