因此,可以说我有以下R闪亮的应用程序用户界面:
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
sliderInput("x1",
"Choose knot 1:",
min = 1,
max = # here I want the value of slider x2
value = 10, # default value
step=0.01),
sliderInput("x2",
"Choose knot 2:",
min = # here I want value of slider input x1
max = 50,
value = 25, # default value
step=0.01),
)
)
)
我希望滑块输入x1的最大值是滑块输入x2的当前值,并且希望滑块输入x2的最小值等于滑块输入x1的当前值。如何从另一个小部件中的滑块输入中获取当前值?
答案 0 :(得分:1)
我认为您可以在CSS_SELECTOR
中的driver.get('https://hackertyper.net/')
x = 1
while x == 1:
ActionChains(driver).move_to_element(WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "div#main pre span#cursor")))).send_keys("I'm trying to make a bot to see how far I can get in hackertyper").perform()
time.sleep(0.5)
内使用from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
来获得所需的行为。
updateSliderInput