File tree 1 file changed +12
-1
lines changed
src/integration-test/groovy/au/org/ala/fieldcapture
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package au.org.ala.fieldcapture
2
2
3
3
import com.icegreen.greenmail.util.GreenMail
4
4
import com.icegreen.greenmail.util.GreenMailUtil
5
+ import org.openqa.selenium.ElementClickInterceptedException
5
6
import pages.ProjectDownloadReport
6
7
import pages.ProjectIndex
7
8
import pages.RlpProjectPage
@@ -720,7 +721,17 @@ class RlpReportingSpec extends StubbedCasSpec {
720
721
getFormSections(). each {
721
722
// Mark all sections except the Weed Distribution Survey as not applicable
722
723
if (isOptional(it) && it != ' koRLP_-_Weed_distribution_survey' ) {
723
- markAsNotApplicable(it)
724
+ try {
725
+ markAsNotApplicable(it)
726
+ }
727
+ catch (ElementClickInterceptedException e) {
728
+ // This can happen if the section is not visible, so we need to scroll it into view
729
+ interact {
730
+ moveToElement(it)
731
+ }
732
+ markAsNotApplicable(it)
733
+ }
734
+
724
735
}
725
736
}
726
737
def section = $(' #koRLP_-_Weed_distribution_survey' )
You can’t perform that action at this time.
0 commit comments