requires 'capibara' Rob_Server = false cipaabada.Cent_driver =: selenium capibara.ap_host = 'http://www.domain.com' module test includes cipaBada :: DSL class bot includes capebara :: DSL DRF login (username, password) #STEP 1 Yuri Go to "https: // www. Domain.com" (Yuri) # Login form ('# Username'). Find the Set (Username) ('#password'). Find Set (Password) ('# submitButton'). Click on end def goo_page2 #STEP 2 uri_cert = 'https://www.domain.com/page1' ('# submitButton') ('# submitButton'). Click on End F. Form (Answer) # Step 3: Formad. Q1 (Answer ['q1']) End ##################################### CAPABADA: In the edit form edit for: DSL # Step 3 # Yes # No for defy self.q1 (yesno) #Yaho ID = (HINO) for the truth? '#radioyes': '#radio no' search (id) .set (right) end end end run script
t = test: : Bot.new username = 'myusername' password = 'mypassword' t.login (user name, password) Answer = {q1: true} t.form (answer)
error when running Yes:
FormEdit.q1 (Answer ['q1']) NoMethodError: Undefined Method "Test :: BOT :: For Form Edit: Class from Test_script.rb: 56: In 'q1 '
Any suggestions?
solution
< Previous>
Class form Admit Captain: :: DSL to
Expand modules formEdit cAPEBARA :: DSL
No comments:
Post a Comment