Skip to content

Instantly share code, notes, and snippets.

View gunesmes's full-sized avatar
🎯
Focusing

Mesut Güneş gunesmes

🎯
Focusing
View GitHub Profile
@gunesmes
gunesmes / getElementsByXPath.js
Created March 21, 2025 13:22
Javascript getElementsByXPath by using document
// Find elements with Xpath
function getElementsByXPath(xpath, doc) {
const iterator = doc.evaluate(
xpath,
doc,
null,
4,
null
);s
package testrisk.dictionary.tests
import org.junit.Before
import org.junit.Test
import testrisk.dictionary.pages.DictionaryScreen
import testrisk.dictionary.pages.HomeScreen
class DictionaryScreenTests : BaseTest() {
private var dictionaryScreen = DictionaryScreen()
private var homeScreen = HomeScreen()
package testrisk.dictionary.tests
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.rule.ActivityTestRule
import org.junit.Before
import org.junit.Rule
import org.junit.runner.RunWith
import testrisk.dictionary.MainActivity
@RunWith(AndroidJUnit4::class)
package testrisk.dictionary.pages
import androidx.test.espresso.Espresso
import androidx.test.espresso.assertion.ViewAssertions
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withId
import testrisk.dictionary.R
class DictionaryScreen : BaseScreen() {
private var recyclerViewSozluk = Espresso.onView(withId(R.id.recyclerView))
package testrisk.dictionary.pages
import androidx.annotation.IdRes
import androidx.test.espresso.Espresso
import androidx.test.espresso.ViewInteraction
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import androidx.test.uiautomator.UiSelector
import testrisk.dictionary.R
final class HomeViewController: UIViewController {
private let networkManager = NetworkManager()
// MARK: Properties
@IBOutlet weak var dictionaryImg: UIImageView!
@IBOutlet var readmeMd: MarkdownView!
private var home: Home? {
didSet {
//
// HomeScreenTests.swift
// TestDictionaryUITests
//
// Created by MESUT GUNES on 1.08.2021.
// Copyright © 2021 MesutGunes. All rights reserved.
//
import Foundation
import XCTest
//
// BaseTest.swift
// TestDictionaryUITests
//
// Created by MESUT GUNES on 1.08.2021.
// Copyright © 2021 MesutGunes. All rights reserved.
//
import Foundation
import XCTest
//
// HomeScreen.swift
// TestDictionaryUITests
//
// Created by MESUT GUNES on 1.08.2021.
// Copyright © 2021 MesutGunes. All rights reserved.
//
import Foundation
import XCTest
@gunesmes
gunesmes / BaseScreen.swift
Last active February 8, 2022 06:04
XCUITest-BaseScreen.swift
//
// BaseScreen.swift
// TestDictionaryUITests
//
// Created by MESUT GUNES on 1.08.2021.
// Copyright © 2021 MesutGunes. All rights reserved.
//
import Foundation
import XCTest