@@ -18,7 +18,7 @@ void main() {
1818 late Process p;
1919
2020 setUpAll (() async {
21- final sqldPort = await selectFreePort ();
21+ final int sqldPort = await selectFreePort ();
2222 sqld = await startSqld (sqldPort);
2323
2424 port = await selectFreePort ();
@@ -83,7 +83,7 @@ void main() {
8383 await p.exitCode;
8484 try {
8585 await dbDir.delete (recursive: true );
86- } catch (e) {
86+ } on Object {
8787 // OK
8888 }
8989 });
@@ -130,7 +130,7 @@ void main() {
130130 'E2E' ,
131131 skip: hasChromeDriver ? null : 'Chromedriver not installed' ,
132132 () async {
133- final chromedriver = await Process .start ('chromedriver' , [
133+ final Process chromedriver = await Process .start ('chromedriver' , [
134134 '--port=4444' ,
135135 '--url-base=wd/hub' ,
136136 ]);
@@ -153,7 +153,7 @@ void main() {
153153 .then (fail),
154154 ]);
155155
156- final driver = await createDriver (
156+ final WebDriver driver = await createDriver (
157157 spec: WebDriverSpec .JsonWire ,
158158 desired: {
159159 ...Capabilities .chrome,
@@ -167,31 +167,31 @@ void main() {
167167 addTearDown (driver.quit);
168168
169169 await driver.get ('http://localhost:$port ' );
170- final iframe = await driver.waitForElement (
170+ final WebElement iframe = await driver.waitForElement (
171171 const By .tagName ('iframe' ),
172172 timeout: const Duration (seconds: 10 ),
173173 );
174- final src = await iframe.attributes['src' ];
174+ final String ? src = await iframe.attributes['src' ];
175175 expect (src, 'https://studio.outerbase.com/embed/sqlite' );
176176
177177 // Ensure that sending `SELECT 1;` works and returns `1` in the result cell.
178178
179179 await driver.switchTo.frame (iframe);
180180
181- final input = await driver.waitForElement (
181+ final WebElement input = await driver.waitForElement (
182182 const By .className ('cm-content' ),
183183 );
184184 await input.click ();
185185 await input.sendKeys ('SELECT 1;' );
186186
187- final runButton = await driver.findElement (
187+ final WebElement runButton = await driver.findElement (
188188 const By .cssSelector (
189189 r'body > div.flex.h-screen.w-screen.flex-col > div > div:nth-child(3) > div.flex.h-full.w-full.flex-col > div.relative.grow > div > div > div:nth-child(1) > div > div.flex.border-b.bg-neutral-50.py-3.pr-1.pl-3.dark\:bg-neutral-950 > div.flex.gap-2 > div > button.inline-flex.items-center.justify-center.whitespace-nowrap.font-medium.transition-colors.focus-visible\:outline-hidden.focus-visible\:ring-1.focus-visible\:ring-ring.disabled\:pointer-events-none.disabled\:opacity-50.bg-primary.text-primary-foreground.shadow-sm.hover\:bg-primary\/90.h-8.rounded-md.px-3.text-sm.rounded-r-none' ,
190190 ),
191191 );
192192 await runButton.click ();
193193
194- final resultCell = await driver.waitForElement (
194+ final WebElement resultCell = await driver.waitForElement (
195195 const By .cssSelector (
196196 r'body > div.flex.h-screen.w-screen.flex-col > div > div:nth-child(3) > div.flex.h-full.w-full.flex-col > div.relative.grow > div > div > div:nth-child(3) > div.flex.h-full.w-full.flex-col > div.relative.grow > div:nth-child(1) > div > div.grow.overflow-hidden > div > div > table > tbody > tr > td.overflow-hidden.border-r.border-b.box-border.hover\:bg-neutral-100.dark\:hover\:bg-neutral-800.bg-transparent' ,
197197 ),
@@ -207,7 +207,7 @@ bool get hasChromeDriver {
207207 try {
208208 Process .runSync ('chromedriver' , ['--version' ]);
209209 return true ;
210- } catch (e) {
210+ } on Object {
211211 return false ;
212212 }
213213}
@@ -221,10 +221,10 @@ extension on SearchContext {
221221 while (stopwatch.elapsed < timeout) {
222222 try {
223223 return await findElement (by);
224- } catch (e) {
224+ } on Object {
225225 // Ignore and retry
226226 }
227- await Future .delayed (const Duration (milliseconds: 100 ));
227+ await Future < void > .delayed (const Duration (milliseconds: 100 ));
228228 }
229229 throw TimeoutException (null , 'Element not found within $timeout ' );
230230 }
0 commit comments