50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# File 'lib/magnesium/elements/frame.rb', line 50
def execute(action,data)
begin
if action == 'send_keys'
if Config.config["wait"]["isstart"] == "true"
return @e.when_present(Config.config["wait"]["value"].to_i).send_keys data.to_s
elsif Config.config["wait"]["isstart"] == "false"
return @e.send_keys data.to_s
else
puts '...'
end
elsif action == 'exists'
if Config.config["wait"]["isstart"] == "true"
return @e.when_present(Config.config["wait"]["value"].to_i).exists?
elsif Config.config["wait"]["isstart"] == "false"
return @e.exists?
else
puts '...'
end
elsif action == 'wait_until_present'
return @e.wait_until_present
elsif action == 'wait_while_present'
return @e.wait_while_present
else
puts '...'
end
end
end
|