İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

Trying to avoid Timeouts testing my odoo app with Playwright

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
testtestingodooasync
2196 Görünümler
Avatar
Mathieu Le Masson

Hello, I'm having some troubles while testing my odoo app with playright.

I often find playwright clicking too fast for elements to be activated already, or to modify a field, then try to do something else immediatly, only to see that something be canceled by an "actualisation" of the page, caused by the previous field modification.


It seems that I am not allowed to post images, so i have to describe the situation with words.


For an exemple of the first case, i choose the value "Assurance axa" in a dropdown, and i must then empty the field, but if i do it like this.

await odoo.try_to_select_x2m("Assurance axa", "source_service_line_id")
await odoo.empty_field("source_service_line_id")

It chooses the value, then empty the field immediately, but then the field gets 'actualized', and the field retakes the value  "Assurance axa".

So far i make the test pass like this 

await odoo.try_to_select_x2m("Assurance axa", "source_service_line_id")
await odoo.wait_for_http_response_with_url_substring("lease4.amendment.service_line") // Need to be addressed differently
await odoo.empty_field("source_service_line_id")
async wait_for_http_response_with_url_substring(url_substring) {
await this.page.waitForResponse(response => response.url().includes(url_substring));
await this.page.waitForTimeout(500) // To let the page update after receiving its response.
}

but as you can see, it is not even enough to wait for the associated http response, i have to add a timeout, and this is not viable long-term.

For my second exemple, first i have my login function

async login(username: string) {
let password = await this.get_password_from_vault(username)

await this.page.goto('***********************');
await this.page.waitForResponse(response => response.url().includes('web.assets_frontend_lazy.js'))
await this.page.getByLabel('Your Email').fill(username)
await this.page.getByLabel('Password').fill(password)
await this.page.getByRole('button', {name: 'Confirm'}).click()
await this.page.waitForURL(/active_id=mail\.box_inbox/)
}

where i have to wait for the page to be hydrated ( i think that it is what the lazy.js http response indicates ) before clicking on the 'Confirm' button.

I have been told by a more experienced colleague to avoid waitForResponse as much as possible, and for obvious reasons not to have any waitForTimeout, but i don't see how to handle these situations differently.

For my second problem, i have this code

await odoo.navigate("CRM", "Sales", "My Pipeline")
await odoo.wait_for_http_response_with_url_substring("crm.lead")
await odoo.click_on_button_by_accessible_name_or_data_name('Create')

that only works thanks to the timeout, if i try to do 

await odoo.navigate("CRM", "Sales", "My Pipeline")
await odoo.wait_for_url("model=crm.lead&view_type=kanban")
await odoo.click_on_button_by_accessible_name_or_data_name('Create')

then playwright clicks on the button, but nothing happens, and yet i don't see any javascript in the http requests that could indicates a lazy loading/hydration of the button, but the button works fine if i wait 500 ms.

I'm quite confused about why this button isn't "activated", but i have to wait a bit before being able to use it.

Anyways, i would appreciate any idea on how to handle these situations without using this waitForResponse function.

Thank you for reading all this, have a good day.

0
Avatar
Vazgeç
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
Why native test fails? Çözüldü
test testing
Avatar
Avatar
2
Haz 20
7325
Override test
test testing
Avatar
0
Kas 19
4988
upload file in field (to unitest)
test odoo
Avatar
0
May 19
3948
Test execution
test testing
Avatar
Avatar
Avatar
2
Mar 15
5102
How To Install Odoo from Github on Ubuntu 14.04 For Testing Purposes Only (ie. not for production) Çözüldü
v8 installation test git testing odoo
Avatar
Avatar
Avatar
Avatar
Avatar
70
Kas 23
183280
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now