How to use get_page_source method in SeleniumBase

Best Python code snippet using SeleniumBase

test.py

Source:test.py Github

copy

Full Screen

...23 add_consignment_page = home_page.header.add_consignment_page()24 add_consignment_page.new_furniture_consignment()25 view_consignments_page = home_page.header.view_consignments_page()26 view_consignments_page.check_added_consignment()27 Assert.contains(add_consignment_page._title_uuid, view_consignments_page.get_page_source())28 Assert.contains(u"Polska, Dolnośląskie, Wroclaw, 54-612", view_consignments_page.get_page_source())29 Assert.contains(u'Polska, Mazowieckie, Warszawa, 02-796', view_consignments_page.get_page_source())30 Assert.contains(u'362.70 km', view_consignments_page.get_page_source())31 Assert.contains(u'Tylko transport', view_consignments_page.get_page_source())32 Assert.contains(u'This is my additional info', view_consignments_page.get_page_source())33 def test_add_new_consignment_not_logged_in_should_succeed(self):34 home_page = HomePage(self.driver).open_home_page()35 add_consignment_page = home_page.header.add_consignment_page()36 add_consignment_page.new_furniture_consignment()37 Assert.contains(u"Jeszcze tylko chwila...", add_consignment_page.get_page_source())38 Assert.contains(u"Twoje og\u0142oszenie o przesy\u0142ce \xa0zosta\u0142o zapisane, ale musisz si\u0119 <strong>zalogowa\u0107,</strong> aby by\u0142o widoczne dla Przewo\u017anik\xf3w.", add_consignment_page.get_page_source())39 Assert.contains(u"Nie masz konta? <strong>Zarejestruj się </strong><strong>w 1 minutę (za darmo)</strong>. Twoje dane są <strong>chronione</strong> i nie będą upublicznione.", add_consignment_page.get_page_source())40 home_page.header.login(USER, PASSWORD)41 Assert.contains(u"Twoja przesyłka", add_consignment_page.get_page_source())42 Assert.contains(u"została wystawiona!", add_consignment_page.get_page_source())43 def test_add_new_consignment_not_activated_user_should_succeed(self):44 home_page = HomePage(self.driver).open_home_page()45 add_consignment_page = home_page.header.add_consignment_page()46 add_consignment_page.new_furniture_consignment()47 registeration_page = home_page.header.continue_to_registration_page()48 registeration_page.new_user_fill_data()49 Assert.contains(u"Odbierz pocztę", registeration_page.get_page_source())50 Assert.contains(registeration_page._email, registeration_page.get_page_source())51 Assert.contains(u'Na Twój adres', registeration_page.get_page_source())52 Assert.contains(u'wys\u0142ali\u015bmy e-mail aktywacyjny.\xa0Po aktywacji konta Twoja przesy\u0142ka\xa0zostanie wystawiona.', registeration_page.get_page_source())53 Assert.contains(u'email jest na wp.pl, o2.pl, tlen.pl to sprawdź zakładkę <em>Oferty</em> swojej skrzynki odbiorczej.', registeration_page.get_page_source())54 def test_add_new_consignment_not_logged_in_provider_should_succeed(self):55 home_page = HomePage(self.driver).open_home_page()56 add_consignment_page = home_page.header.add_consignment_page()57 add_consignment_page.new_furniture_consignment()58 Assert.contains(u"Jeszcze tylko chwila...", add_consignment_page.get_page_source())59 Assert.contains(u"Twoje og\u0142oszenie o przesy\u0142ce \xa0zosta\u0142o zapisane, ale musisz si\u0119 <strong>zalogowa\u0107,</strong> aby by\u0142o widoczne dla Przewo\u017anik\xf3w.", add_consignment_page.get_page_source())60 Assert.contains(u"Nie masz konta? <strong>Zarejestruj się </strong><strong>w 1 minutę (za darmo)</strong>. Twoje dane są <strong>chronione</strong> i nie będą upublicznione.", add_consignment_page.get_page_source())61 home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)62 Assert.contains(u"Twoja przesyłka", add_consignment_page.get_page_source())63 Assert.contains(u"została wystawiona!", add_consignment_page.get_page_source())64 def test_register_user_should_succeed(self):65 home_page = HomePage(self.driver).open_home_page()66 registeration_page = home_page.header.open_registration_page()67 registeration_page.new_user_click_register()68 registeration_page.new_user_fill_data()69 Assert.contains(u"Odbierz pocztę", registeration_page.get_page_source())70 Assert.contains(registeration_page._email, registeration_page.get_page_source())71 Assert.contains(u'i kliknij link aktywacyjny, aby ukończyć rejestrację.', registeration_page.get_page_source())72 def test_login_unactivated_user_should_succeed(self):73 home_page = HomePage(self.driver).open_home_page()74 registeration_page = home_page.header.open_registration_page()75 registeration_page.new_user_click_register()76 registeration_page.new_user_fill_data()77 account_page = home_page.header.login(registeration_page._username, registeration_page._password)78 Assert.contains(u"Twoja rejestracja nie została ukończona", registeration_page.get_page_source())79 Assert.contains(u"Odbierz pocztę i kliknij link aktywacyjny, aby ukończyć rejestrację.", registeration_page.get_page_source())80 def test_logout_should_succeed(self):81 home_page = HomePage(self.driver).open_home_page()82 home_page.header.login(USER, PASSWORD)83 home_page.header.logout()84 Assert.contains(u"Wylogowałeś się", home_page.get_page_source())85 def test_register_new_transport_provider_should_succeed(self):86 home_page = HomePage(self.driver).open_home_page()87 registeration_page = home_page.header.open_registration_page()88 registeration_page.new_transport_provider()89 Assert.contains(u"Odbierz pocztę", registeration_page.get_page_source())90 Assert.contains(registeration_page._email, registeration_page.get_page_source())91 Assert.contains(u'i kliknij link aktywacyjny, aby ukończyć rejestrację.', registeration_page.get_page_source())92 def test_edit_user_profile_should_succeed(self):93 home_page = HomePage(self.driver).open_home_page()94 account_page = home_page.header.login(USER, PASSWORD)95 profile_page = home_page.header.open_profile_page()96 profile_page.edit_user_profile()97 Assert.contains(u"Zmiany zostały zapisane.", profile_page.get_page_source())98 def test_edit_consignment_should_succeed(self):99 home_page = HomePage(self.driver).open_home_page()100 account_page = home_page.header.login(USER, PASSWORD)101 add_consignment_page = home_page.header.add_consignment_page()102 add_consignment_page.new_furniture_consignment()103 profile_page = home_page.header.open_profile_page()104 settings = profile_page.edit_consignment()105 settings.edit_consignment_move_house()106 Assert.contains(u"Zmiany w Twojej przesyłce", settings.get_page_source())107 Assert.contains(settings._title_uuid, profile_page.get_page_source())108 Assert.contains(u"zostały pomyślnie zapisane.", settings.get_page_source())109 def test_withdraw_consignment_should_succeed(self):110 home_page = HomePage(self.driver).open_home_page()111 account_page = home_page.header.login(USER, PASSWORD)112 add_consignment_page = home_page.header.add_consignment_page()113 add_consignment_page.new_furniture_consignment()114 profile_page = home_page.header.open_profile_page()115 settings = profile_page.withdraw_consignment()116 sleep(3)117 Assert.contains(u"Ogłoszenie zostało wycofane", profile_page.get_page_source())118 def test_report_violation_to_consignment_should_succeed(self):119 home_page = HomePage(self.driver).open_home_page()120 account_page = home_page.header.login(USER, PASSWORD)121 add_consignment_page = home_page.header.add_consignment_page()122 add_consignment_page.new_furniture_consignment()123 profile = home_page.header.open_profile_page()124 consignment = profile.open_first_auction()125 consignment.report_violation_to_consignmeent()126 Assert.contains(u"Zgłoszenie zostało odnotowane.", consignment.get_page_source())127 def test_report_violation_to_offer_should_succeed(self):128 home_page = HomePage(self.driver).open_home_page()129 user = home_page.header.login(USER, PASSWORD)130 add_consignment_page = home_page.header.add_consignment_page()131 add_consignment_page.new_furniture_consignment()132 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)133 view_consignments_page = home_page.header.view_consignments_page()134 submit_offer = view_consignments_page.check_added_consignment()135 submit_offer.submit_offer()136 submit_offer.confirm_submit_offer()137 account_page = home_page.header.login(USER, PASSWORD)138 profile = home_page.header.open_profile_page()139 consignment = profile.open_first_auction()140 consignment.report_violation_to_offer()141 Assert.contains(u"Zgłoszenie zostało odnotowane.", consignment.get_page_source())142 def test_report_violation_to_question_to_offer_should_succeed(self):143 home_page = HomePage(self.driver).open_home_page()144 user = home_page.header.login(USER, PASSWORD)145 add_consignment_page = home_page.header.add_consignment_page()146 add_consignment_page.new_furniture_consignment()147 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)148 view_consignments_page = home_page.header.view_consignments_page()149 submit_offer = view_consignments_page.check_added_consignment()150 submit_offer.submit_offer()151 submit_offer.confirm_submit_offer()152 user = home_page.header.login(USER, PASSWORD)153 profile = home_page.header.open_profile_page()154 consignment = profile.open_first_auction()155 consignment.add_question_to_offer()156 consignment.report_violation_to_question_to_offer()157 Assert.contains(u"Zgłoszenie zostało odnotowane.", consignment.get_page_source())158 def test_report_violation_to_question_to_consignment_should_succeed(self):159 home_page = HomePage(self.driver).open_home_page()160 user = home_page.header.login(USER, PASSWORD)161 add_consignment_page = home_page.header.add_consignment_page()162 add_consignment_page.new_furniture_consignment()163 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)164 view_consignments_page = home_page.header.view_consignments_page()165 consignment = view_consignments_page.check_added_consignment()166 consignment.provider_add_question_to_consignment()167 consignment.report_violation_to_question_to_consignment()168 Assert.contains(u"Zgłoszenie zostało odnotowane.", consignment.get_page_source())169 def test_check_categories_should_succeed(self):170 home_page = HomePage(self.driver).open_home_page()171 account_page = home_page.header.login(USER, PASSWORD)172 view_consignment_page = home_page.header.view_consignments_page()173 view_consignment_page.check_categories()174 sleep(10)175 view_consignment_page.click_first_result()176 Assert.contains("Mazowieckie", view_consignment_page.get_page_source())177 Assert.contains('Paczki', view_consignment_page.get_page_source())178 def test_submit_offer_should_succeed(self):179 home_page = HomePage(self.driver).open_home_page()180 user = home_page.header.login(USER, PASSWORD)181 add_consignment_page = home_page.header.add_consignment_page()182 add_consignment_page.new_furniture_consignment()183 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)184 view_consignments_page = home_page.header.view_consignments_page()185 submit_offer = view_consignments_page.check_added_consignment()186 submit_offer.submit_offer()187 submit_offer.confirm_submit_offer()188 Assert.contains(u"Oferta została złożona", submit_offer.get_page_source())189 def test_withdraw_offer_should_succeed(self):190 home_page = HomePage(self.driver).open_home_page()191 user = home_page.header.login(USER, PASSWORD)192 add_consignment_page = home_page.header.add_consignment_page()193 add_consignment_page.new_furniture_consignment()194 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)195 view_consignments_page = home_page.header.view_consignments_page()196 submit_offer = view_consignments_page.check_added_consignment()197 submit_offer.submit_offer()198 submit_offer.confirm_submit_offer()199 profile = home_page.header.open_profile_page()200 profile.withdraw_offer()201 Assert.contains(u"Oferta została wycofana.", profile.get_page_source())202 def test_submit_offer_with_expiration_date_should_succeed(self):203 home_page = HomePage(self.driver).open_home_page()204 user = home_page.header.login(USER, PASSWORD)205 add_consignment_page = home_page.header.add_consignment_page()206 add_consignment_page.new_furniture_consignment()207 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)208 view_consignments_page = home_page.header.view_consignments_page()209 consignment = view_consignments_page.check_added_consignment()210 consignment.submit_offer()211 consignment.enter_expiration_date()212 consignment.confirm_submit_offer()213 Assert.contains(u"Oferta została złożona", consignment.get_page_source())214 def test_issue_consignment_again_should_succeed(self):215 home_page = HomePage(self.driver).open_home_page()216 account_page = home_page.header.login(USER, PASSWORD)217 add_consignment_page = home_page.header.add_consignment_page()218 add_consignment_page.new_furniture_consignment()219 profile_page = home_page.header.open_profile_page()220 settings = profile_page.withdraw_consignment()221 profile = home_page.header.open_profile_page()222 edit_settings = profile.issue_consignment_again()223 edit_settings.edit_consignment_cars()224 Assert.contains(u"Twoja przesyłka", edit_settings.get_page_source())225 Assert.contains(u"została wystawiona!", edit_settings.get_page_source())226 def test_watch_auction_should_succeed(self):227 home_page = HomePage(self.driver).open_home_page()228 user = home_page.header.login(USER, PASSWORD)229 add_consignment_page = home_page.header.add_consignment_page()230 add_consignment_page.new_furniture_consignment()231 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)232 view_consignments_page = home_page.header.view_consignments_page()233 consignment = view_consignments_page.check_added_consignment()234 consignment.watch_consignment()235 Assert.contains(u"Ogłoszenie obserwowane", consignment.get_page_source())236 def test_commission_payback_should_succeed(self):237 home_page = HomePage(self.driver).open_home_page()238 user = home_page.header.login(USER, PASSWORD)239 add_consignment_page = home_page.header.add_consignment_page()240 add_consignment_page.new_furniture_consignment()241 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)242 view_consignments_page = home_page.header.view_consignments_page()243 submit_offer = view_consignments_page.check_added_consignment()244 submit_offer.submit_offer()245 submit_offer.confirm_submit_offer()246 user = home_page.header.login(USER, PASSWORD)247 profile = home_page.header.open_profile_page()248 consignment = profile.open_first_auction()249 consignment.accept_offer()250 home_page = HomePage(self.driver).open_home_page()251 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)252 profile = home_page.header.open_profile_page()253 profile.payback_commission()254 Assert.contains(u"Wniosek został wysłany do rozpatrzenia. O wyniku zostaniesz poinformowany mailem.", profile.get_page_source())255 def test_edit_provider_profile_should_succeed(self):256 home_page = HomePage(self.driver).open_home_page()257 account_page = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)258 profile_page = home_page.header.open_profile_page()259 profile_page.edit_provider_profile()260 Assert.contains(u"Profil został zaktualizowany", profile_page.get_page_source())261 def test_edit_provider_data_should_succeed(self):262 home_page = HomePage(self.driver).open_home_page()263 account_page = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)264 profile_page = home_page.header.open_profile_page()265 profile_page.edit_provider_data()266 Assert.contains(u"Zmiany zostały zapisane.", profile_page.get_page_source())267 def test_edit_provider_notifications_should_succeed(self):268 home_page = HomePage(self.driver).open_home_page()269 account_page = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)270 profile_page = home_page.header.open_profile_page()271 profile_page.edit_provider_notifications()272 Assert.contains(u"Zmiany zostały zapisane.", profile_page.get_page_source())273 def test_change_password_should_succeed(self):274 home_page = HomePage(self.driver).open_home_page()275 account_page = home_page.header.login(CHANGE_PASSWORD_USER, CHANGE_PASSWORD_PASSWORD)276 profile_page = home_page.header.open_profile_page()277 profile_page.change_password()278 Assert.contains(u"Hasło zostało zmienione.", profile_page.get_page_source())279 def test_reject_offer_should_succeed(self):280 home_page = HomePage(self.driver).open_home_page()281 user = home_page.header.login(USER, PASSWORD)282 add_consignment_page = home_page.header.add_consignment_page()283 add_consignment_page.new_furniture_consignment()284 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)285 view_consignments_page = home_page.header.view_consignments_page()286 submit_offer = view_consignments_page.check_added_consignment()287 submit_offer.submit_offer()288 submit_offer.confirm_submit_offer()289 user = home_page.header.login(USER, PASSWORD)290 profile = home_page.header.open_profile_page()291 consignment = profile.open_first_auction()292 consignment.reject_offer()293 sleep(3)294 Assert.contains(u"Oferta została odrzucona.", consignment.get_page_source())295 def test_add_question_to_offer_should_succeed(self):296 home_page = HomePage(self.driver).open_home_page()297 user = home_page.header.login(USER, PASSWORD)298 add_consignment_page = home_page.header.add_consignment_page()299 add_consignment_page.new_furniture_consignment()300 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)301 view_consignments_page = home_page.header.view_consignments_page()302 submit_offer = view_consignments_page.check_added_consignment()303 submit_offer.submit_offer()304 submit_offer.confirm_submit_offer()305 user = home_page.header.login(USER, PASSWORD)306 profile = home_page.header.open_profile_page()307 consignment = profile.open_first_auction()308 consignment.add_question_to_offer()309 sleep(3)310 Assert.contains(u"Twoja wiadomość została dodana.", consignment.get_page_source())311 Assert.contains(u"This is my question", consignment.get_page_source())312 def test_provider_reply_to_question_should_succeed(self):313 home_page = HomePage(self.driver).open_home_page()314 user = home_page.header.login(USER, PASSWORD)315 add_consignment_page = home_page.header.add_consignment_page()316 add_consignment_page.new_furniture_consignment()317 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)318 view_consignments_page = home_page.header.view_consignments_page()319 submit_offer = view_consignments_page.check_added_consignment()320 submit_offer.submit_offer()321 submit_offer.confirm_submit_offer()322 user = home_page.header.login(USER, PASSWORD)323 profile = home_page.header.open_profile_page()324 consignment = profile.open_first_auction()325 consignment.add_question_to_offer()326 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)327 profile = home_page.header.open_profile_page()328 consignment=profile.open_first_message()329 consignment.reply_to_question()330 Assert.contains(u"Twoja wiadomość została dodana.", consignment.get_page_source())331 Assert.contains(u"This is my answer", consignment.get_page_source())332 def test_provider_add_question_to_consignment_should_succeed(self):333 home_page = HomePage(self.driver).open_home_page()334 user = home_page.header.login(USER, PASSWORD)335 add_consignment_page = home_page.header.add_consignment_page()336 add_consignment_page.new_furniture_consignment()337 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)338 view_consignments_page = home_page.header.view_consignments_page()339 consignment = view_consignments_page.check_added_consignment()340 consignment.provider_add_question_to_consignment()341 Assert.contains(u"Twoje pytanie zostało dodane.", consignment.get_page_source())342 Assert.contains(u"This is my question", consignment.get_page_source())343 def test_user_reply_to_question_to_consignment_from_provider_should_succeed(self):344 home_page = HomePage(self.driver).open_home_page()345 user = home_page.header.login(USER, PASSWORD)346 add_consignment_page = home_page.header.add_consignment_page()347 add_consignment_page.new_furniture_consignment()348 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)349 view_consignments_page = home_page.header.view_consignments_page()350 consignment = view_consignments_page.check_added_consignment()351 consignment.provider_add_question_to_consignment()352 user = home_page.header.login(USER, PASSWORD)353 profile = home_page.header.open_profile_page()354 consignment = profile.user_open_first_message()355 consignment.reply_to_provider_question_to_consignment()356 Assert.contains(u"Twoja odpowiedź została dodana.", consignment.get_page_source())357 Assert.contains(u"This is my reply", consignment.get_page_source())358 def test_accept_offer_should_succeed(self):359 home_page = HomePage(self.driver).open_home_page()360 user = home_page.header.login(USER, PASSWORD)361 add_consignment_page = home_page.header.add_consignment_page()362 add_consignment_page.new_furniture_consignment()363 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)364 store = home_page.header.open_profile_page()365 store.store_provider_data()366 view_consignments_page = home_page.header.view_consignments_page()367 submit_offer = view_consignments_page.check_added_consignment()368 submit_offer.submit_offer()369 submit_offer.confirm_submit_offer()370 user = home_page.header.login(USER, PASSWORD)371 profile = home_page.header.open_profile_page()372 consignment = profile.open_first_auction()373 consignment.accept_offer()374 sleep(2)375 Assert.contains("Gratulacje!", consignment.get_page_source())376 Assert.contains(u"Wybrałeś ofertę Przewoźnika <strong>"+PROVIDER_USER, consignment.get_page_source())377 Assert.contains(u"Skontaktuj się z Przewoźnikiem <strong>"+PROVIDER_USER+u"</strong> w celu realizacji usługi transportowej", consignment.get_page_source())378 Assert.contains(u"Imię i nazwisko: <strong>"+store.name1, consignment.get_page_source())379 Assert.contains("tel.: <strong>"+store.tel, consignment.get_page_source())380 Assert.contains("tel. kom.: <strong>"+store.kom, consignment.get_page_source())381 Assert.contains("Nazwa: <strong>"+store.company_name, consignment.get_page_source())382 Assert.contains("e-mail: <strong>"+store.mail, consignment.get_page_source())383 Assert.contains("NIP: <strong>"+store.nip, consignment.get_page_source())384 Assert.contains("REGON: <strong>"+store.regon, consignment.get_page_source())385 Assert.contains(store.address_table[1], consignment.get_page_source())386 Assert.contains(store.address_table[2], consignment.get_page_source())387 Assert.contains(u"Pobierz list przewozowy, który będzie potwierdzeniem nadania Twojej przesyłki", consignment.get_page_source())388 Assert.contains(u"(Ogłoszenie nieaktualne. Użytkownik wybrał już ofertę)", consignment.get_page_source())389 def test_make_offer_executed_should_succeed(self):390 home_page = HomePage(self.driver).open_home_page()391 user = home_page.header.login(USER, PASSWORD)392 add_consignment_page = home_page.header.add_consignment_page()393 add_consignment_page.new_furniture_consignment()394 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)395 view_consignments_page = home_page.header.view_consignments_page()396 submit_offer = view_consignments_page.check_added_consignment()397 submit_offer.submit_offer()398 submit_offer.confirm_submit_offer()399 user = home_page.header.login(USER, PASSWORD)400 profile = home_page.header.open_profile_page()401 consignment = profile.open_first_auction()402 consignment.accept_offer()403 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)404 profile = home_page.header.open_profile_page()405 profile.make_offer_executed()406 sleep(2)407 Assert.contains(u"Oferta ma status zrealizowana.", profile.get_page_source())408 def test_provider_send_commentary_from_my_offers_menu_should_succeed(self):409 home_page = HomePage(self.driver).open_home_page()410 user = home_page.header.login(USER, PASSWORD)411 add_consignment_page = home_page.header.add_consignment_page()412 add_consignment_page.new_furniture_consignment()413 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)414 view_consignments_page = home_page.header.view_consignments_page()415 submit_offer = view_consignments_page.check_added_consignment()416 submit_offer.submit_offer()417 submit_offer.confirm_submit_offer()418 user = home_page.header.login(USER, PASSWORD)419 profile = home_page.header.open_profile_page()420 consignment = profile.open_first_auction()421 consignment.accept_offer()422 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)423 profile = home_page.header.open_profile_page()424 profile.provider_send_commentary_from_my_offers_menu()425 Assert.contains(u"Komentarz został wystawiony.", consignment.get_page_source())426 def test_reply_to_question_to_consignment_from_panel_should_succeed(self):427 home_page = HomePage(self.driver).open_home_page()428 user = home_page.header.login(USER, PASSWORD)429 add_consignment_page = home_page.header.add_consignment_page()430 add_consignment_page.new_furniture_consignment()431 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)432 view_consignments_page = home_page.header.view_consignments_page()433 consignment = view_consignments_page.check_added_consignment()434 consignment.provider_add_question_to_consignment()435 user = home_page.header.login(USER, PASSWORD)436 profile = home_page.header.open_profile_page()437 profile.user_click_reply_to_question()438 Assert.contains(u"Napisz wiadomość i ustal z Przewoźnikiem niezbędne szczegóły. Aby transakcja była bezpieczna musisz jeszcze zaakceptować ofertę Przewoźnika.", profile.get_page_source())439 consignment.reply_to_provider_question_to_consignment()440 Assert.contains(u"Twoja odpowiedź została dodana.", profile.get_page_source())441 Assert.contains(u"This is my reply", profile.get_page_source())442 def test_user_send_commentary_from_ended_transactions_menu_should_succeed(self):443 home_page = HomePage(self.driver).open_home_page()444 user = home_page.header.login(USER, PASSWORD)445 add_consignment_page = home_page.header.add_consignment_page()446 add_consignment_page.new_furniture_consignment()447 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)448 view_consignments_page = home_page.header.view_consignments_page()449 submit_offer = view_consignments_page.check_added_consignment()450 submit_offer.submit_offer()451 submit_offer.confirm_submit_offer()452 user = home_page.header.login(USER, PASSWORD)453 profile = home_page.header.open_profile_page()454 consignment = profile.open_first_auction()455 consignment.accept_offer()456 profile = home_page.header.open_profile_page()457 profile.user_send_commentary_from_ended_transactions_menu()458 Assert.contains(u"Komentarz został wystawiony.", consignment.get_page_source())459 def test_user_send_commentary_from_commentaries_menu_should_succeed(self):460 home_page = HomePage(self.driver).open_home_page()461 user = home_page.header.login(USER, PASSWORD)462 add_consignment_page = home_page.header.add_consignment_page()463 add_consignment_page.new_furniture_consignment()464 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)465 view_consignments_page = home_page.header.view_consignments_page()466 submit_offer = view_consignments_page.check_added_consignment()467 submit_offer.submit_offer()468 submit_offer.confirm_submit_offer()469 user = home_page.header.login(USER, PASSWORD)470 profile = home_page.header.open_profile_page()471 consignment = profile.open_first_auction()472 consignment.accept_offer()473 profile = home_page.header.open_profile_page()474 profile.user_send_commentary_from_commentaries_menu()475 Assert.contains(u"Komentarz został wystawiony.", consignment.get_page_source())476 def test_provider_reply_to_negative_commentary_should_succeed(self):477 home_page = HomePage(self.driver).open_home_page()478 user = home_page.header.login(USER, PASSWORD)479 add_consignment_page = home_page.header.add_consignment_page()480 add_consignment_page.new_furniture_consignment()481 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)482 view_consignments_page = home_page.header.view_consignments_page()483 submit_offer = view_consignments_page.check_added_consignment()484 submit_offer.submit_offer()485 submit_offer.confirm_submit_offer()486 user = home_page.header.login(USER, PASSWORD)487 profile = home_page.header.open_profile_page()488 consignment = profile.open_first_auction()489 consignment.accept_offer()490 profile = home_page.header.open_profile_page()491 profile.user_send_negative_commentary()492 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)493 profile = home_page.header.open_profile_page()494 profile.provider_reply_to_negative_commentary()495 Assert.contains(u"This is my commentary", profile.get_page_source())496 Assert.contains(u"This is my reply", profile.get_page_source())497 def test_provider_send_commentary_from_commentaries_menu_should_succeed(self):498 home_page = HomePage(self.driver).open_home_page()499 user = home_page.header.login(USER, PASSWORD)500 add_consignment_page = home_page.header.add_consignment_page()501 add_consignment_page.new_furniture_consignment()502 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)503 view_consignments_page = home_page.header.view_consignments_page()504 submit_offer = view_consignments_page.check_added_consignment()505 submit_offer.submit_offer()506 submit_offer.confirm_submit_offer()507 user = home_page.header.login(USER, PASSWORD)508 profile = home_page.header.open_profile_page()509 consignment = profile.open_first_auction()510 consignment.accept_offer()511 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)512 profile = home_page.header.open_profile_page()513 profile.provider_send_commentary_from_commentaries_menu()514 Assert.contains(u"Komentarz został wystawiony.", consignment.get_page_source())515 def test_ask_for_offer_on_provider_page_should_succeed(self):516 home_page = HomePage(self.driver).open_home_page()517 user = home_page.header.login(USER, PASSWORD)518 add_consignment_page = home_page.header.add_consignment_page()519 add_consignment_page.new_furniture_consignment()520 provider_page = home_page.header.view_provider_lublintransport_page()521 provider_page.ask_for_offer_on_provider_page()522 Assert.contains(u"Twoja prośba o ofertę została wysłana do Przewoźnika.", provider_page.get_page_source())523 def test_ask_for_offer_while_adding_consignment_should_succeed(self):524 home_page = HomePage(self.driver).open_home_page()525 user = home_page.header.login(USER, PASSWORD)526 add_consignment_page = home_page.header.add_consignment_page()527 add_consignment_page.new_furniture_consignment()528 add_consignment_page.ask_for_offer_while_adding_consignment()529 sleep(2)530 Assert.contains(u"Prośba wysłana", add_consignment_page.get_page_source())531 def test_ask_for_offer_for_added_consignment_should_succeed(self):532 home_page = HomePage(self.driver).open_home_page()533 user = home_page.header.login(USER, PASSWORD)534 add_consignment_page = home_page.header.add_consignment_page()535 add_consignment_page.new_furniture_consignment()536 profile = home_page.header.open_profile_page()537 profile.ask_for_offer_for_added_consignment()538 sleep(2)539 Assert.contains(u"Prośba wysłana", profile.get_page_source())540 def test_user_add_new_consignment_urgent_and_highlited_should_succeed(self):541 home_page = HomePage(self.driver).open_home_page()542 account_page = home_page.header.login(USER, PASSWORD)543 add_consignment_page = home_page.header.add_consignment_page()544 add_consignment_page.add_consignment_parcel()545 add_consignment_page.set_urgent()546 add_consignment_page.set_highlited()547 add_consignment_page.save_transport()548 Assert.contains(u"Twoje ogłoszenie zostało zapisane i będzie opublikowane po dokonaniu wpłaty.", add_consignment_page.get_page_source())549 add_consignment_page.pay_with_test_payment()550 add_consignment_page.get_consignment_title_from_result_page_after_payment()551 Assert.contains(u"Twoja przesyłka", add_consignment_page.get_page_source())552 Assert.equal(add_consignment_page.consignment_title_result_page_after_payment, add_consignment_page._title_uuid)553 Assert.contains(u"została wystawiona! Wyróżnienie ogłoszenia będzie widoczne od razu po zaksięgowaniu wpłaty w systemie PayU.", add_consignment_page.get_page_source())554 def test_user_add_new_consignment_urgent_should_succeed(self):555 home_page = HomePage(self.driver).open_home_page()556 account_page = home_page.header.login(USER, PASSWORD)557 add_consignment_page = home_page.header.add_consignment_page()558 add_consignment_page.add_consignment_parcel()559 add_consignment_page.set_urgent()560 add_consignment_page.save_transport()561 Assert.contains(u"Twoje ogłoszenie zostało zapisane i będzie opublikowane po dokonaniu wpłaty.", add_consignment_page.get_page_source())562 add_consignment_page.pay_with_test_payment()563 add_consignment_page.get_consignment_title_from_result_page_after_payment()564 Assert.contains(u"Twoja przesyłka", add_consignment_page.get_page_source())565 Assert.equal(add_consignment_page.consignment_title_result_page_after_payment, add_consignment_page._title_uuid)566 Assert.contains(u"została wystawiona! Wyróżnienie ogłoszenia będzie widoczne od razu po zaksięgowaniu wpłaty w systemie PayU.", add_consignment_page.get_page_source())567 def test_user_add_new_consignment_highlited_should_succeed(self):568 home_page = HomePage(self.driver).open_home_page()569 account_page = home_page.header.login(USER, PASSWORD)570 add_consignment_page = home_page.header.add_consignment_page()571 add_consignment_page.add_consignment_parcel()572 add_consignment_page.set_highlited()573 add_consignment_page.save_transport()574 Assert.contains(u"Twoje ogłoszenie zostało zapisane i będzie opublikowane po dokonaniu wpłaty.", add_consignment_page.get_page_source())575 add_consignment_page.pay_with_test_payment()576 add_consignment_page.get_consignment_title_from_result_page_after_payment()577 Assert.contains(u"Twoja przesyłka", add_consignment_page.get_page_source())578 Assert.equal(add_consignment_page.consignment_title_result_page_after_payment, add_consignment_page._title_uuid)579 Assert.contains(u"została wystawiona! Wyróżnienie ogłoszenia będzie widoczne od razu po zaksięgowaniu wpłaty w systemie PayU.", add_consignment_page.get_page_source())580 def test_user_login_while_adding_new_consignment_set_highlited_and_urgent_should_succeed(self):581 home_page = HomePage(self.driver).open_home_page()582 add_consignment_page = home_page.header.add_consignment_page()583 add_consignment_page.add_consignment_parcel()584 add_consignment_page.set_urgent()585 add_consignment_page.set_highlited()586 add_consignment_page.save_transport()587 account_page = home_page.header.login(USER, PASSWORD)588 Assert.contains(u"Twoje ogłoszenie zostało zapisane i będzie opublikowane po dokonaniu wpłaty.", add_consignment_page.get_page_source())589 Assert.contains(u"Zalogowałeś się", add_consignment_page.get_page_source())590 add_consignment_page.pay_with_test_payment()591 add_consignment_page.get_consignment_title_from_result_page_after_payment()592 Assert.contains(u"Twoja przesyłka", add_consignment_page.get_page_source())593 Assert.equal(add_consignment_page.consignment_title_result_page_after_payment, add_consignment_page._title_uuid)594 Assert.contains(u"została wystawiona! Wyróżnienie ogłoszenia będzie widoczne od razu po zaksięgowaniu wpłaty w systemie PayU.", add_consignment_page.get_page_source())595 def test_user_login_while_adding_new_consignment_set_highlited_should_succeed(self):596 home_page = HomePage(self.driver).open_home_page()597 add_consignment_page = home_page.header.add_consignment_page()598 add_consignment_page.add_consignment_parcel()599 add_consignment_page.set_highlited()600 add_consignment_page.save_transport()601 account_page = home_page.header.login(USER, PASSWORD)602 Assert.contains(u"Twoje ogłoszenie zostało zapisane i będzie opublikowane po dokonaniu wpłaty.", add_consignment_page.get_page_source())603 Assert.contains(u"Zalogowałeś się", add_consignment_page.get_page_source())604 add_consignment_page.pay_with_test_payment()605 add_consignment_page.get_consignment_title_from_result_page_after_payment()606 Assert.contains(u"Twoja przesyłka", add_consignment_page.get_page_source())607 Assert.equal(add_consignment_page.consignment_title_result_page_after_payment, add_consignment_page._title_uuid)608 Assert.contains(u"została wystawiona! Wyróżnienie ogłoszenia będzie widoczne od razu po zaksięgowaniu wpłaty w systemie PayU.", add_consignment_page.get_page_source())609 def test_user_login_while_adding_new_consignment_set_urgent_should_succeed(self):610 home_page = HomePage(self.driver).open_home_page()611 add_consignment_page = home_page.header.add_consignment_page()612 add_consignment_page.add_consignment_parcel()613 add_consignment_page.set_urgent()614 add_consignment_page.save_transport()615 account_page = home_page.header.login(USER, PASSWORD)616 Assert.contains(u"Twoje ogłoszenie zostało zapisane i będzie opublikowane po dokonaniu wpłaty.", add_consignment_page.get_page_source())617 Assert.contains(u"Zalogowałeś się", add_consignment_page.get_page_source())618 add_consignment_page.pay_with_test_payment()619 add_consignment_page.get_consignment_title_from_result_page_after_payment()620 Assert.contains(u"Twoja przesyłka", add_consignment_page.get_page_source())621 Assert.equal(add_consignment_page.consignment_title_result_page_after_payment, add_consignment_page._title_uuid)622 Assert.contains(u"została wystawiona! Wyróżnienie ogłoszenia będzie widoczne od razu po zaksięgowaniu wpłaty w systemie PayU.", add_consignment_page.get_page_source())623 def test_user_after_adding_consignment_set_highlited_and_urgent_should_succeed(self):624 home_page = HomePage(self.driver).open_home_page()625 account_page = home_page.header.login(USER, PASSWORD)626 add_consignment_page = home_page.header.add_consignment_page()627 add_consignment_page.new_furniture_consignment()628 profile_page = home_page.header.open_profile_page()629 profile_page.user_open_my_consignments_menu()630 profile_page.user_click_first_consignment_distinguish_button()631 profile_page.set_consignment_highlited_and_urgent()632 add_consignment_page.pay_with_test_payment()633 add_consignment_page.get_consignment_title_from_result_page_after_payment()634 Assert.contains(u"Operacja przebiegła pomyślnie. Wyróżnienie Twojego ogłoszenia będzie widoczne od razu po zaksięgowaniu wpłaty w systemie PayU. Zobacz swoje ogłoszenie:", add_consignment_page.get_page_source())635 Assert.equal(add_consignment_page.consignment_title_result_page_after_payment, add_consignment_page._title_uuid)636 def test_user_after_adding_consignment_set_highlited_should_succeed(self):637 home_page = HomePage(self.driver).open_home_page()638 account_page = home_page.header.login(USER, PASSWORD)639 add_consignment_page = home_page.header.add_consignment_page()640 add_consignment_page.new_furniture_consignment()641 profile_page = home_page.header.open_profile_page()642 profile_page.user_open_my_consignments_menu()643 profile_page.user_click_first_consignment_distinguish_button()644 profile_page.set_consignment_highlited()645 add_consignment_page.pay_with_test_payment()646 add_consignment_page.get_consignment_title_from_result_page_after_payment()647 Assert.contains(u"Operacja przebiegła pomyślnie. Wyróżnienie Twojego ogłoszenia będzie widoczne od razu po zaksięgowaniu wpłaty w systemie PayU. Zobacz swoje ogłoszenie:", add_consignment_page.get_page_source())648 Assert.equal(add_consignment_page.consignment_title_result_page_after_payment, add_consignment_page._title_uuid)649 def test_user_after_adding_consignment_set_urgent_should_succeed(self):650 home_page = HomePage(self.driver).open_home_page()651 account_page = home_page.header.login(USER, PASSWORD)652 add_consignment_page = home_page.header.add_consignment_page()653 add_consignment_page.new_furniture_consignment()654 profile_page = home_page.header.open_profile_page()655 profile_page.user_open_my_consignments_menu()656 profile_page.user_click_first_consignment_distinguish_button()657 profile_page.set_consignment_urgent()658 add_consignment_page.pay_with_test_payment()659 add_consignment_page.get_consignment_title_from_result_page_after_payment()660 Assert.contains(u"Operacja przebiegła pomyślnie. Wyróżnienie Twojego ogłoszenia będzie widoczne od razu po zaksięgowaniu wpłaty w systemie PayU. Zobacz swoje ogłoszenie:", add_consignment_page.get_page_source())661 Assert.equal(add_consignment_page.consignment_title_result_page_after_payment, add_consignment_page._title_uuid)662 def test_provider_add_new_consignment_urgent_and_highlited_should_succeed(self):663 home_page = HomePage(self.driver).open_home_page()664 account_page = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)665 add_consignment_page = home_page.header.add_consignment_page()666 add_consignment_page.add_consignment_parcel()667 add_consignment_page.set_urgent()668 add_consignment_page.set_highlited()669 add_consignment_page.save_transport()670 Assert.contains(u"Twoja przesy\u0142ka zosta\u0142a wystawiona! Op\u0142ata za wyr\xf3\u017cnienie og\u0142oszenia zosta\u0142a doliczona do Twojego salda (zak\u0142adka Moje konto &gt; Rozliczenia).", add_consignment_page.get_page_source())671 def test_provider_add_new_consignment_highlited_should_succeed(self):672 home_page = HomePage(self.driver).open_home_page()673 account_page = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)674 add_consignment_page = home_page.header.add_consignment_page()675 add_consignment_page.add_consignment_parcel()676 add_consignment_page.set_highlited()677 add_consignment_page.save_transport()678 Assert.contains(u"Twoja przesy\u0142ka zosta\u0142a wystawiona! Op\u0142ata za wyr\xf3\u017cnienie og\u0142oszenia zosta\u0142a doliczona do Twojego salda (zak\u0142adka Moje konto &gt; Rozliczenia).", add_consignment_page.get_page_source())679 def test_provider_add_new_consignment_urgent_should_succeed(self):680 home_page = HomePage(self.driver).open_home_page()681 account_page = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)682 add_consignment_page = home_page.header.add_consignment_page()683 add_consignment_page.add_consignment_parcel()684 add_consignment_page.set_urgent()685 add_consignment_page.save_transport()686 Assert.contains(u"Twoja przesy\u0142ka zosta\u0142a wystawiona! Op\u0142ata za wyr\xf3\u017cnienie og\u0142oszenia zosta\u0142a doliczona do Twojego salda (zak\u0142adka Moje konto &gt; Rozliczenia).", add_consignment_page.get_page_source())687 def test_provider_login_while_adding_new_consignment_set_highlited_and_urgent_should_succeed(self):688 home_page = HomePage(self.driver).open_home_page()689 add_consignment_page = home_page.header.add_consignment_page()690 add_consignment_page.add_consignment_parcel()691 add_consignment_page.set_urgent()692 add_consignment_page.set_highlited()693 add_consignment_page.save_transport()694 account_page = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)695 Assert.contains(u"Twoja przesy\u0142ka zosta\u0142a wystawiona! Op\u0142ata za wyr\xf3\u017cnienie og\u0142oszenia zosta\u0142a doliczona do Twojego salda (zak\u0142adka Moje konto &gt; Rozliczenia).", add_consignment_page.get_page_source())696 Assert.contains(u"Zalogowałeś się", add_consignment_page.get_page_source())697 def test_provider_login_while_adding_new_consignment_set_highlited_should_succeed(self):698 home_page = HomePage(self.driver).open_home_page()699 add_consignment_page = home_page.header.add_consignment_page()700 add_consignment_page.add_consignment_parcel()701 add_consignment_page.set_highlited()702 add_consignment_page.save_transport()703 account_page = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)704 Assert.contains(u"Twoja przesy\u0142ka zosta\u0142a wystawiona! Op\u0142ata za wyr\xf3\u017cnienie og\u0142oszenia zosta\u0142a doliczona do Twojego salda (zak\u0142adka Moje konto &gt; Rozliczenia).", add_consignment_page.get_page_source())705 Assert.contains(u"Zalogowałeś się", add_consignment_page.get_page_source())706 def test_provider_login_while_adding_new_consignment_set_urgent_should_succeed(self):707 home_page = HomePage(self.driver).open_home_page()708 add_consignment_page = home_page.header.add_consignment_page()709 add_consignment_page.add_consignment_parcel()710 add_consignment_page.set_urgent()711 add_consignment_page.save_transport()712 account_page = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)713 Assert.contains(u"Twoja przesy\u0142ka zosta\u0142a wystawiona! Op\u0142ata za wyr\xf3\u017cnienie og\u0142oszenia zosta\u0142a doliczona do Twojego salda (zak\u0142adka Moje konto &gt; Rozliczenia).", add_consignment_page.get_page_source())714 Assert.contains(u"Zalogowałeś się", add_consignment_page.get_page_source())715 def test_provider_after_adding_consignment_set_highlited_and_urgent_should_succeed(self):716 home_page = HomePage(self.driver).open_home_page()717 account_page = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)718 add_consignment_page = home_page.header.add_consignment_page()719 add_consignment_page.new_furniture_consignment()720 profile_page = home_page.header.open_profile_page()721 profile_page.provider_open_my_consignments_menu()722 profile_page.provider_click_first_consignment_distinguish_button()723 profile_page.set_consignment_highlited_and_urgent()724 Assert.contains(u"Operacja przebiegła pomyślnie.", add_consignment_page.get_page_source())725 def test_provider_after_adding_consignment_set_highlited_should_succeed(self):726 home_page = HomePage(self.driver).open_home_page()727 account_page = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)728 add_consignment_page = home_page.header.add_consignment_page()729 add_consignment_page.new_furniture_consignment()730 profile_page = home_page.header.open_profile_page()731 profile_page.provider_open_my_consignments_menu()732 profile_page.provider_click_first_consignment_distinguish_button()733 profile_page.set_consignment_highlited()734 Assert.contains(u"Operacja przebiegła pomyślnie.", add_consignment_page.get_page_source())735 def test_provider_after_adding_consignment_set_urgent_should_succeed(self):736 home_page = HomePage(self.driver).open_home_page()737 account_page = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)738 add_consignment_page = home_page.header.add_consignment_page()739 add_consignment_page.new_furniture_consignment()740 profile_page = home_page.header.open_profile_page()741 profile_page.provider_open_my_consignments_menu()742 profile_page.provider_click_first_consignment_distinguish_button()743 profile_page.set_consignment_urgent()744 Assert.contains(u"Operacja przebiegła pomyślnie.", add_consignment_page.get_page_source())745 def setUp(self):746 self.timeout = 30747 if run_locally:748 self.driver = webdriver.Chrome()749 self.driver.implicitly_wait(self.timeout)750 # fp = webdriver.ChromeOptions()751 # extension = open("https://crowdworkers.10clouds.com/static/extension_0.2.10.0.crx")752 # fp.add_extension(extension)753 # browser = webdriver.Firefox(firefox_profile=fp)754 else:755 self.desired_capabilities['name'] = self.id()756 sauce_url = "http://%s:%s@ondemand.saucelabs.com:80/wd/hub"757 self.driver = webdriver.Remote(758 desired_capabilities=self.desired_capabilities,...

Full Screen

Full Screen

saucelabs.py

Source:saucelabs.py Github

copy

Full Screen

...33 home_page = HomePage(self.driver).open_home_page()34 registeration_page = home_page.header.open_registration_page()35 registeration_page.new_user_click_register()36 registeration_page.new_user_fill_data()37 Assert.contains(u"Odbierz pocztę", registeration_page.get_page_source())38 Assert.contains(registeration_page._email, registeration_page.get_page_source())39 Assert.contains(u'i kliknij link aktywacyjny, aby ukończyć rejestrację.', registeration_page.get_page_source())40 def test_withdraw_consignment_should_succeed(self):41 home_page = HomePage(self.driver).open_home_page()42 account_page = home_page.header.login(USER, PASSWORD)43 add_consignment_page = home_page.header.add_consignment_page()44 add_consignment_page.new_furniture_consignment()45 profile_page = home_page.header.open_profile_page()46 settings = profile_page.withdraw_consignment()47 sleep(3)48 Assert.contains(u"Ogłoszenie zostało wycofane", profile_page.get_page_source())49 def test_report_violation_to_offer_should_succeed(self):50 home_page = HomePage(self.driver).open_home_page()51 user = home_page.header.login(USER, PASSWORD)52 add_consignment_page = home_page.header.add_consignment_page()53 add_consignment_page.new_furniture_consignment()54 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)55 view_consignments_page = home_page.header.view_consignments_page()56 submit_offer = view_consignments_page.check_added_consignment()57 submit_offer.submit_offer()58 submit_offer.confirm_submit_offer()59 account_page = home_page.header.login(USER, PASSWORD)60 profile = home_page.header.open_profile_page()61 consignment = profile.open_first_auction()62 consignment.report_violation_to_offer()63 Assert.contains(u"Zgłoszenie zostało odnotowane.", consignment.get_page_source())64 def test_report_violation_to_question_to_offer_should_succeed(self):65 home_page = HomePage(self.driver).open_home_page()66 user = home_page.header.login(USER, PASSWORD)67 add_consignment_page = home_page.header.add_consignment_page()68 add_consignment_page.new_furniture_consignment()69 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)70 view_consignments_page = home_page.header.view_consignments_page()71 submit_offer = view_consignments_page.check_added_consignment()72 submit_offer.submit_offer()73 submit_offer.confirm_submit_offer()74 user = home_page.header.login(USER, PASSWORD)75 profile = home_page.header.open_profile_page()76 consignment = profile.open_first_auction()77 consignment.add_question_to_offer()78 consignment.report_violation_to_question_to_offer()79 Assert.contains(u"Zgłoszenie zostało odnotowane.", consignment.get_page_source())80 def test_withdraw_offer_should_succeed(self):81 home_page = HomePage(self.driver).open_home_page()82 user = home_page.header.login(USER, PASSWORD)83 add_consignment_page = home_page.header.add_consignment_page()84 add_consignment_page.new_furniture_consignment()85 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)86 view_consignments_page = home_page.header.view_consignments_page()87 submit_offer = view_consignments_page.check_added_consignment()88 submit_offer.submit_offer()89 submit_offer.confirm_submit_offer()90 profile = home_page.header.open_profile_page()91 profile.withdraw_offer()92 Assert.contains(u"Oferta została wycofana.", profile.get_page_source())93 def test_watch_auction_should_succeed(self):94 home_page = HomePage(self.driver).open_home_page()95 user = home_page.header.login(USER, PASSWORD)96 add_consignment_page = home_page.header.add_consignment_page()97 add_consignment_page.new_furniture_consignment()98 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)99 view_consignments_page = home_page.header.view_consignments_page()100 consignment = view_consignments_page.check_added_consignment()101 consignment.watch_consignment()102 Assert.contains(u"Ogłoszenie obserwowane", consignment.get_page_source())103 def test_reject_offer_should_succeed(self):104 home_page = HomePage(self.driver).open_home_page()105 user = home_page.header.login(USER, PASSWORD)106 add_consignment_page = home_page.header.add_consignment_page()107 add_consignment_page.new_furniture_consignment()108 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)109 view_consignments_page = home_page.header.view_consignments_page()110 submit_offer = view_consignments_page.check_added_consignment()111 submit_offer.submit_offer()112 submit_offer.confirm_submit_offer()113 user = home_page.header.login(USER, PASSWORD)114 profile = home_page.header.open_profile_page()115 consignment = profile.open_first_auction()116 consignment.reject_offer()117 sleep(3)118 Assert.contains(u"Oferta została odrzucona.", consignment.get_page_source())119 def test_user_reply_to_question_to_consignment_from_provider_should_succeed(self):120 home_page = HomePage(self.driver).open_home_page()121 user = home_page.header.login(USER, PASSWORD)122 add_consignment_page = home_page.header.add_consignment_page()123 add_consignment_page.new_furniture_consignment()124 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)125 view_consignments_page = home_page.header.view_consignments_page()126 consignment = view_consignments_page.check_added_consignment()127 consignment.provider_add_question_to_consignment()128 user = home_page.header.login(USER, PASSWORD)129 profile = home_page.header.open_profile_page()130 consignment = profile.user_open_first_message()131 consignment.reply_to_provider_question_to_consignment()132 Assert.contains(u"Twoja odpowiedź została dodana.", consignment.get_page_source())133 Assert.contains(u"This is my reply", consignment.get_page_source())134 def test_user_send_commentary_from_ended_transactions_menu_should_succeed(self):135 home_page = HomePage(self.driver).open_home_page()136 user = home_page.header.login(USER, PASSWORD)137 add_consignment_page = home_page.header.add_consignment_page()138 add_consignment_page.new_furniture_consignment()139 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)140 view_consignments_page = home_page.header.view_consignments_page()141 submit_offer = view_consignments_page.check_added_consignment()142 submit_offer.submit_offer()143 submit_offer.confirm_submit_offer()144 user = home_page.header.login(USER, PASSWORD)145 profile = home_page.header.open_profile_page()146 consignment = profile.open_first_auction()147 consignment.accept_offer()148 profile = home_page.header.open_profile_page()149 profile.user_send_commentary_from_ended_transactions_menu()150 Assert.contains(u"Komentarz został wystawiony.", consignment.get_page_source())151 def test_user_send_commentary_from_commentaries_menu_should_succeed(self):152 home_page = HomePage(self.driver).open_home_page()153 user = home_page.header.login(USER, PASSWORD)154 add_consignment_page = home_page.header.add_consignment_page()155 add_consignment_page.new_furniture_consignment()156 provider = home_page.header.login(PROVIDER_USER, PROVIDER_PASSWORD)157 view_consignments_page = home_page.header.view_consignments_page()158 submit_offer = view_consignments_page.check_added_consignment()159 submit_offer.submit_offer()160 submit_offer.confirm_submit_offer()161 user = home_page.header.login(USER, PASSWORD)162 profile = home_page.header.open_profile_page()163 consignment = profile.open_first_auction()164 consignment.accept_offer()165 profile = home_page.header.open_profile_page()166 profile.user_send_commentary_from_commentaries_menu()167 Assert.contains(u"Komentarz został wystawiony.", consignment.get_page_source())168 def test_user_add_new_consignment_urgent_and_highlited_should_succeed(self):169 home_page = HomePage(self.driver).open_home_page()170 account_page = home_page.header.login(USER, PASSWORD)171 add_consignment_page = home_page.header.add_consignment_page()172 add_consignment_page.add_consignment_parcel()173 add_consignment_page.set_urgent()174 add_consignment_page.set_highlited()175 add_consignment_page.save_transport()176 Assert.contains(u"Twoje ogłoszenie zostało zapisane i będzie opublikowane po dokonaniu wpłaty.", add_consignment_page.get_page_source())177 add_consignment_page.pay_with_test_payment()178 add_consignment_page.get_consignment_title_from_result_page_after_payment()179 Assert.contains(u"Twoja przesyłka", add_consignment_page.get_page_source())180 Assert.equal(add_consignment_page.consignment_title_result_page_after_payment, add_consignment_page._title_uuid)181 Assert.contains(u"została wystawiona! Wyróżnienie ogłoszenia będzie widoczne od razu po zaksięgowaniu wpłaty w systemie PayU.", add_consignment_page.get_page_source())182 def test_user_add_new_consignment_urgent_should_succeed(self):183 home_page = HomePage(self.driver).open_home_page()184 account_page = home_page.header.login(USER, PASSWORD)185 add_consignment_page = home_page.header.add_consignment_page()186 add_consignment_page.add_consignment_parcel()187 add_consignment_page.set_urgent()188 add_consignment_page.save_transport()189 Assert.contains(u"Twoje ogłoszenie zostało zapisane i będzie opublikowane po dokonaniu wpłaty.", add_consignment_page.get_page_source())190 add_consignment_page.pay_with_test_payment()191 add_consignment_page.get_consignment_title_from_result_page_after_payment()192 Assert.contains(u"Twoja przesyłka", add_consignment_page.get_page_source())193 Assert.equal(add_consignment_page.consignment_title_result_page_after_payment, add_consignment_page._title_uuid)194 Assert.contains(u"została wystawiona! Wyróżnienie ogłoszenia będzie widoczne od razu po zaksięgowaniu wpłaty w systemie PayU.", add_consignment_page.get_page_source())195 def test_user_add_new_consignment_highlited_should_succeed(self):196 home_page = HomePage(self.driver).open_home_page()197 account_page = home_page.header.login(USER, PASSWORD)198 add_consignment_page = home_page.header.add_consignment_page()199 add_consignment_page.add_consignment_parcel()200 add_consignment_page.set_highlited()201 add_consignment_page.save_transport()202 Assert.contains(u"Twoje ogłoszenie zostało zapisane i będzie opublikowane po dokonaniu wpłaty.", add_consignment_page.get_page_source())203 add_consignment_page.pay_with_test_payment()204 add_consignment_page.get_consignment_title_from_result_page_after_payment()205 Assert.contains(u"Twoja przesyłka", add_consignment_page.get_page_source())206 Assert.equal(add_consignment_page.consignment_title_result_page_after_payment, add_consignment_page._title_uuid)207 Assert.contains(u"została wystawiona! Wyróżnienie ogłoszenia będzie widoczne od razu po zaksięgowaniu wpłaty w systemie PayU.", add_consignment_page.get_page_source())208 def test_user_login_while_adding_new_consignment_set_highlited_and_urgent_should_succeed(self):209 home_page = HomePage(self.driver).open_home_page()210 add_consignment_page = home_page.header.add_consignment_page()211 add_consignment_page.add_consignment_parcel()212 add_consignment_page.set_urgent()213 add_consignment_page.set_highlited()214 add_consignment_page.save_transport()215 account_page = home_page.header.login(USER, PASSWORD)216 Assert.contains(u"Twoje ogłoszenie zostało zapisane i będzie opublikowane po dokonaniu wpłaty.", add_consignment_page.get_page_source())217 Assert.contains(u"Zalogowałeś się", add_consignment_page.get_page_source())218 add_consignment_page.pay_with_test_payment()219 add_consignment_page.get_consignment_title_from_result_page_after_payment()220 Assert.contains(u"Twoja przesyłka", add_consignment_page.get_page_source())221 Assert.equal(add_consignment_page.consignment_title_result_page_after_payment, add_consignment_page._title_uuid)222 Assert.contains(u"została wystawiona! Wyróżnienie ogłoszenia będzie widoczne od razu po zaksięgowaniu wpłaty w systemie PayU.", add_consignment_page.get_page_source())223 def test_user_login_while_adding_new_consignment_set_highlited_should_succeed(self):224 home_page = HomePage(self.driver).open_home_page()225 add_consignment_page = home_page.header.add_consignment_page()226 add_consignment_page.add_consignment_parcel()227 add_consignment_page.set_highlited()228 add_consignment_page.save_transport()229 account_page = home_page.header.login(USER, PASSWORD)230 Assert.contains(u"Twoje ogłoszenie zostało zapisane i będzie opublikowane po dokonaniu wpłaty.", add_consignment_page.get_page_source())231 Assert.contains(u"Zalogowałeś się", add_consignment_page.get_page_source())232 add_consignment_page.pay_with_test_payment()233 add_consignment_page.get_consignment_title_from_result_page_after_payment()234 Assert.contains(u"Twoja przesyłka", add_consignment_page.get_page_source())235 Assert.equal(add_consignment_page.consignment_title_result_page_after_payment, add_consignment_page._title_uuid)236 Assert.contains(u"została wystawiona! Wyróżnienie ogłoszenia będzie widoczne od razu po zaksięgowaniu wpłaty w systemie PayU.", add_consignment_page.get_page_source())237 def test_user_login_while_adding_new_consignment_set_urgent_should_succeed(self):238 home_page = HomePage(self.driver).open_home_page()239 add_consignment_page = home_page.header.add_consignment_page()240 add_consignment_page.add_consignment_parcel()241 add_consignment_page.set_urgent()242 add_consignment_page.save_transport()243 account_page = home_page.header.login(USER, PASSWORD)244 Assert.contains(u"Twoje ogłoszenie zostało zapisane i będzie opublikowane po dokonaniu wpłaty.", add_consignment_page.get_page_source())245 Assert.contains(u"Zalogowałeś się", add_consignment_page.get_page_source())246 add_consignment_page.pay_with_test_payment()247 add_consignment_page.get_consignment_title_from_result_page_after_payment()248 Assert.contains(u"Twoja przesyłka", add_consignment_page.get_page_source())249 Assert.equal(add_consignment_page.consignment_title_result_page_after_payment, add_consignment_page._title_uuid)250 Assert.contains(u"została wystawiona! Wyróżnienie ogłoszenia będzie widoczne od razu po zaksięgowaniu wpłaty w systemie PayU.", add_consignment_page.get_page_source())251 def setUp(self):252 self.timeout = 30253 if run_locally:254 self.driver = webdriver.Firefox()255 self.driver.implicitly_wait(self.timeout)256 else:257 self.desired_capabilities['name'] = self.id()258 sauce_url = "http://%s:%s@ondemand.saucelabs.com:80/wd/hub"259 self.driver = webdriver.Remote(260 desired_capabilities=self.desired_capabilities,261 command_executor=sauce_url % (USERNAME, ACCESS_KEY)262 )263 self.driver.implicitly_wait(self.timeout)264 def tearDown(self):...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run SeleniumBase automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful