Skip to content

Commit

Permalink
+ fixed an alert related exception and change bn to 41
Browse files Browse the repository at this point in the history
  • Loading branch information
PegasisForever committed Feb 25, 2020
1 parent 7f0475b commit 9419917
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>site.pegasis</groupId>
<artifactId>fetch-ta-data</artifactId>
<version>BN40</version>
<version>BN41</version>

<packaging>jar</packaging>
<properties>
Expand Down
10 changes: 8 additions & 2 deletions src/site/pegasis/ta/fetch/tools.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import com.sun.net.httpserver.HttpExchange
import org.apache.commons.lang3.exception.ExceptionUtils
import org.json.simple.parser.JSONParser
import org.openqa.selenium.By
import org.openqa.selenium.UnexpectedAlertBehaviour
import org.openqa.selenium.WebElement
import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.chrome.ChromeOptions
import org.openqa.selenium.remote.CapabilityType
import org.openqa.selenium.remote.DesiredCapabilities
import site.pegasis.ta.fetch.models.Timing
import site.pegasis.ta.fetch.models.WeightedDouble
import site.pegasis.ta.fetch.modes.server.latestApiVersion
Expand Down Expand Up @@ -96,7 +99,10 @@ fun getWebClient(): ChromeDriver {
"--disable-gpu",
"--window-size=300,200",
"--ignore-certificate-errors")

options.merge(DesiredCapabilities().apply {
isJavascriptEnabled = false
setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.DISMISS)
})
val client = ChromeDriver(options)
allWebClients += client
return client
Expand Down Expand Up @@ -188,7 +194,7 @@ enum class LogLevel {

private val logDateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS")
val fileDateFormat = SimpleDateFormat("yyyy-MM-dd")
const val serverBuildNumber = 40
const val serverBuildNumber = 41
var isQuiet = false
fun log(level: LogLevel, msg: String, throwable: Throwable? = null, timing: Timing? = null) {
if (isQuiet) {
Expand Down

0 comments on commit 9419917

Please sign in to comment.