Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit e8986b4

Browse files
committed
加载sessionStorage前需要先打开页面
1 parent c9e9e3d commit e8986b4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/suren/autotest/web/framework/settings/AutoModuleProxy.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import net.sf.cglib.proxy.Enhancer;
2222
import net.sf.cglib.proxy.MethodInterceptor;
2323
import net.sf.cglib.proxy.MethodProxy;
24+
import org.openqa.selenium.JavascriptExecutor;
2425
import org.openqa.selenium.WebDriver;
2526
import org.openqa.selenium.html5.SessionStorage;
2627
import org.openqa.selenium.html5.WebStorage;
@@ -106,6 +107,7 @@ public Object intercept(Object obj, Method method, Object[] args,
106107
String accountNameValue = ((Text) value).getValue();
107108
sessionStorageConfig.setAccount(accountNameValue);
108109

110+
page.open();
109111
if(loadSessionStorage(accountNameValue))
110112
{
111113
sessionStorageConfig.setAccount(accountNameValue);

0 commit comments

Comments
 (0)