我正在尝试建立一个宏来打开浏览器,转到我的Outlook帐户,将我的计划器导出到excel并保存在同一文件夹中。
const {Builder, By, Key, until} = require('selenium-webdriver');
(async function example() {
let driver = await new Builder().forBrowser('chrome').build();
await driver.get('https://path to my outlook-planner account.com');
})();
但是,每次我运行该应用程序时,chromedrive.exe都会打开而没有缓存,并再次要求我再次登录该帐户。 有什么办法可以保持我的帐户登录状态?
答案 0 :(得分:0)
尝试使用特定的用户实例加载浏览器。
# exact values we're looking for any of
$uac = "512", "544", "66048", "66080"
# template strings for the LDAP query filter
$LDAPORTemplate = '(|{0})'
$UACEqualsTemplate = '(useraccountcontrol={0})'
# generate the individual filter clause for each possible UAC value
$clauses = foreach($value in $uac){
$UACEqualsTemplate -f $value
}
# join in a single string
$clauses = $clauses -join ''
# wrap in OR operator
$LDAPQuery = $LDAPORTemplate -f $clauses
Get-ADUser -LDAPFilter $LDAPQUery -Properties * -SearchBase "DC=domain,DC=com" |Select * |Out-GridView