qfunction 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/function/assertions.rb +115 -1
- metadata +3 -3
data/Rakefile
CHANGED
data/lib/function/assertions.rb
CHANGED
@@ -361,11 +361,112 @@ module Qa
|
|
361
361
|
sleep(1)
|
362
362
|
if i>=$timeout then
|
363
363
|
assert(text.exists?)
|
364
|
-
break;
|
365
364
|
end
|
366
365
|
i +=1
|
367
366
|
end
|
368
367
|
end
|
368
|
+
|
369
|
+
def showLinks(arg,text)
|
370
|
+
text.each do |item|
|
371
|
+
i = 0
|
372
|
+
while !$ff.link(:"#{arg}",item).exists? do
|
373
|
+
sleep(1)
|
374
|
+
i +=1
|
375
|
+
if i>=$timeout then
|
376
|
+
assert( $ff.link(:"#{arg}",item).exists? )
|
377
|
+
end
|
378
|
+
end
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
def showButtons(arg,text)
|
383
|
+
text.each do |item|
|
384
|
+
i = 0
|
385
|
+
while !$ff.button(:"#{arg}",item).exists? do
|
386
|
+
sleep(1)
|
387
|
+
i +=1
|
388
|
+
if i>=$timeout then
|
389
|
+
assert( $ff.button(:"#{arg}",item).exists? )
|
390
|
+
end
|
391
|
+
end
|
392
|
+
end
|
393
|
+
end
|
394
|
+
|
395
|
+
def showSpans(arg,text)
|
396
|
+
text.each do |item|
|
397
|
+
i = 0
|
398
|
+
while !$ff.span(:"#{arg}",item).exists? do
|
399
|
+
sleep(1)
|
400
|
+
i +=1
|
401
|
+
if i>=$timeout then
|
402
|
+
assert( $ff.span(:"#{arg}",item).exists? )
|
403
|
+
end
|
404
|
+
end
|
405
|
+
end
|
406
|
+
end
|
407
|
+
|
408
|
+
def showImages(arg,text)
|
409
|
+
text.each do |item|
|
410
|
+
i = 0
|
411
|
+
while !$ff.image(:"#{arg}",item).exists? do
|
412
|
+
sleep(1)
|
413
|
+
i +=1
|
414
|
+
if i>=$timeout then
|
415
|
+
assert( $ff.image(:"#{arg}",item).exists? )
|
416
|
+
end
|
417
|
+
end
|
418
|
+
end
|
419
|
+
end
|
420
|
+
|
421
|
+
def showDivs(arg,text)
|
422
|
+
text.each do |item|
|
423
|
+
i = 0
|
424
|
+
while !$ff.div(:"#{arg}",item).exists? do
|
425
|
+
sleep(1)
|
426
|
+
i +=1
|
427
|
+
if i>=$timeout then
|
428
|
+
assert( $ff.div(:"#{arg}",item).exists? )
|
429
|
+
end
|
430
|
+
end
|
431
|
+
end
|
432
|
+
end
|
433
|
+
|
434
|
+
def showTextfields(arg,text)
|
435
|
+
text.each do |item|
|
436
|
+
i = 0
|
437
|
+
while !$ff.text_field(:"#{arg}",item).exists? do
|
438
|
+
sleep(1)
|
439
|
+
i +=1
|
440
|
+
if i>=$timeout then
|
441
|
+
assert( $ff.text_field(:"#{arg}",item).exists? )
|
442
|
+
end
|
443
|
+
end
|
444
|
+
end
|
445
|
+
end
|
446
|
+
def showTables(arg,text)
|
447
|
+
text.each do |item|
|
448
|
+
i = 0
|
449
|
+
while !$ff.table(:"#{arg}",item).exists? do
|
450
|
+
sleep(1)
|
451
|
+
i +=1
|
452
|
+
if i>=$timeout then
|
453
|
+
assert( $ff.table(:"#{arg}",item).exists? )
|
454
|
+
end
|
455
|
+
end
|
456
|
+
end
|
457
|
+
end
|
458
|
+
def showSelectlists(arg,text)
|
459
|
+
text.each do |item|
|
460
|
+
i = 0
|
461
|
+
while !$ff.select_list(:"#{arg}",item).exists? do
|
462
|
+
sleep(1)
|
463
|
+
i +=1
|
464
|
+
if i>=$timeout then
|
465
|
+
assert( $ff.select_list(:"#{arg}",item).exists? )
|
466
|
+
end
|
467
|
+
end
|
468
|
+
end
|
469
|
+
end
|
369
470
|
|
370
471
|
def noLinks(arg,text)
|
371
472
|
text.each do |item|
|
@@ -380,6 +481,19 @@ module Qa
|
|
380
481
|
end
|
381
482
|
end
|
382
483
|
|
484
|
+
def noSelectlists(arg,text)
|
485
|
+
text.each do |item|
|
486
|
+
i = 0
|
487
|
+
while $ff.select_list(:"#{arg}",item).exists? do
|
488
|
+
sleep(1)
|
489
|
+
i +=1
|
490
|
+
if i>=$timeout then
|
491
|
+
assert( !$ff.select_list(:"#{arg}",item).exists? )
|
492
|
+
end
|
493
|
+
end
|
494
|
+
end
|
495
|
+
end
|
496
|
+
|
383
497
|
def noButtons(arg,text)
|
384
498
|
text.each do |item|
|
385
499
|
i = 0
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 6
|
9
|
+
version: 0.1.6
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- QuangMV, Cyworld VietNam, 5th Floor, 447 Lac Long Quan Street, Tay Ho Dist, Ha Noi, VietNam
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-11-
|
17
|
+
date: 2010-11-23 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|