Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
581
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.73 KB | None | 0 0
  1. package amx.devs.ua;
  2.  
  3. import org.junit.Test;
  4.  
  5. import static com.codeborne.selenide.CollectionCondition.exactTexts;
  6. import static com.codeborne.selenide.Condition.text;
  7. import static com.codeborne.selenide.Condition.visible;
  8. import static com.codeborne.selenide.Selenide.*;
  9.  
  10.  
  11. public class AMXSmokeTest {
  12.  
  13. @Test
  14. public void testCreateTask() {
  15. open("https://www.amexia-offshore.com/");
  16.  
  17. //Write us a message
  18. $("#popup-message-call").click();
  19. $("#first-name").setValue("qatest");
  20. $("#your-email").setValue("qatester914@gmail.com");
  21. $("#your-phone").setValue("+380981556852");
  22. $("#your-message").setValue("qatest");
  23. $("#submit").click();
  24. $(".popup-close").click();
  25.  
  26. //Need help?
  27. $(".floating-call-us.popup-callback-call").click();
  28. $("#wpcfx2-f986-o2").find("#first-name").setValue("qatest");
  29. $("#wpcfx2-f986-o2").find("#your-phone").setValue("+380981556852");
  30. $("#wpcfx2-f986-o2").find("#your-message").setValue("qatest");
  31. $("#wpcfx2-f986-o2").find("#submit").click();
  32. $("#popup-callback-form").find(".popup-close").click();
  33.  
  34. //Download brochure
  35. $(".mobile.download_brochure_btn>p").click();
  36. $("#wpcfx2-f1343-o3").find("#first-name").setValue("qatest");
  37. $("#wpcfx2-f1343-o3").find("#your-email").setValue("qatester914@gmail.com");
  38. $("#wpcfx2-f1343-o3").find("#your-phone").setValue("+380981556852");
  39. $("#wpcfx2-f1343-o3").find("#submit").click();
  40. $("#popup_brochure_form").find(".popup-close").click();
  41.  
  42.  
  43. //Need help?
  44. $("#wpcfx2-f987-o4").$("#first-name").setValue("qatest");
  45. $("#wpcfx2-f987-o4").$("#your-email").setValue("qatester914@gmail.com");
  46. $("#wpcfx2-f987-o4").$("#your-phone").setValue("+380981556852");
  47. $("#wpcfx2-f987-o4").$("#your-message").setValue("qatest");
  48. $("#wpcfx2-f987-o4").$("#submit").click();
  49.  
  50.  
  51. $("#menu-item-1461>a").click();
  52.  
  53. refresh();
  54.  
  55. //Contact form
  56. $("#wpcfx2-f1330-o5").$("#first-name").setValue("qatest");
  57. $("#wpcfx2-f1330-o5").$("#your-email").setValue("qatester914@gmail.com");
  58. $("#wpcfx2-f1330-o5").$("#your-phone").setValue("+380981556852");
  59. $("#wpcfx2-f1330-o5").$("#your-message").setValue("qatest");
  60. $("#wpcfx2-f1330-o5").$("#submit").click();
  61. refresh();
  62.  
  63.  
  64. //jurisdiction
  65. $("#menu-item-1514>a").click();
  66. $("#menu-item-142>a").click();
  67. $(".button.quick-checkout-button.quick-checkout-button-shortcode").click();
  68. refresh();
  69.  
  70. open("https://www.amexia-offshore.com/checkout/?qc_loader=true&quantity=1&checkout_action=lightbox&clear_cart=true&product_id=997");
  71.  
  72.  
  73. $("#billing_first_name").setValue("qatest");
  74. $("#billing_last_name").setValue("qatest");
  75. $("#billing_company").setValue("qatest");
  76. $("#billing_email").setValue("qatester914@gmail.com");
  77. $("#billing_phone").setValue("380981556858");
  78. $("#billing_country").doubleClick();
  79. $("#billing_address_1").setValue("qatest");
  80. $("#billing_address_2").setValue("qatest");
  81. $("#billing_city").setValue("qatest");
  82. $("#billing_state").setValue("qatest");
  83. $("#billing_postcode").setValue("qatest");
  84. $("#order_comments").setValue("2");
  85. // $("#wc_checkout_add_ons_2").click();
  86. // $("#wc_checkout_add_ons_12").doubleClick();
  87. $("#place_order").click();
  88.  
  89. open("https://www.amexia-offshore.fr/");
  90.  
  91.  
  92. //Write us a message
  93. $("#popup-message-call").click();
  94. $("#first-name").setValue("qatest");
  95. $("#your-email").setValue("qatester914@gmail.com");
  96. $("#your-phone").setValue("+380981556852");
  97. $("#your-message").setValue("qatest");
  98. $("#submit").click();
  99. $(".popup-close").click();
  100.  
  101.  
  102. //Need help?
  103. $(".floating-call-us.popup-callback-call").click();
  104. $("#wpcfx2-f1037-o2").find("#first-name").setValue("qatest");
  105. $("#wpcfx2-f1037-o2").find("#your-phone").setValue("+380981556852");
  106. $("#wpcfx2-f1037-o2").find("#your-message").setValue("qatest");
  107. $("#wpcfx2-f1037-o2").find("#submit").click();
  108. $("#popup-callback-form").find(".popup-close").click();
  109.  
  110. //Download brochure
  111. $(".mobile.download_brochure_btn>p").click();
  112. $("#wpcfx2-f1605-o3").find("#first-name").setValue("qatest");
  113. $("#wpcfx2-f1605-o3").find("#your-email").setValue("qatester914@gmail.com");
  114. $("#wpcfx2-f1605-o3").find("#your-phone").setValue("+380981556852");
  115. $("#wpcfx2-f1605-o3").find("#submit").click();
  116. $("#popup_brochure_form").find(".popup-close").click();
  117.  
  118.  
  119. //Need help?
  120. $("#wpcfx2-f1038-o4").$("#first-name").setValue("qatest");
  121. $("#wpcfx2-f1038-o4").$("#your-email").setValue("qatester914@gmail.com");
  122. $("#wpcfx2-f1038-o4").$("#your-phone").setValue("+380981556852");
  123. $("#wpcfx2-f1038-o4").$("#your-message").setValue("qatest");
  124. $("#wpcfx2-f1038-o4").$("#submit").click();
  125.  
  126.  
  127. $("#menu-item-1842>a").click();
  128.  
  129. refresh();
  130.  
  131. //Contact form
  132. $("#wpcfx2-f1595-o5").$("#first-name").setValue("qatest");
  133. $("#wpcfx2-f1595-o5").$("#your-email").setValue("qatester914@gmail.com");
  134. $("#wpcfx2-f1595-o5").$("#your-phone").setValue("+380981556852");
  135. $("#wpcfx2-f1595-o5").$("#your-message").setValue("qatest");
  136. $("#wpcfx2-f1595-o5").$("#submit").click();
  137. refresh();
  138.  
  139. //jurisdiction
  140. $("#menu-item-1690>a").click();
  141. $("#menu-item-142>a").click();
  142. $(".button.quick-checkout-button.quick-checkout-button-shortcode").click();
  143. refresh();
  144.  
  145. open("https://www.amexia-offshore.fr/checkout/?qc_loader=true&quantity=1&checkout_action=lightbox&clear_cart=true&product_id=1094");
  146.  
  147. $("#billing_first_name").setValue("qatest");
  148. $("#billing_last_name").setValue("qatest");
  149. $("#billing_company").setValue("qatest");
  150. $("#billing_email").setValue("qatester914@gmail.com");
  151. $("#billing_phone").setValue("380981556858");
  152. $("#billing_country").doubleClick();
  153. $("#billing_address_1").setValue("qatest");
  154. $("#billing_address_2").setValue("qatest");
  155. $("#billing_city").setValue("qatest");
  156. $("#billing_state").setValue("qatest");
  157. $("#billing_postcode").setValue("qatest");
  158. $("#order_comments").setValue("1");
  159. // $("#wc_checkout_add_ons_2").click();
  160. // $("#wc_checkout_add_ons_12").doubleClick();
  161. $("#place_order").click();
  162.  
  163.  
  164.  
  165. }
  166.  
  167. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement