我想检查样式元素的值是否大于特定值(即,是> 666px?),但是我无法获得该值.
以下是我要捕获的样式的HTML代码:
<pre><span id="da2c" style="left: 666px; top: 27px;"></pre>
Run Code Online (Sandbox Code Playgroud)
我正在使用此代码尝试打印其值,但它不打印:
System.out.print(driver.findElement(By.id("da1c")).findElement(By.cssSelector("span")).getAttribute("style"));
Run Code Online (Sandbox Code Playgroud)
我想要这样的东西:
if ((driver.findElement(By.id("da1c")).findElement(By.cssSelector("span")).getAttribute("style")).value> 700) {
System.out.println("value exceeding")
}
Run Code Online (Sandbox Code Playgroud) 有人可以将此翻译成我需要采取的可管理步骤:
~ Wayne
You must now finish the install manually:
1) Place the folowing line at the end of your shell's loading files(.bashrc or .bash_profile for bash and .zshrc for zsh), after all path/variable settings:
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm
Please note that this must only occur once - so, you only need to add it the first time you install rvm.
2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be …Run Code Online (Sandbox Code Playgroud)