Skip to content

Commit

Permalink
find element fragment and task
Browse files Browse the repository at this point in the history
  • Loading branch information
corevo committed Mar 25, 2019
1 parent cd9d71a commit 0e7bf5c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,30 @@ namespace :node do
end
end

namespace :side do
task :atoms => [
"//javascript/atoms/fragments:find-element",
] do
# TODO: move directly to IDE's directory once the repositories are merged
baseDir = "build/javascript/atoms"
mkdir_p baseDir

[
Rake::Task["//javascript/atoms/fragments:find-element"].out,
].each do |atom|
name = File.basename(atom)

puts "Generating #{atom} as #{name}"
File.open(File.join(baseDir, name), "w") do |f|
f << "// GENERATED CODE - DO NOT EDIT\n"
f << "module.exports = "
f << IO.read(atom).strip
f << ";\n"
end
end
end
end

namespace :safari do
desc "Build the SafariDriver java client"
task :build => [
Expand Down
9 changes: 9 additions & 0 deletions javascript/atoms/fragments/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,12 @@ closure_fragment(
"//javascript/chrome-driver:is_element_displayed",
],
)

closure_fragment(
name = "find-element",
function = "bot.locators.findElement",
module = "bot.locators",
deps = [
"//javascript/atoms:locators",
],
)

0 comments on commit 0e7bf5c

Please sign in to comment.