From 9b54093ab0a8bb82ca32ba56c28da2c05afdc20d Mon Sep 17 00:00:00 2001 From: Nico Schedel Date: Tue, 16 Apr 2019 14:18:21 +0200 Subject: [PATCH] TT#56376 selenium: fix crash on entering fraud limits controller_customer.t: - Edited code block around clicking invisible buttons on entering fraud limits. Should work more reliable now. Change-Id: I71e4cd9c3b9fe8a91661692212357bc4ce816460 (cherry picked from commit 5a8262e2e21f7aada6815e82ff7e23e269961d38) --- t/selenium/controller_customer.t | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/t/selenium/controller_customer.t b/t/selenium/controller_customer.t index 3a40dc6cf1..de4d03c381 100644 --- a/t/selenium/controller_customer.t +++ b/t/selenium/controller_customer.t @@ -71,16 +71,10 @@ diag("Check if successful"); $d->find_element('//div[contains(@class,"accordion-body")]//table//td[contains(text(),"Sipwise")]'); diag("Edit Fraud Limits"); -my $elem = $d->find_element('//div[contains(@class,"accordion-heading")]//a[contains(text(),"Fraud Limits")]'); -$d->scroll_to_element($elem); -$elem->click(); -sleep 4 if ($d->browser_name_in("phantomjs", "chrome")); # time to move -$row = $d->find_element('//div[contains(@class,"accordion-body")]//table//tr/td[contains(text(),"Monthly Settings")]'); -ok($row); -$edit_link = $d->find_child_element($row, './../td//a[text()[contains(.,"Edit")]]'); -ok($edit_link); -$d->move_action(element => $row); -$edit_link->click(); +$d->scroll_to_element($d->find_element('//div[contains(@class,"accordion-heading")]//a[contains(text(),"Fraud Limits")]')); +$d->find_element('//div[contains(@class,"accordion-heading")]//a[contains(text(),"Fraud Limits")]')->click(); +$d->move_action(element => $d->find_element('//div[contains(@class,"accordion-body")]//table//tr/td[contains(text(),"Monthly Settings")]')); +$d->find_element('//*[@id="collapse_fraud"]/div/table/tbody/tr[1]/td//a[text()[contains(.,"Edit")]]')->click(); diag("Do Edit Fraud Limits"); $d->fill_element('#fraud_interval_limit', 'css', "100");