fork download
  1.  
  2. import org.junit.Test;
  3. import org.openqa.selenium.By;
  4. import org.openqa.selenium.WebDriver;
  5. import org.openqa.selenium.firefox.FirefoxDriver;
  6. import java.lang.InterruptedException;
  7.  
  8.  
  9. class Ideone
  10. {
  11. public static void main (String[] args) throws java.lang.Exception
  12. {
  13. Main m=new Main();
  14. m.go();
  15. }
  16.  
  17. @Test
  18. public void go () throws InterruptedException{
  19.  
  20. System.out.println("htth");
  21.  
  22. System.setProperty("webdriver.gecko.driver", "C://Users//iCarly//Downloads//geckodriver.exe");
  23. WebDriver driver=new FirefoxDriver();
  24.  
  25. driver.get("https://w...content-available-to-author-only...l.com/ru/translator");
  26. driver.findElement(By.xpath("//div[@class='lmt__side_container lmt__side_container--source']/div[2]/div/textarea")).sendKeys("Привет");
  27. Thread.sleep(3500);
  28. String result = driver.findElement(By.xpath("//div[@id='dl_translator']/div/div[3]/div[3]/div/textarea")).getText();
  29.  
  30. System.out.println("Text: " + result);
  31. }}
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:3: error: package org.openqa.selenium does not exist
import org.openqa.selenium.By;
                          ^
Main.java:4: error: package org.openqa.selenium does not exist
import org.openqa.selenium.WebDriver;
                          ^
Main.java:5: error: package org.openqa.selenium.firefox does not exist
import org.openqa.selenium.firefox.FirefoxDriver;
                                  ^
Main.java:13: error: cannot find symbol
		Main m=new Main();
		^
  symbol:   class Main
  location: class Ideone
Main.java:13: error: cannot find symbol
		Main m=new Main();
		           ^
  symbol:   class Main
  location: class Ideone
Main.java:23: error: cannot find symbol
		WebDriver driver=new FirefoxDriver();
		^
  symbol:   class WebDriver
  location: class Ideone
Main.java:23: error: cannot find symbol
		WebDriver driver=new FirefoxDriver();
		                     ^
  symbol:   class FirefoxDriver
  location: class Ideone
Main.java:26: error: cannot find symbol
		driver.findElement(By.xpath("//div[@class='lmt__side_container lmt__side_container--source']/div[2]/div/textarea")).sendKeys("??????");
		                   ^
  symbol:   variable By
  location: class Ideone
Main.java:28: error: cannot find symbol
		String result = driver.findElement(By.xpath("//div[@id='dl_translator']/div/div[3]/div[3]/div/textarea")).getText();
		                                   ^
  symbol:   variable By
  location: class Ideone
9 errors
stdout
Standard output is empty