Suppressed: java.io.IOException: Incomplete document
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 752
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 8
Description
package applogin;
import org.testng.annotations.Test;
import io.appium.java_client.MobileElement;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.remote.MobileCapabilityType;
import org.testng.annotations.BeforeTest;
import java.net.URL;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testng.annotations.AfterTest;
public class LoginApp {
static RemoteWebDriver driver;
@BeforeTest
public void setUp() throws Exception {
DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability(MobileCapabilityType.DEVICE_NAME, "emulator-5554");
dc.setCapability("platformName", "android");
dc.setCapability("appPackage", "com.metlife.mexico.internal.salesapp.QA");
dc.setCapability("appActivity", ".MainActivity");
dc.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, 60);
URL url = new URL("http://0.0.0.0:4723/wd/hub");
driver = new AndroidDriver<WebElement>(url, dc);
Thread.sleep(5000);
System.out.println("App Has been started");
}
@Test
public void userName() throws Exception {
System.out.println("Test Initieted");
MobileElement userName = (MobileElement) driver.findElementByXPath(
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[1]/android.view.View/android.view.View[1]/android.view.View[2]/android.view.View[2]/android.view.View/android.view.View[4]/android.widget.EditText");
userName.sendKeys("N3336685");
MobileElement userPassword = (MobileElement) driver.findElementByXPath(
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[1]/android.view.View/android.view.View[1]/android.view.View[2]/android.view.View[2]/android.view.View/android.view.View[5]/android.widget.EditText");
userPassword.sendKeys("MetMex29");
MobileElement enterBtn = (MobileElement) driver.findElementByXPath(
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[1]/android.view.View/android.view.View[1]/android.view.View[2]/android.view.View[2]/android.view.View/android.widget.Button");
enterBtn.click();
Thread.sleep(10000);
System.out.println("Assep terms and conditions");
Thread.sleep(5000);
MobileElement el4 = (MobileElement) driver.findElementByXPath(
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[1]/android.view.View/android.view.View/android.view.View[2]/android.view.View/android.view.View[2]/android.view.View[1]");
el4.click();
MobileElement el5 = (MobileElement) driver.findElementByXPath(
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[1]/android.view.View/android.view.View/android.view.View[2]/android.view.View/android.view.View[2]/android.view.View[2]/android.widget.CheckBox");
el5.click();
MobileElement el6 = (MobileElement) driver.findElementByXPath(
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[1]/android.view.View/android.view.View/android.view.View[2]/android.view.View/android.view.View[2]/android.view.View[1]/android.widget.CheckBox");
el6.click();
MobileElement el7 = (MobileElement) driver.findElementByXPath(
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.webkit.WebView/android.webkit.WebView/android.view.View/android.view.View[1]/android.view.View/android.view.View/android.widget.Button");
el7.click();
}
@AfterTest
public void userPassword() {
System.out.println("Login Completed");
}
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The payload provides a TestNG LoginApp class, with setUp and userName as the relevant entry points, using AndroidDriver at http://0.0.0.0:4723/wd/hub. Start by reproducing the reported “java.io.IOException: Incomplete document” with the supplied class; done requires a specific, reproducible cause and fix, but no project file or test path is named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100