itms_automation 1.3 → 1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 389932c513215d5759f3287e04b0949baef5bf95e59f6781092fb88c67527b02
4
- data.tar.gz: 1b51485f8e19ecbd74e1d95c4be1623cba42ea85a7e1a3abb2ab8a3d8b8c3ee3
3
+ metadata.gz: 05bc918b330ea3205841b377fa90427de896f86ac4d2921665c6742f04a968fa
4
+ data.tar.gz: 9b5af3d5827abca21f3ee2f7d1d692fa116032bd1d0c4cc4480b165e4f8ad150
5
5
  SHA512:
6
- metadata.gz: fd720cbe39326f3ebbc545dedd8ee85a956b6854fbd0a8d7fc8a1403489066557912c61b78116e9cf583b31017225de55b555c3250e6b77bf1bcd7a9504f14d5
7
- data.tar.gz: d409364a58b319109cecb604accc7a37f179c3a87168775d1f7d251636c223b33e3404bcd188c0f9e9a05de85d34e3b3c2a987cc970677d9af243543a24e7c65
6
+ metadata.gz: dc98bf5a616b58f3231cd55c6552ee7be8cbf9c92d8ada8d9fbf129a28b768922d5183a09bebbc9fdfe543d98af881ee921f82ecc0186f403c0e7c2cb184e9f9
7
+ data.tar.gz: 7a866b84f0dc31945b0b28fa41a38d1cb31072f60e58582f5dd44c21226ff8d1ac5f6f302775e9dd9cafaeff9a34f56348ec6dc804ef142d44a8cc5fc77b0ff3
@@ -1,3 +1,3 @@
1
1
  module ItmsAutomation
2
- VERSION = "1.3"
2
+ VERSION = "1.4"
3
3
  end
@@ -242,13 +242,14 @@ def resize_window_screen(x, y)
242
242
  end
243
243
 
244
244
  def switch_to_iframe(element)
245
- foundElement = find_object(element)
246
245
  begin
247
- page.driver.browser.switch_to.frame(foundElement)
246
+ foundElement = find_object(element)
247
+ page.driver.switch_to_frame(foundElement)
248
248
  rescue Exception => e
249
249
  raise "❌ Error: #{e}"
250
250
  end
251
251
  end
252
+
252
253
  def switch_out_frame
253
254
  begin
254
255
  browser = page.driver.browser
@@ -257,6 +258,7 @@ def switch_out_frame
257
258
  raise "❌ Error: #{e}"
258
259
  end
259
260
  end
261
+
260
262
  def get_computed_style(element, style)
261
263
  foundElement = get_object_value(element)
262
264
  computedStyle = ""
@@ -1,4 +1,5 @@
1
+ @test
1
2
  Feature: demo
2
3
 
3
4
  Scenario: new scenario
4
- Given I open the page "http://google.com"
5
+ Given test select execute
@@ -1,3 +1,13 @@
1
1
  And /I open the page "(.*)"/ do |url_site|
2
2
  execute_openbrowser(url_site)
3
3
  end
4
+
5
+ Given /^test select execute$/ do
6
+ execute_openbrowser("http://www.yopmail.com/en/")
7
+ execute_settext("username", "cuong")
8
+ execute_click("okbutton")
9
+ switch_to_iframe("iframe")
10
+
11
+ execute_click("verify")
12
+ sleep(5)
13
+ end
@@ -1,2 +1,16 @@
1
- signupbutton: {xpath_selector: '//li[@class="mm-listitem"]//a[@href="#"][contains(text(),"T")]'}
2
-
1
+ username: { xpath_selector: '//input[@id="login"]' }
2
+ okbutton: { xpath_selector: '//input[@value="Check Inbox"]' }
3
+ iframe: { xpath_selector: '//iframe[@id="ifmail"]' }
4
+ verify: { xpath_selector: '//div[@id="mailmillieu"]/div[2]//tbody/tr[3]/td/p/strong/a[@class="campaign-sale-link"]' }
5
+ firstname:
6
+ {
7
+ xpath_selector: '/html/body/div[2]/table/tbody/tr/td[2]/table/tbody/tr[4]/td/table/tbody/tr/td[2]/table/tbody/tr[5]/td/form/table/tbody/tr[2]/td[2]',
8
+ }
9
+ lastname:
10
+ {
11
+ xpath_selector: '/html/body/div[2]/table/tbody/tr/td[2]/table/tbody/tr[4]/td/table/tbody/tr/td[2]/table/tbody/tr[5]/td/form/table/tbody/tr[3]/td[2]/input',
12
+ }
13
+ selectcountry:
14
+ {
15
+ xpath_selector: '/html/body/div[2]/table/tbody/tr/td[2]/table/tbody/tr[4]/td/table/tbody/tr/td[2]/table/tbody/tr[5]/td/form/table/tbody/tr[11]/td[2]/select',
16
+ }
@@ -5,6 +5,8 @@ require 'capybara/cucumber'
5
5
  require 'cucumber'
6
6
  require 'yaml'
7
7
  require 'selenium-webdriver'
8
- require 'itms_automation'
8
+ # require 'itms_automation'
9
9
  require 'report_builder'
10
10
 
11
+ require_relative "../../../lib/itms_automation.rb"
12
+ # Selenium::WebDriver::Driver.for(:remote).logger.level = :debug
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itms_automation
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.3'
4
+ version: '1.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anh Pham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-08 00:00:00.000000000 Z
11
+ date: 2020-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver